Martin's Miscs

Andrew Butterfield Andrew.Butterfield@cs.tcd.ie
Tue, 3 Feb 1998 09:59:39 +0000


>  An even nicer idea, which insofar as I can see would be easy to
>implement, would be to have the Clean parser ignore HTML, XML, SGML,
>CSS[1..], or DSSSL mark-up.  These all depend on <...> braces.  (It would
>be good if the editor could optionally do this)

I couldn't agree more - in fact the idea I would suggest is to use
Miranda stlye literate scripts. Everything is comment unless prefixed
by some character ('>', say)

So a Clean program could be embedded in anything (LateX, HTML) etc ...
See below for an example LaTeX script with Clean embedded

I did suggest this a while back and was told it was low priority - which
I accepted as fair - but I would like to see others put pressure to put it
up higher the scale.

A suggestion made to me was to write a script to pre-process my literate
scripts and strip out comments and code markers - the prob;em with this
is that error location and correction becomes very difficult. The CleanIDE
needs to handle the literate script itself, not a stripped down version.


Sample LaxTeX below - just LaTeX it to see how it pretty-prints:

-------------- cut here 8< -----------------------------
\documentclass{article}
\title{Literate Programming with Clean}
\author{Andrew Butterfield}
\begin{document}
\maketitle

This is an implementation of ``Literate Clean''

\begin{verbatim}

> module LiterateClean

\end{verbatim}

We make use of all the usual stuff

\begin{verbatim}

> import StdEnv

\end{verbatim}

Finally we show it all off !

\begin{verbatim}

> Start =
>  ( "LiterateClean 1.0"
>   ,999
>   ,"That's all folks"
>  )
\end{verbatim}

The End.

\end{document}
-------------- cut here 8< -----------------------------


_____________________________________________________________
Andrew Butterfield,                           Location: LG.19
Dept. of Computer Science,               Tel: +353-1-608-2517
O'Reilly Institute,                      Fax: +353-1-677-2204
Trinity College,
Dublin 2, IRELAND.        mailto:Andrew.Butterfield@cs.tcd.ie
URL:                 http://www.cs.tcd.ie/Andrew.Butterfield/