Opened 4 years ago

Closed 4 years ago

#4300 closed bug (fixed)

:show packages does not list all loaded packages

Reported by: claus Owned by: igloo
Priority: normal Milestone: 7.0.1
Component: GHCi Version: 6.12.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

GHCi's :show packages seems to have bit-rotted, no longer listing all loaded packages:

$ printf "Data.Map.fromList [(1,2)]\n:show packages" | ghc.exe --interactive  -ignore-dot-ghci
GHCi, version 6.12.3: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package ffi-1.0 ... linking ... done.
Prelude> Loading package array-0.3.0.1 ... linking ... done.
Loading package containers-0.3.0.0 ... linking ... done.
fromList [(1,2)]
Prelude> active package flags: none
packages currently loaded:
  base
  ffi-1.0
  ghc-prim
  integer-gmp
  rts
Prelude> Leaving GHCi.

Note that containers and array are loaded when the call to Data.Map.fromList is made, but the packages are not listed in the output of :show packages.

If it helps, :show linker does list the extra packages:

$ printf "Data.Map.fromList [(1,2)]\n:show linker" | ghc.exe --interactive  -ignore-dot-ghci
GHCi, version 6.12.3: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package ffi-1.0 ... linking ... done.
Prelude> Loading package array-0.3.0.1 ... linking ... done.
Loading package containers-0.3.0.0 ... linking ... done.
fromList [(1,2)]
Prelude> ----- Linker state -----
Pkgs: [containers-0.3.0.0, array-0.3.0.1, ffi-1.0, base,
       integer-gmp, ghc-prim, rts]
Objs: []
BCOs: []

Prelude> Leaving GHCi.

Change History (2)

comment:1 Changed 4 years ago by igloo

  • Milestone set to 7.0.1
  • Owner set to igloo

comment:2 Changed 4 years ago by igloo

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

As far as I can see, it's never worked, and as you say, the information is available via :show linker, so I've just removed the incorrect output:

Thu Sep 30 14:01:28 PDT 2010  Ian Lynagh <igloo@earth.li>
  * Don't show the loaded packages in ":show packages"; fixes #4300
  It's never worked properly, and the information is in ":show linker".
Note: See TracTickets for help on using tickets.