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

GHC ghc-devs
Mon Oct 7 16:39:11 UTC 2013


#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



More information about the ghc-tickets mailing list