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
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
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)