Version française
Home     About     Download     Resources     Contact us    
Browse thread
3.10+beta: Camlp4: AST mapping treats record labels as patterns; should they have type ident instead?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Nicolas Pouillard <nicolas.pouillard@g...>
Subject: Re: [Caml-list] 3.10+beta: Camlp4: AST mapping treats record labels as patterns; should they have type ident instead?
On 4/18/07, Aleksey Nogin <nogin@metaprl.org> wrote:
> On 18.04.2007 01:11, Nicolas Pouillard wrote:
>
> > Why do you mix the old definition of PaRec with the new definition of
> > ExRec.

[...]

> >
> > For patterns there is something doable:
> >
> >    | PaEq  of Loc.t and patt and patt (* p = p *)
> > Can become
> >    | PaEq  of Loc.t and ident and patt (* i = p *)
> >
> > Since that node is only used with an ident on his left.
>
> Yes, this sounds like a good thing to do.

That's now in CVS.

> > For expressions it's more complex
> >
> Is it the same issue as the workaround discussion above - the "proper"
> way to make this distinction would be to introduce a separare
> rec_binding type similar, but separate from the binding one? But is it
> true that the "b; b" case in the binding type is only used for records?
> If so, it would seem that splitting the binding type would not result in
> that much duplication. Of course, I am only starting to understand the
> new setup, no I may be completely wrong here.

Yes it is just used for records and objects {< f1 = e1 ; ... ; fN = eN >}.

But having one more category seems heavy, I have to think more about it.

-- 
Nicolas Pouillard