Stream: beginners

Topic: Panic from Type alias unification


view this post on Zulip Dillon Kearns (Dec 01 2021 at 17:53):

I've found a few places where replacing a tag union literal with a type alias of the same type works in some spots, but crashes the compiler in other places. The error message looks like:

Mismatch in compiler/unify/src/unify.rs Line 1078 Column 13
Trying to unify two flat types that are incompatible: [ Global('Equality') [1260, 1261], ]<2> ~ Apply(`Test.Reason`, [])

Would it be helpful to create a minimal reproduction and report that somewhere? Or maybe it's a known issue?

view this post on Zulip Richard Feldman (Dec 01 2021 at 17:55):

Would it be helpful to create a minimal reproduction and report that somewhere?

yes please, that would be fantastic! :100:

opening an issue at https://github.com/rtfeldman/roc/issues would be ideal

view this post on Zulip Dillon Kearns (Dec 01 2021 at 18:13):

I believe it's related to using a type alias alongside record destructuring. Here's the GH issue: https://github.com/rtfeldman/roc/issues/2122.


Last updated: Jul 26 2025 at 12:14 UTC