[Haskell-cafe] how to #include files within parsec ... without unsafePerformIO?

2009-06-19 Thread Leonard Siebeneicher
Hi Neil, Hi Daniel. Thank you for your help, using parsec 3.0.0 and liftIO was the solution. After installing new parsec I have had to use import Text.Parsec ... instead of ... import Text.ParserCombinators.Parsec ... to get it work. It seems Text.ParserCombinators.Parsec refers to old Parsec 2

[Haskell-cafe] how to #include files within parsec ... without unsafePerformIO?

2009-06-18 Thread Leonard Siebeneicher
Dear reader, I wonder whether there is a 'general' working solution to include files within a parsec parser. Without the need of unsafePerformIO. Appending an example program, using unsafePerformIO. Thanx for reading. Greetings, Leonard Siebeneicher --- Begin: experiment.hs --- import

[Haskell-cafe] Instance of Eq on cyclic data structure?

2008-05-13 Thread Leonard Siebeneicher
Hi. I am testing a winged edge data structure. module Main where type Point3 = (Float, Float, Float) data Body= Body [Vertex] [Edge] [Face] deriving(Eq) data Face= Face Edge deriving(Eq) data Edge= Edge (Vertex, Vertex) (Face, Face) (Edge, Edge) (Edge, Edge) deriving(Eq)