
#8417: Pattern matching on OverloadedLists is erratic -------------------------------------+------------------------------------- Reporter: monoidal | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 7.7 checker) | Operating System: Unknown/Multiple Keywords: | Type of failure: GHC accepts Architecture: Unknown/Multiple | invalid program Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | -------------------------------------+------------------------------------- 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`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8417 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler