Version française
Home     About     Download     Resources     Contact us    
Browse thread
Why is this coercion necessary?
[ 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: Re: [Caml-list] Why is this coercion necessary?
Of course OCaml doesn't need to be changed, just write a syntax
extension in campl4.

On Thu, Aug 14, 2008 at 1:21 PM, Lukasz Stafiniak <lukstafi@gmail.com> wrote:
> There is no way to avoid coercions altogether: OCaml doesn't have
> inference for subtyping, using unification with row variables gives
> the intersection behavior. But the language could be changed, with a
> syntax like
>
> match x return e with
> | ... -> ...
> | ... -> ...
>
> meaning that all branches should be coerced to e.
>