
Hi, Ducis wrote:
Actually I wonder how to achieve that without rolling my own haskell parser or forking haskell-src-exts.
Adam vogt wrote:
Ideally there could be something like camlp4 for haskell, but as far as I know there isn't such a thing.
We built SugarHaskell to explore that design space. See our paper at the Haskell Symposium 2012: http://sugarj.org/sugarhaskell.pdf While there is not much going on about SugarHaskell specifically, the underlying language-independent framework is still actively developed, in the https://github.com/sugar-lang organization. The eclipse plugin for SugarHaskell from http://update.sugarj.org/ should work. I don't know what the status of the command-line version is, though. Even if you don't want to use all of SugarHaskell, the underlying easily extensible grammar might still be a good starting point. It uses declarative layout constraints to specify Haskell's layout in a modular way. See our paper at the conference on software language engineering 2012: http://sugarj.org/layout-parsing.pdf Tillmann