[Haskell-cafe] Reflection.Emit in Haskell
Martin Lütke
prionic at gmx.de
Fri Jan 18 00:23:27 EST 2008
Cetin Sert schrieb:
>
> As a .NET (C#/F#) programmer learning Haskell, I would love to know
> the best online sources about run-time compilation etc. like
> Reflection.Emit in .NET. I am making heavy use of this .NET API to
> compile customized (regular-expressions-) FSAs at run-time and want to
> learn how I might achieve the same in Haskell. Book or online article
> references specific to this issue will be highly appreciated ^_^
>
I am not familiar with C# but I think what you looking for is the GHC
api which allows you to compile haskell expressions at runtime. Look for
metaplug on hackage
(http://hackage.haskell.org/cgi-bin/hackage-scripts/package/metaplug-0.1.1).
In its source you ll find an example on how to use the api. You may of
course use metaplug itself. I must warn you though that the GHC api is
not the best documented and maintained. Currently (ghc 6.8.1) f.i. it
seems that reloading modules is broken.
The most official docu is here:
http://www.haskell.org/haskellwiki/GHC/As_a_library.
regards,
Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080118/bf1e165c/attachment.htm
More information about the Haskell-Cafe
mailing list