In a custom prelude, I have written the following definitions:data Truth = True | FalseifThenElse :: Truth -> a -> a -> aifThenElse True x _ = xifThenElse False _ x = x(==) :: a -> a -> Truth(==) = ...I'm replacing Bool with my own Truth type. Clients will be built with RebindableSyntax, so that they will use these definitions for desugaring.However, if I write this:f :: Text -> Textf "r" = "rrr"f other = otherI get a build error indicating that GHC expected the (==) operator to return a value of type Bool, rather than Truth.Shouldn't pattern matching desugar to use overloaded ifThenElse in these situations? Or is it expected that use of GHC.Types.Bool is hard-coded even with RebindableSyntax enabled?Thanks,Chris
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe