Pattern matching on OverloadedLists is erratic
Consider
λ> :set -XOverloadedLists
λ> :t \[True] -> 'a'
\[True] -> 'a' :: (GHC.Exts.IsList l, GHC.Exts.Item l ~ Bool) => l -> Char
λ> :t \[not] -> 'a'
\[not] -> 'a' :: GHC.Exts.IsList l => l -> Char
The first type is expected, but the second one should include GHC.Exts.Item l ~ Bool -> Bool
and Eq (Bool -> Bool)
. Currently e.g. (\[not] -> True) [id]
evaluates to True
.
Trac metadata
Trac field | Value |
---|---|
Version | 7.7 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler (Type checker) |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |