[GHC] #11977: ghc doesn't agree with its own inferred pattern type

GHC ghc-devs at haskell.org
Mon Apr 25 12:20:44 UTC 2016


#11977: ghc doesn't agree with its own inferred pattern type
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.1
      Resolution:                    |             Keywords:
                                     |  PatternSynonyms
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by goldfire):

 But it currently can be a type variable (when constrained by a class). If
 we don't allow functions to be matched against in this way, we lose
 substitution. This isn't a killer (it's all surface Haskell and in no way
 is a type safety issue), just a bit suboptimal to me.

 I actually think the original example looks potentially useful. I could
 see waiting until someone presents an actual use case they wish to use in
 real code, though.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11977#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list