blob: db65b5442fb998dc8eb14208e41af63edeb36971 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
-- Tests for ":show imports" and import/:module
:l shell.hs
:def shell (\s -> do shell s; return "")
:l
:show imports
import Prelude
:show imports
:shell echo "== map in scope due to explicit 'import Prelude'"
:t map
import Prelude ()
:show imports
:shell echo "== still in scope, 'import Prelude ()' is subsumed by 'import Prelude'"
:t map
:module -Prelude
:show imports
:shell echo "== still in scope, implicit import of Prelude"
:t map
import Prelude ()
:show imports
:shell echo "== not in scope now"
:t map
:module -Prelude
:show imports
:load ghci038.hs
:t x
:show imports
:shell echo ":m -Foo"
:m -Foo
:show imports
:t x
:shell echo ":m +*Foo"
:m +*Foo
:show imports
:t x
import Prelude
:show imports
import Data.Tuple hiding (swap)
:show imports
import qualified Data.Tuple as Q
:show imports
:m -Data.Tuple
:show imports
|