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

GHC ghc-devs at haskell.org
Wed Dec 9 16:12:49 UTC 2015


#11186: Give strong preference to type variable names in scope when reporting hole
contexts
-------------------------------------+-------------------------------------
           Reporter:  dfeuer         |             Owner:
               Type:  feature        |            Status:  new
  request                            |
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  7.10.2
  (Type checker)                     |
           Keywords:  typed-holes    |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 When using `ScopedTypeVariables` with typed holes, I want GHC to bend over
 backwards to preserve the names of type variables that the user has chosen
 to bring into scope. I can't immediately reproduce the situations I've run
 into recently where that hasn't happened, but sometimes I've had a
 signature like

 {{{#!hs
 foo :: forall bar . ...
 foo = ... _ ...
 }}}

 and yet the typed hole message shows that `bar` has been lost in
 unification and replaced by some unrelated name. I would very much prefer
 if this never happened.

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


More information about the ghc-tickets mailing list