Hi,
it's for the Nomyx game (
www.nomyx.net). In this game the players submit pieces of code ("rules") that are written in Haskell.
I would like to serialize the rules submitted to a Haskell format, to give the possibility to the players
to work on their rules offline, to check them with a compiler and store them on Github.
Currently the player is able to submit this module file to Nomyx. Nomyx loads the file through a Haskell interpreter.
Once it's done, the player is able to propose "myRule1" in the game.
But what if the player wants to modify the rule in Nomyx? Then I would like to modify the original file to reflect the changes.
In the example, the field "code" contains the actual code of the rule in Haskell. I use a quasi-quotation because I parse it with an interpreter to validate it.
But otherwise it is is considered as a simple string.
This is why a format in Haskell would suit me (instead of XML or JSON): some of the data I need to serialize is indeed Haskell code.
Hope I was not too obscure :)
Best,
C