diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2011-09-02 09:30:36 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2011-09-02 09:30:36 +0100 |
commit | c5fd25030f85a5058a851ad53c4e887fe832458b (patch) | |
tree | 118a2cb520587c8b5f1827696897655b9c49666c /testsuite/tests/ghci | |
parent | ef943d8288ab24df4d036243a67fe5fb3c417ce5 (diff) | |
parent | e29b6d59fef2fd16de59aa67fbb38e158676d9bf (diff) | |
download | haskell-c5fd25030f85a5058a851ad53c4e887fe832458b.tar.gz |
Merge branch 'master' of http://darcs.haskell.org/testsuite
Diffstat (limited to 'testsuite/tests/ghci')
-rw-r--r-- | testsuite/tests/ghci/scripts/Ghci025B.hs | 5 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/Ghci025C.hs | 9 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/Ghci025D.hs | 5 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/ghci025.script | 52 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/ghci025.stdout | 18 |
5 files changed, 53 insertions, 36 deletions
diff --git a/testsuite/tests/ghci/scripts/Ghci025B.hs b/testsuite/tests/ghci/scripts/Ghci025B.hs new file mode 100644 index 0000000000..3218cf6541 --- /dev/null +++ b/testsuite/tests/ghci/scripts/Ghci025B.hs @@ -0,0 +1,5 @@ +module Ghci025B (module Ghci025B, module Ghci025C) where + +import Ghci025C + +k x = x `mod` 11 diff --git a/testsuite/tests/ghci/scripts/Ghci025C.hs b/testsuite/tests/ghci/scripts/Ghci025C.hs new file mode 100644 index 0000000000..9b73b6de7b --- /dev/null +++ b/testsuite/tests/ghci/scripts/Ghci025C.hs @@ -0,0 +1,9 @@ +module Ghci025C (f, g, h) where + +import Ghci025D + +g x = f x + 1 + +h x = x `div` 2 + +data C = C {x :: Int} diff --git a/testsuite/tests/ghci/scripts/Ghci025D.hs b/testsuite/tests/ghci/scripts/Ghci025D.hs new file mode 100644 index 0000000000..94a6e85292 --- /dev/null +++ b/testsuite/tests/ghci/scripts/Ghci025D.hs @@ -0,0 +1,5 @@ +module Ghci025D where + +data T = A Int | B Float deriving Eq + +f x = x + x diff --git a/testsuite/tests/ghci/scripts/ghci025.script b/testsuite/tests/ghci/scripts/ghci025.script index 40f3e475be..588e1e403d 100644 --- a/testsuite/tests/ghci/scripts/ghci025.script +++ b/testsuite/tests/ghci/scripts/ghci025.script @@ -1,27 +1,25 @@ -:l ghci025
-System.IO.putStrLn "-- test :browse! functionality"
-System.IO.putStrLn ":browse! *T"
-:browse! *T
-System.IO.putStrLn ":browse! T"
-:browse! T
-:set -fprint-explicit-foralls
-System.IO.putStrLn ":browse! T -- with -fprint-explicit-foralls"
-:browse! T
-
-System.IO.putStrLn "-- test :browse! <target> relative to different contexts"
-:set -fforce-recomp
--- ToDo: this will go wrong in parallel
-:! cp ../prog001/D1.hs ../prog001/D.hs
-:l ../prog001/D.hs
-:add ../prog001/C.hs
-System.IO.putStrLn ":browse! C -- from *C>"
-:browse! C
-:add ../prog001/B.hs
-System.IO.putStrLn ":browse! C -- from *B>, after :add B"
-:browse! C
-:m *C
-System.IO.putStrLn ":browse! C -- from *C>, after :m *C"
-:browse! C
-:m *D
-System.IO.putStrLn ":browse! C -- from *D>, after :m *D"
-:browse! C
+:l ghci025 +System.IO.putStrLn "-- test :browse! functionality" +System.IO.putStrLn ":browse! *T" +:browse! *T +System.IO.putStrLn ":browse! T" +:browse! T +:set -fprint-explicit-foralls +System.IO.putStrLn ":browse! T -- with -fprint-explicit-foralls" +:browse! T + +System.IO.putStrLn "-- test :browse! <target> relative to different contexts" +:set -fforce-recomp +:l Ghci025D.hs +:add Ghci025C.hs +System.IO.putStrLn ":browse! Ghci025C -- from *Ghci025C>" +:browse! Ghci025C +:add Ghci025B.hs +System.IO.putStrLn ":browse! Ghci025C -- from *Ghci025B>, after :add Ghci025B" +:browse! Ghci025C +:m *Ghci025C +System.IO.putStrLn ":browse! Ghci025C -- from *Ghci025C>, after :m *Ghci025C" +:browse! Ghci025C +:m *Ghci025D +System.IO.putStrLn ":browse! Ghci025C -- from *Ghci025D>, after :m *Ghci025D" +:browse! Ghci025C diff --git a/testsuite/tests/ghci/scripts/ghci025.stdout b/testsuite/tests/ghci/scripts/ghci025.stdout index 2c8a9835dd..3650de21c2 100644 --- a/testsuite/tests/ghci/scripts/ghci025.stdout +++ b/testsuite/tests/ghci/scripts/ghci025.stdout @@ -86,26 +86,26 @@ c2 :: forall a b. (C a b, N b, S b) => a -> b c3 :: forall a b. C a b => forall a1. a1 -> b c4 :: forall a b. C a b => forall a1. a1 -> b -- test :browse! <target> relative to different contexts -:browse! C -- from *C> +:browse! Ghci025C -- from *Ghci025C> -- defined locally g :: forall a. Num a => a -> a h :: forall a. Integral a => a -> a --- imported via D +-- imported via Ghci025D f :: forall a. Num a => a -> a -:browse! C -- from *B>, after :add B --- imported via C +:browse! Ghci025C -- from *Ghci025B>, after :add Ghci025B +-- imported via Ghci025C g :: forall a. Num a => a -> a h :: forall a. Integral a => a -> a f :: forall a. Num a => a -> a -:browse! C -- from *C>, after :m *C +:browse! Ghci025C -- from *Ghci025C>, after :m *Ghci025C -- defined locally g :: forall a. Num a => a -> a h :: forall a. Integral a => a -> a --- imported via D +-- imported via Ghci025D f :: forall a. Num a => a -> a -:browse! C -- from *D>, after :m *D +:browse! Ghci025C -- from *Ghci025D>, after :m *Ghci025D -- not currently imported -C.g :: forall a. Num a => a -> a -C.h :: forall a. Integral a => a -> a +Ghci025C.g :: forall a. Num a => a -> a +Ghci025C.h :: forall a. Integral a => a -> a -- defined locally f :: forall a. Num a => a -> a |