compiler icon indicating copy to clipboard operation
compiler copied to clipboard

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

Open aforemny opened this issue 2 years ago • 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.

aforemny avatar Dec 30 '22 08:12 aforemny

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.

github-actions[bot] avatar Dec 30 '22 08:12 github-actions[bot]

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

lue-bird avatar Dec 30 '22 08:12 lue-bird