Hi.
I wanted to generalize the definitions in Text.Parsec.Language to be
able to use them with Parsec Text instead of Parsec String. I'm
getting a type error with the following code snippet:
http://hpaste.org/72844
I don't really understand the error, specially with regard to the fact
that the
Hello!
I've managed to reduce your code to a much simpler test case (without
parsec) but I'm still not sure why this is happening:
{-# LANGUAGE MultiParamTypeClasses, FlexibleContexts #-}
data D m
= D { bar1 :: P m ()
, bar2 :: P m ()
}
data P m c = P
class S m c where
foo ::
Here's an even smaller one:
{-# LANGUAGE MultiParamTypeClasses, FlexibleContexts #-}
data D m = D { bar :: P m () }
data P m c = P
class S m c where
foo :: S m () = P m ()
foo = undefined
emptyDef :: S m () = D m
emptyDef = D foo
haskellStyle :: S m () = D m
haskellStyle = emptyDef { bar =