
1 Jan
2014
1 Jan
'14
6:13 a.m.
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. Regards, Malcolm