Re: pattern-matching extension?

2003-12-08 Thread Derek Elkins
On Mon, 8 Dec 2003 15:37:46 +1100 Fergus Henderson [EMAIL PROTECTED] wrote: On 05-Dec-2003, Derek Elkins [EMAIL PROTECTED] wrote: Abraham Egnor [EMAIL PROTECTED] wrote: I've occasionally wanted some sort of equivalent of an instanceOf function in haskell, i.e. one that would let me

Re: pattern-matching extension?

2003-12-07 Thread Fergus Henderson
On 05-Dec-2003, Derek Elkins [EMAIL PROTECTED] wrote: Abraham Egnor [EMAIL PROTECTED] wrote: I've occasionally wanted some sort of equivalent of an instanceOf function in haskell, i.e. one that would let me define a function that could dispatch on the type of its argument as well as the

Re: pattern-matching extension?

2003-12-06 Thread Ralf Laemmel
As Bernie and Derek already pointed out, in principle, the rich work on intensional polymorphism and dynamic typing comes to mind. In particular, dynamics are readily supported in Haskell. Let me add the following. Type-safe cast is now clearly localised in the module Data.Typeable. (Due to a

pattern-matching extension?

2003-12-05 Thread Abraham Egnor
I've occasionally wanted some sort of equivalent of an instanceOf function in haskell, i.e. one that would let me define a function that could dispatch on the type of its argument as well as the value. One option I've seen for this is http://okmij.org/ftp/Haskell/class-based-dispatch.lhs;, but

Re: pattern-matching extension?

2003-12-05 Thread Derek Elkins
On Wed, 03 Dec 2003 15:10:07 -0500 Abraham Egnor [EMAIL PROTECTED] wrote: I've occasionally wanted some sort of equivalent of an instanceOf function in haskell, i.e. one that would let me define a function that could dispatch on the type of its argument as well as the value. One option I've