<br><font size=2 face="sans-serif">Hello,</font>
<br>
<br><tt><font size=2>&gt; Thanks a lot, this helps a bit, but access to
function bodies is exactly<br>
&gt; what I need. Or being more precise, I need the functionality of ghci's<br>
&gt; command ':t'. So functions that behave as follows, where everything
is<br>
&gt; of course meta-represented in some way as ADT:<br>
&gt; <br>
&gt; &nbsp; &nbsp;Prelude Data.Typeable&gt; typeOf &nbsp;(\a -&gt; (Just
(a:&quot;&quot;)))<br>
&gt; &nbsp; &nbsp;(\a -&gt; (Just (a:&quot;&quot;))) :: Char -&gt; Maybe
[Char]<br>
&gt; <br>
&gt; &nbsp; &nbsp;Prelude Data.Typeable&gt; getDomain $ typeOf (\a -&gt;
(Just (a:&quot;&quot;)))<br>
&gt; &nbsp; &nbsp;[Char]<br>
&gt; <br>
&gt; &nbsp; &nbsp;Prelude Data.Typeable&gt;getCodomain $ typeOf (\a -&gt;
(Just (a:&quot;&quot;)))<br>
&gt; &nbsp; &nbsp;(Maybe [Char])<br>
&gt; </font></tt>
<br><tt><font size=2>Data.Typeable should allow for all of the previous.</font></tt>
<br><tt><font size=2><br>
&gt; &nbsp; &nbsp;Prelude Data.Typeable&gt;getTypeConstructors (Maybe [Char])<br>
&gt; &nbsp; &nbsp;[ (Just) :: [Char] -&gt; Maybe [Char]<br>
&gt; &nbsp; &nbsp;, (Nothing) :: Maybe [Char]<br>
&gt; &nbsp; &nbsp;]<br>
&gt; <br>
&gt; &nbsp; &nbsp;Prelude Data.Typeable&gt;getTypeConstructors [Char]<br>
&gt; &nbsp; &nbsp;[ (:) :: Char -&gt; [Char] -&gt; [Char]<br>
&gt; &nbsp; &nbsp;, ([]) :: [Char]<br>
&gt; &nbsp; &nbsp;]<br>
&gt; &nbsp; &nbsp;</font></tt>
<br><tt><font size=2>Data.Generics allows you to do this (to a certain
extent), i.e. there is a function </font></tt>
<br>
<br><tt><font size=2>&nbsp; &nbsp; dataTypeConstrs :: DataType -&gt; [Constr]</font></tt>
<br><tt><font size=2><br>
-Jeff</font></tt>
<br>
<br>
<span style="font-family:'Arial',sans-serif; font-size:8pt; color:#000000">---<br>
<br>
This e-mail may contain confidential and/or privileged information. If you <br>
are not the intended recipient (or have received this e-mail in error) <br>
please notify the sender immediately and destroy this e-mail. Any <br>
unauthorized copying, disclosure or distribution of the material in this <br>
e-mail is strictly forbidden.</span>