fsharp.org icon indicating copy to clipboard operation
fsharp.org copied to clipboard

Language spec clarifications needed

Open dsyme opened this issue 5 years ago • 2 comments

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

dsyme avatar Aug 24 '20 18:08 dsyme

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)

NinoFloris avatar Aug 25 '20 11:08 NinoFloris

Yes, thanks, that one too, I've added it to the list

dsyme avatar Aug 25 '20 16:08 dsyme