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
I entered an identity type alias, but elm refuses to unify LHS and RHS of the type alias later.
SSCCE
moduleBoth.Msgexposing (..)
type alias Msg a = a
make:a->Msgamake = identity
=>
Something is off with the body of the `make` definition:
6| make = identity
^^^^^^^^
This `identity` value is a:
a -> a
But the type annotation on `make` says it should be:
a -> Msg a
Elm:0.19.1
Browser: irrelevant
Operating System: irrelevant
Additional Details
Msg a and a, for all a, by definition, have to be the same type. Yet, Elm refuses to acknowledge that anything a is also Msg a.
Funny thing, the code
moduleBoth.Msgexposing (..)
type alias Msg a = a
make:Msga->amake = identity
compiles just fine.
The text was updated successfully, but these errors were encountered:
Quick Summary:
I entered an identity type alias, but elm refuses to unify LHS and RHS of the type alias later.
SSCCE
=>
0.19.1
Additional Details
Msg a
anda
, for alla
, by definition, have to be the same type. Yet, Elm refuses to acknowledge that anythinga
is alsoMsg a
.Funny thing, the code
compiles just fine.
The text was updated successfully, but these errors were encountered: