Quantcast

Embed Haskell

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Embed Haskell

Rosario Borda
Hi All,

Is there a simple method for embed haskell in other languages, like latex?

An example in quasiquotation notation:

\documentclass{article}
\title{Hello World}
\begin{document}
   \maketitle
   Hello world! and reversed: [haskell: putStrLn reverse "Hello, World!"]
\end{document}

Many thanks, :)
Rosario

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Embed Haskell

Erik Hesselink
Hi Rosario,

lhs2tex [1] has the '\eval' command. See section 12 of the manual.

Erik

[1] http://www.andres-loeh.de/lhs2tex/

On Sun, Apr 22, 2012 at 17:59, Rosario Borda <[hidden email]> wrote:

> Hi All,
>
> Is there a simple method for embed haskell in other languages, like latex?
>
> An example in quasiquotation notation:
>
> \documentclass{article}
> \title{Hello World}
> \begin{document}
>   \maketitle
>   Hello world! and reversed: [haskell: putStrLn reverse "Hello, World!"]
> \end{document}
>
> Many thanks, :)
> Rosario
>
> _______________________________________________
> Haskell-Cafe mailing list
> [hidden email]
> http://www.haskell.org/mailman/listinfo/haskell-cafe

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Embed Haskell

Rustom Mody
In reply to this post by Rosario Borda

On Sun, Apr 22, 2012 at 9:29 PM, Rosario Borda <[hidden email]> wrote:
Hi All,

Is there a simple method for embed haskell in other languages, like latex?

An example in quasiquotation notation:

\documentclass{article}
\title{Hello World}
\begin{document}
  \maketitle
  Hello world! and reversed: [haskell: putStrLn reverse "Hello, World!"]
\end{document}

Many thanks, :)
Rosario

You may want to look at babel: http://orgmode.org/worg/org-contrib/babel/
Haskell is one of the babel languages
http://orgmode.org/worg/org-contrib/babel/languages.html

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Loading...