[Haskell-cafe] Derived type definition

kg kg2007.kg at gmail.com
Mon Nov 22 15:43:57 EST 2010


I've tried to simplify as much as possible my problem. Finally, I think 
I can resume it like that:

Suppose these following data types :
data Rec a r = Rec a r
data RecNil = RecNil
data Wrapper a = Wrapper a

Then, we can build the following type:
type TTest = Rec Int (Rec String RecNil)
or this type:
type TTestWrapped = Rec (Wrapper Int) (Rec (Wrapper String) RecNil)

Is it possible to build TTestWrapped from TTest ?

Thx in advance,

More information about the Haskell-Cafe mailing list