[Haskell-cafe] run-time type testing in haskell?

Bulat Ziganshin bulat.ziganshin at gmail.com
Sat Apr 28 09:54:14 EDT 2007

Hello Eric,

Saturday, April 28, 2007, 5:33:02 PM, you wrote:

> Type classes allow us to adopt approach (0) in Haskell, but don't seem
> to allow approach (1)....

may be multi-parameter type class is what you need here, may be just
closure. anyway, OOP may be simulated in Haskell via hierarchy of
existentials but such emulation is too expensive (in terms of easiness
of programming)

i highly recommend you to read
http://haskell.org/haskellwiki/OOP_vs_type_classes and papers
mentioned at the end there in order to grok relations between FP, OOP,
type classes and existentials. unfortunately, dynamics are not yet
mentioned there, read 'An Extensible Dynamically-Typed Hierarchy of
Exceptions' by Simon Marlow

Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com

More information about the Haskell-Cafe mailing list