[Haskell-cafe] Literate HTML

Neil Mitchell ndmitchell at gmail.com
Fri Dec 7 14:07:41 EST 2007


Hi

I want literate Haskell, but where the literate bit forming a document
is actually HTML, not latex. Does anyone have any idea how to go about
this?

For a start, how do I persuade GHC to run the file:

C:\Documents\Uni\tagsoup>runhaskell index.html
Warning: ignoring unrecognised input `index.html'
<interactive>:1:108: attempting to use module `Main' (Main.hs) which
is not loaded

And leading on to that, how Cabal might be used to compile the file.

Secondly, what tricks can people think of for placing the code inside
- I have come up with:

  <code>
> foo = 1
  </code>

And:

<code>
<!--
\begin{code}
-->
foo = 1
\end{code}
</code>

I can then hide the trailing \end{code} with a margin-bottm: -2em.

Does anyone have any other ideas?

Thanks

Neil


More information about the Haskell-Cafe mailing list