[GHC] #15882: :load in ghci should expose the entire namespace of a module

#15882: :load in ghci should expose the entire namespace of a module -------------------------------------+------------------------------------- Reporter: EyalLotem | Owner: (none) Type: feature | Status: new request | Priority: normal | Milestone: 8.6.3 Component: GHCi | Version: 8.6.2 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- When using "import" in ghci, only exported names are available. When using :load, the use case is typically for "toying around" or testing a module. In that case, the export list restrictions are much less useful. There is currently no way to just expose the same namespace context of the code in a module in ghci, and having :load do that sounds like it would be very useful. The ordinary "import" namespace semantics are after all available too. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15882 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15882: :load in ghci should expose the entire namespace of a module -------------------------------------+------------------------------------- Reporter: EyalLotem | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: 8.6.3 Component: GHCi | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by EyalLotem): Another way to put this is: * :load of a Haskell file should be roughly equivalent to copy&pasting the code of that module in ghci. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15882#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15882: :load in ghci should expose the entire namespace of a module -------------------------------------+------------------------------------- Reporter: EyalLotem | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: Component: GHCi | Version: 8.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by adamse): I think you're describing the current behaviour: {{{ $ cat T.hs module T (f) where import Data.Monoid f :: Int f = 2 g :: Double g = 2 $ ghci GHCi, version 8.6.1: http://www.haskell.org/ghc/ :? for help :l Loaded GHCi configuration from /Users/adam/.ghci Prelude> :l T [1 of 1] Compiling T ( T.hs, interpreted ) ... Ok, one module loaded. *T> g 2.0 it :: Double *T> :t Sum Sum :: a -> Sum a }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15882#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC