elm/compiler

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

aforemny opened this issue · 2 comments

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
  • Elm: 0.19.1
  • Browser: N/A
  • Operating System: NixOS 23.05pre-git (Stoat)

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.

Thanks for reporting this! To set expectations:

  • Issues are reviewed in batches, so it can take some time to get a response.
  • Ask questions in a community forum. You will get an answer quicker that way!
  • If you experience something similar, open a new issue. We like duplicates.

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

Another example of the same bug #2252