I was wondering if in Haskell there is a standard canonical way to write not only a parser for a specific file format, but also an author.
In my case, I need to parse a data file for analysis. However, I also simulate the data that needs to be analyzed and save it in the same format. Now I can write a parser using Parsec or something equivalent, and also write functions that perform text output as needed, but whenever I change my file format, I would have to change two functions in my code. Is there a better way to achieve this?
Thanks Dominik
parsing haskell parsec file-writing
Dominik schrempf
source share