Opened 9 years ago

Closed 8 years ago

#1895 closed feature request (duplicate)

Allow aliases in GHCi module imports

Reported by: tibbe Owned by:
Priority: high Milestone: 6.12.1
Component: GHCi Version: 6.8.1
Keywords: Cc: rturk@…, jcpetruzza@…, gwern0@…, cgibbard@…, nicolas.pouillard@…, rendel@…, mad.one@…, mjm2002@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

It would be convenient if it was possible to import a package in GHCi under another name.

:m +Data.ByteString.Lazy.Char8 as B

This is especially useful with modules like Data.ByteString which names collide with Prelude.

Change History (17)

comment:1 Changed 9 years ago by tibbe

Operating System: UnknownMultiple
Version: 6.8.1

comment:2 Changed 9 years ago by Remi

Cc: rturk@… added

comment:3 Changed 9 years ago by igloo

difficulty: Unknown
Milestone: 6.8 branch

This would also keep the prompt width down, which would be nice.

comment:4 Changed 9 years ago by igloo

Milestone: 6.8 branch6.10 branch

comment:5 Changed 9 years ago by jcpetruzza

Cc: jcpetruzza@… added

comment:6 Changed 9 years ago by guest

Cc: gwern0@… added

Speaking for myself, I really hope that when this is fixed, it'll be easy to load modules qualified via the GHC API. This would let me fix mueval so things like 'mueval -e "Map.map (+1) $ Map.fromList [(1,2)]' could work.

(Which is valuable since I use mueval in Lambdabot, and Lambdabot users expect to be able to use qualified imports.)

comment:7 Changed 9 years ago by guest

Cc: cgibbard@… added

comment:8 Changed 9 years ago by ertai

Cc: nicolas.pouillard@… added

comment:9 Changed 9 years ago by Toxaris

Cc: rendel@… added

comment:10 Changed 9 years ago by thoughtpolice

Cc: mad.one@… added

comment:11 Changed 8 years ago by simonmar

Architecture: MultipleUnknown/Multiple

comment:12 Changed 8 years ago by simonmar

Operating System: MultipleUnknown/Multiple

comment:13 Changed 8 years ago by morrow

Cc: mjm2002@… added

comment:14 Changed 8 years ago by igloo

Priority: normalhigh

Many CCed, so making high priority

comment:15 Changed 8 years ago by simonmar

This would be subsumed by

#2362
allow full import syntax in GHCi

.

comment:16 Changed 8 years ago by igloo

Milestone: 6.10 branch6.12.1

comment:17 Changed 8 years ago by simonmar

Resolution: duplicate
Status: newclosed

closing to merge with #2362

Note: See TracTickets for help on using tickets.