Hi.
> I'm having a problem with lhs2Tex and \eval{}. It doesn't work.
>
> I have the following in a file test.lhs:
>
> --------------------------------
> %include polycode.fmt
>
> One
> %option ghci
> Two
> \eval{4}
> Three
> --------------------------------
>
> When I try to run this file through lhs2Tex, it crashes:
>
> > lhs2Tex test.lhs
> ... polycode junk removed ...
>
> One
> %option ghci
> Two
> lhs2TeX: fd:7: hGetLine: end of file
>
> --------------------------------
>
> Has someone encountered this problem before, or knows how to solve this?
Two issues:
First, it's
%options ghci
and not
%option ghci
Second, the \eval is executed in the context of the current file,
i.e., the source must be a valid literate Haskell file. An empty
literate file causes the literate preprocessor to fail. This
works for me:
--------------------------------
%include polycode.fmt
One
%options ghci
Two
\eval{4}
Three
> x = 0
--------------------------------
HTH,
Andres
--
Andres Loeh, Universiteit Utrecht
mailto:[email protected] mailto:[email protected]
http://www.andres-loeh.de
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe