As an exercise to learn about Haskell (and torture), I am considering writing a custom Haskell code decoder.
It will support a configuration file written in JSON or YAML (or is something better?), Which sets such parameters as import sorting, sorting / grouping data and class statements, the number of lines between sections, etc.
I am looking for a parser for Haskell 98 that generates an abstract syntax tree (AST) and stores comments . Parsing the GHC with its language extensions will be a bonus.
In the absence of such a thing, I think I can write a recursive descent parser or one using Parsec or a parser generator. Perhaps my own growth will increase learning (and torture :-)).
Is there a complete Haskell-> AST analyzer available under one of the open source licenses? If I advance on this project, I will put it on github.
Ralph source share