Skip to content

Name is reported as ambiguous and not in scope

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.

Trac metadata
Trac field Value
Version 8.0.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information