diff options
author | simonmar <unknown> | 2001-01-18 12:54:17 +0000 |
---|---|---|
committer | simonmar <unknown> | 2001-01-18 12:54:17 +0000 |
commit | 0ef29fb878dd6517d2716afb056bcf2536c2562e (patch) | |
tree | bc0c0214e0d9e4e5a799b5f16a0158b323ccf32b /ghc/compiler/rename/RnMonad.lhs | |
parent | fb2442c0498868330476f5fdde46339eab68e72d (diff) | |
download | haskell-0ef29fb878dd6517d2716afb056bcf2536c2562e.tar.gz |
[project @ 2001-01-18 12:54:16 by simonmar]
Make the GHCi command line behave as if an "import qualified M" was in
force for all M.
The renamer now has a new "mode": CmdLineMode, which changes the
lookup machinery to turn a qualified lookup into an original name
lookup if the qualified name isn't otherwise in scope.
Diffstat (limited to 'ghc/compiler/rename/RnMonad.lhs')
-rw-r--r-- | ghc/compiler/rename/RnMonad.lhs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ghc/compiler/rename/RnMonad.lhs b/ghc/compiler/rename/RnMonad.lhs index 2a795e5484..5a215abfe9 100644 --- a/ghc/compiler/rename/RnMonad.lhs +++ b/ghc/compiler/rename/RnMonad.lhs @@ -166,8 +166,12 @@ data SDown = SDown { -- with RnIfaces.lookupLocalFixity } -data RnMode = SourceMode -- Renaming source code - | InterfaceMode -- Renaming interface declarations. +data RnMode = SourceMode -- Renaming source code + | InterfaceMode -- Renaming interface declarations. + | CmdLineMode -- Renaming a command-line expression + +isInterfaceMode InterfaceMode = True +isInterfaceMode _ = False \end{code} %=================================================== |