[project @ 2001-03-20 10:13:06 by simonmar]
authorsimonmar <unknown>
Tue, 20 Mar 2001 10:13:06 +0000 (10:13 +0000)
committersimonmar <unknown>
Tue, 20 Mar 2001 10:13:06 +0000 (10:13 +0000)
GHCi test update

12 files changed:
ghc/tests/ghci/ghci001.stdout [new file with mode: 0644]
ghc/tests/ghci/ghci003.script [new file with mode: 0644]
ghc/tests/ghci/ghci003.stdout [new file with mode: 0644]
ghc/tests/ghci/prog001/prog001.script
ghc/tests/ghci/prog001/prog001.stderr
ghc/tests/ghci/prog001/prog001.stdout
ghc/tests/ghci/prog002/prog002.script
ghc/tests/ghci/prog002/prog002.stderr
ghc/tests/ghci/prog002/prog002.stdout
ghc/tests/ghci/prog003/prog003.script
ghc/tests/ghci/prog003/prog003.stderr
ghc/tests/ghci/prog003/prog003.stdout

diff --git a/ghc/tests/ghci/ghci001.stdout b/ghc/tests/ghci/ghci001.stdout
new file mode 100644 (file)
index 0000000..9fd44f8
--- /dev/null
@@ -0,0 +1,13 @@
+   ___         ___ _
+  / _ \ /\  /\/ __(_)
+ / /_\// /_/ / /  | |      GHC Interactive, version 4.11, For Haskell 98.
+/ /_\\/ __  / /___| |      http://www.haskell.org/ghc/
+\____/\/ /_/\____/|_|      Type :? for help.
+
+Loading package std ... linking ... done.
+Prelude> -- bug: shouldn't be defaulting these expressions
+Prelude> :type (+)
+forall a. (Num a) => a -> a -> a
+Prelude> :type enumFromTo
+forall a. (Enum a) => a -> a -> [a]
+Prelude> Leaving GHCi.
diff --git a/ghc/tests/ghci/ghci003.script b/ghc/tests/ghci/ghci003.script
new file mode 100644 (file)
index 0000000..08d0114
--- /dev/null
@@ -0,0 +1,7 @@
+-- check that 'it' works
+1
+it
+print it
+return 42
+it
+print it
diff --git a/ghc/tests/ghci/ghci003.stdout b/ghc/tests/ghci/ghci003.stdout
new file mode 100644 (file)
index 0000000..7bfabbe
--- /dev/null
@@ -0,0 +1,20 @@
+   ___         ___ _
+  / _ \ /\  /\/ __(_)
+ / /_\// /_/ / /  | |      GHC Interactive, version 4.11, For Haskell 98.
+/ /_\\/ __  / /___| |      http://www.haskell.org/ghc/
+\____/\/ /_/\____/|_|      Type :? for help.
+
+Loading package std ... linking ... done.
+Prelude> -- check that 'it' works
+Prelude> 1
+1
+Prelude> it
+1
+Prelude> print it
+1
+Prelude> return 42
+Prelude> it
+42
+Prelude> print it
+42
+Prelude> Leaving GHCi.
index 7a1810c..2678b68 100644 (file)
@@ -1,5 +1,5 @@
--- first, tidy up:
 :unset +s
+-- first, tidy up:
 :! rm -f *.hi *.o *~
 :! cp D1.hs D.hs
 
index 78d36fb..efb352f 100644 (file)
@@ -1,13 +1,15 @@
-Compiling D            (D.hs)
-Compiling C            (C.hs)
-Compiling B            (B.hs)
-Compiling Main         (A.hs)
-Compiling D            (D.hs)
-Skipping  C            (C.hs)
-Skipping  B            (B.hs)
-Skipping  Main         (A.hs)
-Skipping  D            (D.hs)
- (using D.o)
-Compiling C            (C.hs)
-Compiling B            (B.hs)
-Compiling Main         (A.hs)
+Compiling D                ( D.hs, interpreted )
+Compiling C                ( C.hs, interpreted )
+Compiling B                ( B.hs, interpreted )
+Compiling Main             ( A.hs, interpreted )
+Compiling C                ( C.hs, interpreted )
+Skipping  B                ( B.hs, interpreted )
+Skipping  Main             ( A.hs, interpreted )
+Compiling D                ( D.hs, interpreted )
+Skipping  C                ( C.hs, interpreted )
+Skipping  B                ( B.hs, interpreted )
+Skipping  Main             ( A.hs, interpreted )
+Skipping  D                ( D.hs, D.o )
+Compiling C                ( C.hs, interpreted )
+Compiling B                ( B.hs, interpreted )
+Compiling Main             ( A.hs, interpreted )
index 521f1d6..7f340a7 100644 (file)
@@ -5,8 +5,8 @@
 \____/\/ /_/\____/|_|      Type :? for help.
 
 Loading package std ... linking ... done.
-Prelude> -- first, tidy up:
 Prelude> :unset +s
+Prelude> -- first, tidy up:
 Prelude> :! rm -f *.hi *.o *~
 Prelude> :! cp D1.hs D.hs
 Prelude> 
index f81eea6..5f9b8bb 100644 (file)
@@ -1,6 +1,7 @@
+:unset +s
+:unset +t
 -- first, clean up:
 :! rm -f *.hi *.o *~
-:unset +s
 :! cp A1.hs A.hs
 
 :load D
index 55a038a..f5d782d 100644 (file)
@@ -1,17 +1,16 @@
-Compiling A            (A.hs)
-Compiling B            (B.hs)
-Compiling C            (C.hs)
-Compiling Main         (D.hs)
-Compiling A            (A.hs)
-Compiling B            (B.hs)
-Skipping  C            (C.hs)
-Compiling Main         (D.hs)
-Skipping  A            (A.hs)
- (using A.o)
-Compiling B            (B.hs)
-Compiling C            (C.hs)
-Compiling Main         (D.hs)
-Compiling A            (A.hs)
-Skipping  B            (B.hs)
-Skipping  C            (C.hs)
-Skipping  Main         (D.hs)
+Compiling A                ( A.hs, interpreted )
+Compiling B                ( B.hs, interpreted )
+Compiling C                ( C.hs, interpreted )
+Compiling Main             ( D.hs, interpreted )
+Compiling A                ( A.hs, interpreted )
+Compiling B                ( B.hs, interpreted )
+Compiling C                ( C.hs, interpreted )
+Compiling Main             ( D.hs, interpreted )
+Skipping  A                ( A.hs, A.o )
+Compiling B                ( B.hs, interpreted )
+Compiling C                ( C.hs, interpreted )
+Compiling Main             ( D.hs, interpreted )
+Compiling A                ( A.hs, interpreted )
+Skipping  B                ( B.hs, interpreted )
+Skipping  C                ( C.hs, interpreted )
+Skipping  Main             ( D.hs, interpreted )
index 51c51e1..eb7d354 100644 (file)
@@ -5,9 +5,10 @@
 \____/\/ /_/\____/|_|      Type :? for help.
 
 Loading package std ... linking ... done.
+Prelude> :unset +s
+Prelude> :unset +t
 Prelude> -- first, clean up:
 Prelude> :! rm -f *.hi *.o *~
-Prelude> :unset +s
 Prelude> :! cp A1.hs A.hs
 Prelude> 
 Prelude> :load D
index 0c67663..594c688 100644 (file)
@@ -1,3 +1,5 @@
+:unset +s
+:unset +t
 -- A small multi-module program, with 4 modules, Main, B, C, D.  B & C
 -- depend on D, and A depends on B & C.
 -- 
@@ -7,7 +9,6 @@
 
 -- clean up
 :! rm *.o *.hi
-:unset +s
 :! cp D1.hs D.hs
 
 :load A
@@ -50,6 +51,7 @@ a 42
 a 42
 
 -- D,C,A compiled  (better not use A.o)
+:! rm B.o
 :load A
 :type (Main.a,B.b,C.c,D.d)
 a 42
@@ -69,5 +71,6 @@ a 42
 -- A,B,C compiled (better not use A.o, B.o, C.o)
 :! $HC $HC_OPTS --make A
 :! rm D.o
+:load A
 :type (Main.a,B.b,C.c,D.d)
 a 42
