Language spec clarifications needed
A list of spec clarifications needed:
https://github.com/dotnet/fsharp/issues/9762#issuecomment-679278472
https://github.com/dotnet/fsharp/issues/9913
https://github.com/dotnet/fsharp/issues/9806#issuecomment-679264925
https://github.com/dotnet/fsharp/issues/9858#issue-671666428
https://github.com/dotnet/fsharp/issues/6132#issuecomment-680960095
https://github.com/dotnet/fsharp/issues/3580
https://github.com/dotnet/fsharp/issues/6136
https://github.com/dotnet/fsharp/issues/9692
https://github.com/fsharp/fslang-suggestions/issues/916
https://github.com/fsharp/fsfoundation/pull/597
https://github.com/dotnet/fsharp/issues/3566
Maybe also fixes from https://github.com/dotnet/fsharp/issues/9858#issue-671666428
Spec defines custom op with bind as:
T([<CustomOperator("Cop", MaintainsVarSpaceUsingBind=true)>]cop arg; e, V, C, q) = Assert (q); CL(cop arg; e, V, C(b.Return exp(V)), false)
First off MaintainsVarSpaceUsingBind should read MaintainsVariableSpaceUsingBind
Then looking at the definition of CL we see
Specifically:
bind: indicator if it is for Bind (true) or iterator (false).Yet the definition of custom op with bind states false for bind while it should clearly be true.
I also believe the definition right after it
T([<CustomOperator("Cop")>]cop arg; e, V, C, q) = Assert (q); CL(cop arg; e, V, C(b.Yield exp(V)), false)
Should instead be
T([<CustomOperator("Cop", MaintainsVariableSpace=true)>]cop arg; e, V, C, q) = Assert (q); CL(cop arg; e, V, C(b.Yield exp(V)), false)
Yes, thanks, that one too, I've added it to the list