[GHC] #11186: Give strong preference to type variable names in scope when reporting hole contexts

GHC ghc-devs at haskell.org
Sat Dec 19 06:19:01 UTC 2015


#11186: Give strong preference to type variable names in scope when reporting hole
contexts
-------------------------------------+-------------------------------------
        Reporter:  dfeuer            |                Owner:
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  7.10.2
  checker)                           |
      Resolution:                    |             Keywords:  typed-holes
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 dfeuer):

 Now that I know what to look for, I found a much smaller example:

 {{{#!hs
 {-# LANGUAGE ExistentialTypes #-}
 {-# LANGUAGE ScopedTypeVariables #-}

 data Foop = forall xx . Foop xx

 blah (Foop (q :: pah)) = _
 }}}

 Here GHC again ignores the requested `pah` variable in favor of `xx`.

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


More information about the ghc-tickets mailing list