I entered an identity type alias, but elm refuses to unify LHS and RHS of the type alias later.
SSCCE
module Both.Msg exposing (..)
type alias Msg a = a
make : a -> Msg a
make = 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
module Both.Msg exposing (..)
type alias Msg a = a
make : Msg a -> a
make = identity
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.