[Haskell-cafe] Combining Wouter's expressions with extensible records

Ron Alford ronwalf at volus.net
Wed Jul 9 22:40:57 EDT 2008


Well, my extension of Wouter's datatypes proved to be unweildy....
So, I'm trying to use
http://fmapfixreturn.wordpress.com/2008/05/03/simple-extensible-records-now-quick-generic-tricks-pt-1/
for extensible records.

I ran across my first problem rather quickly!
data Expr f = In (f (Expr f))

Ok, but to make it part of a record, it needs to implement Data:
data Expr f = In (f (Expr f)) deriving Data

but this gives
    No instances for (Data (f (Expr f)), Typeable (Expr f))
      arising from the 'deriving' clause of a data type declaration
                   at Planning/Wouter.hs:77:0-42

Any hints?

Thanks,
-Ron


More information about the Haskell-Cafe mailing list