Version française
Home     About     Download     Resources     Contact us    
Browse thread
Polymorphic recursion, please
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Lukasz Stafiniak <lukstafi@g...>
Subject: Polymorphic recursion, please
Hello,

I've been beaten by lack of polymorphic recursion again. I propose the
following syntax:

let rec (f :> ty) = ...

Here, all type variables (explicit and implicit) in ty are
generalized. The alternative syntax:

let rec (f : 'a b c . ty) = ...

makes it more difficult (if possible? I forgot.) to catch implicit row
variables (I'm using polymorphic variants for subtyping).