[Haskell-cafe] Strong duck typing / structural subtyping / type
class aliases / ??? in Haskell
alp at mestan.fr
Fri Sep 25 17:25:21 EDT 2009
On Fri, Sep 25, 2009 at 8:14 PM, Job Vranish <jvranish at gmail.com> wrote:
> Supposedly OCaml has an OO feature that does this but I haven't tried it
Indeed, OCaml has stuctural polymorphism, it's a wonderful feature.
*# let f myobj = myobj#foo "Hi !";;
val f : < foo : string -> 'a; .. > -> 'a = <fun>*
IIRC, there has been work on Template Haskell for structural polymorphism.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe