[Haskell-cafe] introspection | meta data

Jon Cast jcast at ou.edu
Thu Aug 5 12:13:12 EDT 2004


Crypt Master <cryptmaster at hotmail.com> wrote:
> I recently had to implement an algorthm in C, and found the time to
> give it a go in Haskell to aid in learning haskell.
> 
> I found myself "needing" runtime meta information on data types (well
> tuples which are data (a,b) = (a,b)). Does haskell allow this ?

<snip absolutely normal example>

> So what is the general haskell approach to this type of
> introspection/meta data problem... ?

Introspection in Haskell is provided by the Data.Generics module.  Try
`deriving Data' and go wild (everybody else has).

Jon Cast


More information about the Haskell-Cafe mailing list