Skip to content

Decomposition rule for equalities is too weak in case of higher-kinded type families

foo :: (F Int a ~ F Int [a]) => a -> [a]
foo = undefined

gives us

    Occurs check: cannot construct the infinite type: a = [a]

but

foo :: (F Int a ~ F Bool [a]) => a -> [a]
foo = undefined

doesn't - although both should lead to the same error.

Trac metadata
Trac field Value
Version 6.9
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler (Type checker)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Multiple
Architecture Multiple
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information