A Haskell specific preprocessor

Max A.K. max630@mail.ru
Fri, 11 Jan 2002 12:38:45 +0600


--7JfCtLOvnd9MIVvH
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

-C option cure it... (that was hugs, wasn't it? I added
-Fcpp_hugs to HUGSFLAGS, where cpp_hugs is script which
wraps cpp. See the attachment.)

Haskell (with "syntactic sugar" rules) is quiet good itself.
Cpp is mostly used for "#if" portability triggers, and it's
good for the purpose. C-specific things is avoidable by
various options. There is also gpp project. I didn't tried
it, just read the announce. Maybe you could use it.
http://auroux.free.fr/prog/gpp.html

The another question is making the desugaring and layout
parsing by the separate program(s). I think it would be good.
Then, there could be possible to vary syntax by
configuration of the preprocessor. There are lot of projects
which propose it's own "sugars".

Max.

--7JfCtLOvnd9MIVvH
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=cpp_hugs

#!/bin/bash

cpp -P -traditional "$@"

--7JfCtLOvnd9MIVvH--