diff options
author | David Terei <davidterei@gmail.com> | 2011-07-20 11:09:03 -0700 |
---|---|---|
committer | David Terei <davidterei@gmail.com> | 2011-07-20 11:26:35 -0700 |
commit | 16514f272fb42af6e9c7674a9bd6c9dce369231f (patch) | |
tree | e4f332b45fe65e2a7a2451be5674f887b42bf199 /testsuite/tests/ghci/prog010 | |
parent | ebd422aed41048476aa61dd4c520d43becd78682 (diff) | |
download | haskell-16514f272fb42af6e9c7674a9bd6c9dce369231f.tar.gz |
Move tests from tests/ghc-regress/* to just tests/*
Diffstat (limited to 'testsuite/tests/ghci/prog010')
-rw-r--r-- | testsuite/tests/ghci/prog010/A.hs | 5 | ||||
-rw-r--r-- | testsuite/tests/ghci/prog010/B.hs | 3 | ||||
-rw-r--r-- | testsuite/tests/ghci/prog010/ghci.prog010.script | 33 | ||||
-rw-r--r-- | testsuite/tests/ghci/prog010/ghci.prog010.stderr | 2 | ||||
-rw-r--r-- | testsuite/tests/ghci/prog010/ghci.prog010.stdout | 9 |
5 files changed, 52 insertions, 0 deletions
diff --git a/testsuite/tests/ghci/prog010/A.hs b/testsuite/tests/ghci/prog010/A.hs new file mode 100644 index 0000000000..0a779b2cf0 --- /dev/null +++ b/testsuite/tests/ghci/prog010/A.hs @@ -0,0 +1,5 @@ +module A (f) where + +f x = [x] + +g x = Just x diff --git a/testsuite/tests/ghci/prog010/B.hs b/testsuite/tests/ghci/prog010/B.hs new file mode 100644 index 0000000000..ce9e7e4932 --- /dev/null +++ b/testsuite/tests/ghci/prog010/B.hs @@ -0,0 +1,3 @@ +module B where + +import A diff --git a/testsuite/tests/ghci/prog010/ghci.prog010.script b/testsuite/tests/ghci/prog010/ghci.prog010.script new file mode 100644 index 0000000000..563e471a59 --- /dev/null +++ b/testsuite/tests/ghci/prog010/ghci.prog010.script @@ -0,0 +1,33 @@ +-- test for #1205 + +:l ../shell.hs +:def shell (\s -> do shell s; return "") + +:shell rm -f A.o A.hi B.o B.hi + +:load A +-- we can see both f and g (only f is exported) +:type f +:type g + +:shell $HC $HC_OPTS -fforce-recomp -c A.hs + +:load A +-- we can now see only f +:type f +:type g +-- this will tell us we need to load A interpreted +:module *A + +-- load A interpreted +:load *A +:type f +:type g + +:shell $HC $HC_OPTS -fforce-recomp -c B.hs +:load B +:module *A +:add *A +:module *A +:type f +:type g diff --git a/testsuite/tests/ghci/prog010/ghci.prog010.stderr b/testsuite/tests/ghci/prog010/ghci.prog010.stderr new file mode 100644 index 0000000000..c7cbb1173f --- /dev/null +++ b/testsuite/tests/ghci/prog010/ghci.prog010.stderr @@ -0,0 +1,2 @@ + +<interactive>:1:0: Not in scope: `g' diff --git a/testsuite/tests/ghci/prog010/ghci.prog010.stdout b/testsuite/tests/ghci/prog010/ghci.prog010.stdout new file mode 100644 index 0000000000..ccb6dcd78f --- /dev/null +++ b/testsuite/tests/ghci/prog010/ghci.prog010.stdout @@ -0,0 +1,9 @@ +f :: t -> [t] +g :: a -> Maybe a +f :: t -> [t] +module 'A' is not interpreted; try ':add *A' first +f :: t -> [t] +g :: a -> Maybe a +module 'A' is not interpreted; try ':add *A' first +f :: t -> [t] +g :: a -> Maybe a |