Opened 6 years ago

Closed 5 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: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

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 6 years ago by tibbe

  • Operating System changed from Unknown to Multiple
  • Version set to 6.8.1

comment:2 Changed 6 years ago by Remi

  • Cc rturk@… added

comment:3 Changed 6 years ago by igloo

  • Difficulty set to Unknown
  • Milestone set to 6.8 branch

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

comment:4 Changed 6 years ago by igloo

  • Milestone changed from 6.8 branch to 6.10 branch

comment:5 Changed 6 years ago by jcpetruzza

  • Cc jcpetruzza@… added

comment:6 Changed 6 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 6 years ago by guest

  • Cc cgibbard@… added

comment:8 Changed 6 years ago by ertai

  • Cc nicolas.pouillard@… added

comment:9 Changed 6 years ago by Toxaris

  • Cc rendel@… added

comment:10 Changed 6 years ago by thoughtpolice

  • Cc mad.one@… added

comment:11 Changed 6 years ago by simonmar

  • Architecture changed from Multiple to Unknown/Multiple

comment:12 Changed 6 years ago by simonmar

  • Operating System changed from Multiple to Unknown/Multiple

comment:13 Changed 6 years ago by morrow

  • Cc mjm2002@… added

comment:14 Changed 5 years ago by igloo

  • Priority changed from normal to high

Many CCed, so making high priority

comment:15 Changed 5 years ago by simonmar

This would be subsumed by

#2362
allow full import syntax in GHCi

.

comment:16 Changed 5 years ago by igloo

  • Milestone changed from 6.10 branch to 6.12.1

comment:17 Changed 5 years ago by simonmar

  • Resolution set to duplicate
  • Status changed from new to closed

closing to merge with #2362

Note: See TracTickets for help on using tickets.