OCaml Forge
SCM

Detail: [#294] Doesn't work well with labels

Bugs: Browse | Download .csv | Monitor

[#294] Doesn't work well with labels

Date:
2009-10-01 14:51
Priority:
3
State:
Open
Submitted by:
Vincent Aravantinos (aravantv)
Assigned to:
Jeremy Yallop (yallop)
Hardware:
All
Resolution:
Accepted As Bug
Severity:
minor
Version:
None
Component:
None
Operating System:
All
Product:
None
 
URL:
Summary:
Doesn't work well with labels

Detailed description
When a polymorphic recursive function only has labelled arguments the extension won't work.

Specifically, pa_polyrec introduces an eta expansion whose parameter is a single variable (i.e. no label).
That's not a problem when a function takes at least one unlabelled argument.
But when the function only takes labelled arguments the compiler will complain.

I don't know enough of camlp4 to submit a patch but I guess that the function that should be fixed is "eta_method" in pa_polyrec.ml, l.78
-> the introduced parameter should be labelled accordingly to the type of the method.

V.

Followup

Message
Date: 2009-10-03 20:48
Sender: Jeremy Yallop

Thanks for the report!

Yes, "eta_method" needs to be fixed. It'll have to do eta-expansion that follows the syntax of the original function declaration: a type-directed translation would be better, but camlp4 doesn't have enough type information available.

Attached Files:

Changes:

Field Old Value Date By
assigned_tonone2009-10-03 20:44yallop
ResolutionNone2009-10-03 20:44yallop