elm / compiler

Compiler for Elm, a functional language for reliable webapps.
https://elm-lang.org/
BSD 3-Clause "New" or "Revised" License
7.48k stars 658 forks source link

`type alias A a = a` should unify with `a` #2292

Open aforemny opened 1 year ago

aforemny commented 1 year ago

Quick Summary: type alias A a = a, A a should unify with a.

SSCCE

type alias A a = a

a : a -> A a
a = identity

Additional Details

This arose as I wanted to eliminate Node from stil4m/elm-syntax for an experiment. elm-syntax' Node is a custom type that occurs across a variety of records in a variety of files. Instead of changing all those records in all those files, I figured it'd be easier to define type alias Node a = a and only fix the single Elm.Syntax.Node module.

github-actions[bot] commented 1 year ago

Thanks for reporting this! To set expectations:

Finally, please be patient with the core team. They are trying their best with limited resources.

lue-bird commented 1 year ago

Another example of the same bug https://github.com/elm/compiler/issues/2252