[Haskell-cafe] Standard way to translate Haskell to other languages?

Malcolm Wallace malcolm.wallace at me.com
Wed Jan 1 11:13:20 UTC 2014

On 1 Jan 2014, at 05:38, Joey wrote:

> I'm looking at writing a simple Haskell to Elm translator. Thankfully, the Elm compiler is in Haskell, so I'm just trying transforming syntax trees.
> I'm wondering, is there a standard way to do this sort of thing? 

Yes.  Use the haskell-src-exts parser.  It gives you a somewhat standard syntax tree.  Then you can use straight pattern-matching equations for transformation, or if that leads to lots of boilerplate code, then something like uniplate can be useful.


More information about the Haskell-Cafe mailing list