From 6978fc75e60f2bebbd5649d6b11b37bb8815d81c Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 20 Mar 2001 10:13:06 +0000 Subject: [PATCH] [project @ 2001-03-20 10:13:06 by simonmar] GHCi test update --- ghc/tests/ghci/ghci001.stdout | 13 +++++ ghc/tests/ghci/ghci003.script | 7 +++ ghc/tests/ghci/ghci003.stdout | 20 +++++++ ghc/tests/ghci/prog001/prog001.script | 2 +- ghc/tests/ghci/prog001/prog001.stderr | 28 ++++----- ghc/tests/ghci/prog001/prog001.stdout | 2 +- ghc/tests/ghci/prog002/prog002.script | 3 +- ghc/tests/ghci/prog002/prog002.stderr | 33 ++++++----- ghc/tests/ghci/prog002/prog002.stdout | 3 +- ghc/tests/ghci/prog003/prog003.script | 5 +- ghc/tests/ghci/prog003/prog003.stderr | 100 +++++++++++++++------------------ ghc/tests/ghci/prog003/prog003.stdout | 11 ++-- 12 files changed, 131 insertions(+), 96 deletions(-) create mode 100644 ghc/tests/ghci/ghci001.stdout create mode 100644 ghc/tests/ghci/ghci003.script create mode 100644 ghc/tests/ghci/ghci003.stdout diff --git a/ghc/tests/ghci/ghci001.stdout b/ghc/tests/ghci/ghci001.stdout new file mode 100644 index 0000000..9fd44f8 --- /dev/null +++ b/ghc/tests/ghci/ghci001.stdout @@ -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 index 0000000..08d0114 --- /dev/null +++ b/ghc/tests/ghci/ghci003.script @@ -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 index 0000000..7bfabbe --- /dev/null +++ b/ghc/tests/ghci/ghci003.stdout @@ -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. diff --git a/ghc/tests/ghci/prog001/prog001.script b/ghc/tests/ghci/prog001/prog001.script index 7a1810c..2678b68 100644 --- a/ghc/tests/ghci/prog001/prog001.script +++ b/ghc/tests/ghci/prog001/prog001.script @@ -1,5 +1,5 @@ --- first, tidy up: :unset +s +-- first, tidy up: :! rm -f *.hi *.o *~ :! cp D1.hs D.hs diff --git a/ghc/tests/ghci/prog001/prog001.stderr b/ghc/tests/ghci/prog001/prog001.stderr index 78d36fb..efb352f 100644 --- a/ghc/tests/ghci/prog001/prog001.stderr +++ b/ghc/tests/ghci/prog001/prog001.stderr @@ -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 ) diff --git a/ghc/tests/ghci/prog001/prog001.stdout b/ghc/tests/ghci/prog001/prog001.stdout index 521f1d6..7f340a7 100644 --- a/ghc/tests/ghci/prog001/prog001.stdout +++ b/ghc/tests/ghci/prog001/prog001.stdout @@ -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> diff --git a/ghc/tests/ghci/prog002/prog002.script b/ghc/tests/ghci/prog002/prog002.script index f81eea6..5f9b8bb 100644 --- a/ghc/tests/ghci/prog002/prog002.script +++ b/ghc/tests/ghci/prog002/prog002.script @@ -1,6 +1,7 @@ +:unset +s +:unset +t -- first, clean up: :! rm -f *.hi *.o *~ -:unset +s :! cp A1.hs A.hs :load D diff --git a/ghc/tests/ghci/prog002/prog002.stderr b/ghc/tests/ghci/prog002/prog002.stderr index 55a038a..f5d782d 100644 --- a/ghc/tests/ghci/prog002/prog002.stderr +++ b/ghc/tests/ghci/prog002/prog002.stderr @@ -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 ) diff --git a/ghc/tests/ghci/prog002/prog002.stdout b/ghc/tests/ghci/prog002/prog002.stdout index 51c51e1..eb7d354 100644 --- a/ghc/tests/ghci/prog002/prog002.stdout +++ b/ghc/tests/ghci/prog002/prog002.stdout @@ -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 diff --git a/ghc/tests/ghci/prog003/prog003.script b/ghc/tests/ghci/prog003/prog003.script index 0c67663..594c688 100644 --- a/ghc/tests/ghci/prog003/prog003.script +++ b/ghc/tests/ghci/prog003/prog003.script @@ -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 diff --git a/ghc/tests/ghci/prog003/prog003.stderr b/ghc/tests/ghci/prog003/prog003.stderr index 9f58f38..d4a49dc 100644 --- a/ghc/tests/ghci/prog003/prog003.stderr +++ b/ghc/tests/ghci/prog003/prog003.stderr @@ -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 ) diff --git a/ghc/tests/ghci/prog003/prog003.stdout b/ghc/tests/ghci/prog003/prog003.stdout index 8de758d..96e8b34 100644 --- a/ghc/tests/ghci/prog003/prog003.stdout +++ b/ghc/tests/ghci/prog003/prog003.stdout @@ -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 -- 1.7.10.4