[Haskell-cafe] haskell and reflection

Neil Mitchell ndmitchell at gmail.com
Tue Sep 11 10:17:29 EDT 2007


Hi

> there is no runtime representation of type available for programmatic
> representation

Data.Typeable.typeOf :: Typeable a => a -> TypeRep

> there is no runtime representation of the type-inferencing or checking
> machinery

Pretty much, no. The GHC API may provide some.

> there is no runtime representation of the evaluation machinery

Yhc provides some representation with the Yhc API.

> there is no runtime representation of the lexical or parsing machinery

lex provides some of this. There are various Haskell parsers out there
in packages for us.


I wouldn't have considered these things "reflection" - certainly the
Java/C# use of the word reflection is quite different. Data.Generics
does provide many of the reflection capabilities of Java.

Thanks

Neil


More information about the Haskell-Cafe mailing list