You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the compiler allows for some interesting ways to write generic signatures
openSystemmoduleZ =typeAlpha<^b,^awhen^a:(member Name:string)and^a:(member Zip:^bwhen^b:struct )and^a:(static member(+):'a*'a->'a)>()=member inline__.X=()withstatic member inlineY=()
Since this flies flagrantly in the face of the indentation rules, it'd be nice to fix this for the sake of consistency at the least.
This gives an indentation warning on the ( before static
typeTypeWithALongName<^awhen^a:(static member(+):'a*'a->'a)and^a:(static member(-):'a*'a->'a)and^a:(static member(*):'a*'a->'a)and^a:(static member(/):'a*'a->'a)>=static member inlineX=()
To fix the warning you have to indent this far
typeTypeWithALongName<^awhen^a:(static member(+):'a*'a->'a)and^a:(static member(-):'a*'a->'a)and^a:(static member(*):'a*'a->'a)and^a:(static member(/):'a*'a->'a)>=static member inlineX=()
The former seems like it would work based on the typical indentation approach of needing to be indented one space further than the start of the encompassing construct e.g.
letfn x y =fun z ->
x * y * z
Pros and Cons
The advantages of making this adjustment to F# are ...
indentation consistency
The disadvantages of making this adjustment to F# are:
This is not something which has obviously "already been decided" in previous versions of F#. If you're questioning a fundamental design decision that has obviously already been taken (e.g. "Make F# untyped") then please don't submit it.
Please tick all that apply:
This is not a breaking change to the F# language design
I would be willing to help implement and/or test this
I or my company would be willing to help crowdfund F# Software Foundation members to work on this
The text was updated successfully, but these errors were encountered:
Currently the compiler allows for some interesting ways to write generic signatures
Since this flies flagrantly in the face of the indentation rules, it'd be nice to fix this for the sake of consistency at the least.
This gives an indentation warning on the
(
before staticTo fix the warning you have to indent this far
The former seems like it would work based on the typical indentation approach of needing to be indented one space further than the start of the encompassing construct e.g.
Pros and Cons
The advantages of making this adjustment to F# are ...
The disadvantages of making this adjustment to F# are:
Extra informtion
Estimated cost : M
Related suggestions:
Affadavit (must be submitted)
Please tick this by placing a cross in the box:
Please tick all that apply:
The text was updated successfully, but these errors were encountered: