[GHC] #8417: Pattern matching on OverloadedLists is erratic

#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

#8417: Pattern matching on OverloadedLists is erratic ------------------------------------------------+-------------------------- Reporter: monoidal | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler (Type checker) | Version: 7.7 Resolution: invalid | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC accepts invalid program | Unknown/Multiple Test Case: | Difficulty: Blocking: | Unknown | Blocked By: | Related Tickets: ------------------------------------------------+-------------------------- Changes (by monoidal): * status: new => closed * resolution: => invalid Comment: I'm wrong, `not` works as a wildcard pattern. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8417#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC