
There is the ChristmasTree package (http://hackage.haskell.org/package/ChristmasTree) which provides a very fast read alternative by deriving grammars for each datatype. If you want to know the speed differences, see http://www.cs.uu.nl/wiki/bin/view/Center/TTTAS for more information (it's in the Haskell Do You Read Me paper, see section 5 for a comparison of efficiency). -chris On 9 mei 2010, at 05:32, Tom Hawkins wrote:
I have a lot of structured data in a program written in a different language, which I would like to read in and analyze with Haskell. And I'm free to format this data in any shape or form from the other language.
Could I define a Haskell type for this data that derives the default Read, then simply print out Haskell code from the program and 'read' it in? Would this be horribly inefficient? It would save me some time of writing a parser.
-Tom _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe