Skip to content

Shorter import syntax

It would be helpful to support a short syntax for importing unqualified identifiers while establishing a short qualified name. An example of the proposed syntax is,

import Data.Map (Map) as M

The desired semantics are that Map be imported unqualified, and M be defined as an alias for Data.Map. This replaces the existing convention of writing,

import Data.Map (Map)
import qualified Data.Map as M

The proposed syntax is currently an error, I think, so adding support for it should not break anything.

Trac metadata
Trac field Value
Version 7.10.1
Type FeatureRequest
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