Skip to content

Mistake in error messages for importing infix constructors

With the following import statement:

import Data.Sequence((:<))

GHC provides the error:

test.hs:1:22:
    In module `Data.Sequence':
      `:<' is a data constructor of `ViewL'
    To import it use
      `import Data.Sequence (ViewL (:<))'
    or
      `import Data.Sequence (ViewL (..))'
Failed, modules loaded: none.

However, that first "fix" isn't correct: it should be:

import Data.Sequence(ViewL((:<)))

(which is a bit of a mouthful :p).

I don't have access to 7.2.1, so I'm not sure if this error still exists.

Trac metadata
Trac field Value
Version 7.0.4
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