index 9f58f38..d4a49dc 100644 (file)
@@ -1,58 +1,46 @@
-Compiling D            (D.hs)
-Compiling C            (C.hs)
-Compiling B            (B.hs)
-Compiling Main         (A.hs)
-Compiling D            (D.hs)
-Compiling C            (C.hs)
-Compiling B            (B.hs)
-Compiling Main         (A.hs)
-Skipping  D            (D.hs)
- (using D.o)
-Compiling C            (C.hs)
-Compiling B            (B.hs)
-Compiling Main         (A.hs)
-Skipping  D            (D.hs)
- (using D.o)
-Skipping  C            (C.hs)
- (using C.o)
-Compiling B            (B.hs)
-Compiling Main         (A.hs)
-Skipping  D            (D.hs)
- (using D.o)
-Skipping  C            (C.hs)
- (using C.o)
-Skipping  B            (B.hs)
- (using B.o)
-Compiling Main         (A.hs)
-Skipping  D            (D.hs)
- (using D.o)
-Skipping  C            (C.hs)
- (using C.o)
-Skipping  B            (B.hs)
- (using B.o)
-Skipping  Main         (A.hs)
- (using ./A.o)
-Skipping  D            (D.hs)
- (using D.o)
-Skipping  C            (C.hs)
- (using C.o)
-Skipping  B            (B.hs)
- (using B.o)
-Skipping  Main         (A.hs)
- (using ./A.o)
-Skipping  D            (D.hs)
- (using D.o)
-Compiling C            (C.hs)
-Skipping  B            (B.hs)
- (using B.o)
-Compiling Main         (A.hs)
-Compiling D            (D.hs)
-Compiling C            (C.hs)
-Compiling B            (B.hs)
-Compiling Main         (A.hs)
+Compiling D                ( D.hs, interpreted )
+Compiling C                ( C.hs, interpreted )
+Compiling B                ( B.hs, interpreted )
+Compiling Main             ( A.hs, interpreted )
+Compiling D                ( D.hs, interpreted )
+Compiling C                ( C.hs, interpreted )
+Compiling B                ( B.hs, interpreted )
+Compiling Main             ( A.hs, interpreted )
+Skipping  D                ( D.hs, D.o )
+Compiling C                ( C.hs, interpreted )
+Compiling B                ( B.hs, interpreted )
+Compiling Main             ( A.hs, interpreted )
+Skipping  D                ( D.hs, D.o )
+Skipping  C                ( C.hs, C.o )
+Compiling B                ( B.hs, interpreted )
+Compiling Main             ( A.hs, interpreted )
+Skipping  D                ( D.hs, D.o )
+Skipping  C                ( C.hs, C.o )
+Skipping  B                ( B.hs, B.o )
+Compiling Main             ( A.hs, interpreted )
+Skipping  D                ( D.hs, D.o )
+Skipping  C                ( C.hs, C.o )
+Skipping  B                ( B.hs, B.o )
+Skipping  Main             ( A.hs, ./A.o )
+Skipping  D                ( D.hs, D.o )
+Skipping  C                ( C.hs, C.o )
+Compiling B                ( B.hs, interpreted )
+Compiling Main             ( A.hs, interpreted )
+Skipping  D                ( D.hs, D.o )
+Compiling C                ( C.hs, interpreted )
+Compiling B                ( B.hs, interpreted )
+Compiling Main             ( A.hs, interpreted )
+Compiling D                ( D.hs, interpreted )
+Compiling C                ( C.hs, interpreted )
+Compiling B                ( B.hs, interpreted )
+Compiling Main             ( A.hs, interpreted )
 ghc: chasing modules from: A
-Compiling D            (D.hs)
-Compiling C            (C.hs)
-Compiling B            (B.hs)
-Compiling Main         (A.hs)
+Compiling D                ( D.hs, D.o )
+Compiling C                ( C.hs, C.o )
+Compiling B                ( B.hs, B.o )
+Compiling Main             ( A.hs, ./A.o )
 ghc: linking ...
+Compiling D                ( D.hs, interpreted )
+Compiling C                ( C.hs, interpreted )
+Compiling B                ( B.hs, interpreted )
+Compiling Main             ( A.hs, interpreted )
index 8de758d..96e8b34 100644 (file)
@@ -5,6 +5,8 @@
 \____/\/ /_/\____/|_|      Type :? for help.
 
 Loading package std ... linking ... done.
+Prelude> :unset +s
+Prelude> :unset +t
 Prelude> -- A small multi-module program, with 4 modules, Main, B, C, D.  B & C
 Prelude> -- depend on D, and A depends on B & C.
 Prelude> -- 
@@ -14,7 +16,6 @@ Prelude> -- sensibly.
 Prelude> 
 Prelude> -- clean up
 Prelude> :! rm *.o *.hi
-Prelude> :unset +s
 Prelude> :! cp D1.hs D.hs
 Prelude> 
 Prelude> :load A
@@ -81,13 +82,11 @@ Main> a 42
 28.0
 Main> 
 Main> -- D,C,A compiled  (better not use A.o)
+Main> :! rm B.o
 Main> :load A
 Ok, modules loaded: Main, B, C, D.
 Main> :type (Main.a,B.b,C.c,D.d)
-(PrelFloat.Float -> PrelFloat.Float,
- PrelFloat.Float -> PrelFloat.Float,
- PrelFloat.Float -> PrelFloat.Float,
- PrelFloat.Float -> PrelFloat.Float)
+(Float -> Float, Float -> Float, Float -> Float, Float -> Float)
 Main> a 42
 28.0
 Main> 
@@ -112,6 +111,8 @@ Main>
 Main> -- A,B,C compiled (better not use A.o, B.o, C.o)
 Main> :! $HC $HC_OPTS --make A
 Main> :! rm D.o
+Main> :load A
+Ok, modules loaded: Main, B, C, D.
 Main> :type (Main.a,B.b,C.c,D.d)
 (Float -> Float, Float -> Float, Float -> Float, Float -> Float)
 Main> a 42