Am Samstag 25 April 2009 19:29:30 schrieb siso dagbovie: > Hi, > > I've defined the following datatype with haskell > > data Graph a b = Empty | Context a b & Graph a b > > But I am having the error message: " parse error on input `&' ". > I am wondering what it is wrong with my definition. How can I fix this? > Thanks in advance. >
A constructor symbol has to start with a colon, so make it data Graph a b = Empty | Context a b :& Graph a b (or :&: if you prefer it more symmetric) > > Kind regards Cheers, Daniel _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe