
[mailto:haskell-cafe-bounces@haskell.org] On Behalf Of Tomasz Zielonka
On Mon, Jun 18, 2007 at 10:05:40PM +0100, Pasqualino 'Titto' Assini wrote:
Most languages, even Java, have a reflection capability to dynamically inspect an object.
It is surprising that Haskell doesn't offer it.
I'll just add that I've never consciously used reflection, so I probably overlook some features of Haskell that give a part of reflection functionality.
On the surface, Haskell would appear to not offer reflection. However, you can get quite a long way with Data.Generics and Data.Dynamic, and deriving (Typeable, Data), which will give you introspection of data types. Here's a nice little article on using deriving Data: http://www.defmacro.org/ramblings/haskell-web.html And the hs-plugins library will give you dynamic loading, but I don't think there's any introspection capability (yet?) Alistair ***************************************************************** Confidentiality Note: The information contained in this message, and any attachments, may contain confidential and/or privileged material. It is intended solely for the person(s) or entity to which it is addressed. Any review, retransmission, dissemination, or taking of any action in reliance upon this information by persons or entities other than the intended recipient(s) is prohibited. If you received this in error, please contact the sender and delete the material from any computer. *****************************************************************