> Data.Typeable gives you most of what you want except for access to
> function bodies.
Thanks a lot, this helps a bit, but access to function bodies is exactly
what I need. Or being more precise, I need the functionality of ghci's
command ':t'. So functions that behave as follows, where everything is
of course meta-represented in some way as ADT:
Prelude Data.Typeable> typeOf (\a -> (Just (a:"")))
(\a -> (Just (a:""))) :: Char -> Maybe [Char]
Prelude Data.Typeable> getDomain $ typeOf (\a -> (Just (a:"")))
[Char]
Prelude Data.Typeable>getCodomain $ typeOf (\a -> (Just (a:"")))
(Maybe [Char])
Prelude Data.Typeable>getTypeConstructors (Maybe [Char])
[ (Just) :: [Char] -> Maybe [Char]
, (Nothing) :: Maybe [Char]
]
Prelude Data.Typeable>getTypeConstructors [Char]
[ (:) :: Char -> [Char] -> [Char]
, ([]) :: [Char]
]
I am much obliged for any kind of hint.
Cheers,
Martin
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe