[GHC] #13568: Name is reported as ambiguous and not in scope

GHC ghc-devs at haskell.org
Wed Apr 12 17:47:54 UTC 2017


#13568: Name is reported as ambiguous and not in scope
-------------------------------------+-------------------------------------
           Reporter:  mpickering     |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.0.1
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 {{{
 module A where

 data T = A
 }}}

 {{{
 module B where

 import A

 data S = A

 foo :: A -> ()
 foo = undefined
 }}}

 Compiling this example, the usage of `A` in `foo` is reported as both
 ambiguous and out of scope.

 I haven't mentioned data kinds at all so `A` should certainly refer to a
 type constructor which isn't in scope. The problem is that `DataKinds` is
 checked too late in `lookup_demoted`.

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


More information about the ghc-tickets mailing list