Skip to content

Wrong error messages with qualified imports

If the same identifier is imported qualified twice, then only the second qualified name is used in error messages.

Steps to reproduce:

module Foo where
import qualified Bar
import qualified SomeOtherModule
foo :: Integer
foo = Bar.bar
module Bar (bar) where
bar :: Int
bar = 23
module SomeOtherModule (bar) where
import Bar

expected result:

Foo.hs:5:7:
    Couldn't match expected type `Integer' with actual type `Int'
    In the expression: Bar.bar
    In an equation for `foo': foo = Bar.bar

actual result:

Foo.hs:5:7:
    Couldn't match expected type `Integer' with actual type `Int'
    In the expression: SomeOtherModule.bar
    In an equation for `foo': foo = SomeOtherModule.bar
Trac metadata
Trac field Value
Version 7.4.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