[GHC] #13881: Inexplicable error message when using out-of-scope type variable in pattern type signature

GHC ghc-devs at haskell.org
Thu Jun 29 14:31:05 UTC 2017


#13881: Inexplicable error message when using out-of-scope type variable in pattern
type signature
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.0.1
  checker)                           |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Poor/confusing    |  Unknown/Multiple
  error message                      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Simon Peyton Jones <simonpj@…>):

 In [changeset:"3b0e7555fafe73b157a96ca48d8ddc04ad81b231/ghc"
 3b0e7555/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="3b0e7555fafe73b157a96ca48d8ddc04ad81b231"
 Fix lexically-scoped type variables

 Trac #13881 showed that our handling of lexically scoped type
 variables was way off when we bring into scope a name 'y' for
 a pre-existing type variable 'a', perhaps with an entirely
 different name.

 This patch fixes it; see TcHsType
   Note [Pattern signature binders]
 }}}

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


More information about the ghc-tickets mailing list