Mutually recursive modules and derived instances of Data

Simon David Foster s.d.f at
Mon Oct 11 18:36:02 EDT 2004


If I have two modules which are mutually recursive;

module A where

data TA = TA String deriving (Data, Typeable)

module B where

data TB = TB TA deriving (Data, Typeable)

How do I got about writing a hi-boot that will work in GHC? The problem
is that to do proper XML Schema mapping, each Schema needs to map to a
single module (vital so that namespace mapping can occur), and of course
Schemas can be mutually recursive. My XML Serializer relies on
Data.Generics and thus deriving Data and Typeable to work, so I need to
be able to build module structures like this. Is it possible?



More information about the Glasgow-haskell-users mailing list