I'm currently writing an online game where I use Haskell for the server-side backend and Elm for the frontend/rendering.
Right now I have my GameState as one big ADT, in a type simple enough that I can use it in Elm as well. I was hoping to avoid using JSON, and simply pass Elm the output of "show" on the data, which I could then parse-back into an ADT in Elm.
I'm wondering, is there anything equivalent to haskell's "read" which can automatically look at a string output by show, and parse it back into data? If not, are there any existing parser-libraries available for Elm?
If I do end up going with JSON, is there a way to automatically convert it into an ADT? (Something similar to Aeson's FromJSON, perhaps?)