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
At the moment, the rule doesn't report the destructuring of single variant constructors when we don't know whether the type has any phantom types (as that could be the purpose of the destructuring).
This correctly doesn't get reported.
type A b =AStringa =let (A b)= xyz
in A b
But if the outer function has a type signature, and the return type is the same as the type of the value, then there is no need to destructure the value.
moduleAexposing (..)
type A b =AString-- should be simplifiedxyz:AStringxyz =-- ...-- Can be simplifieda:AStringa n =let (A b)= xyz
in A b
This probably needs type inference to work correctly.
The text was updated successfully, but these errors were encountered:
At the moment, the rule doesn't report the destructuring of single variant constructors when we don't know whether the type has any phantom types (as that could be the purpose of the destructuring).
This correctly doesn't get reported.
But if the outer function has a type signature, and the return type is the same as the type of the value, then there is no need to destructure the value.
This probably needs type inference to work correctly.
The text was updated successfully, but these errors were encountered: