+++ /dev/null
-TOP = .
-include $(TOP)/mk/boilerplate.mk
-
-SUBDIRS = \
- array \
- ccall \
- codeGen \
- concurrent \
- deSugar \
- deriving \
- io \
- lib \
- numeric \
- reader \
- rename \
- simplCore \
- stranal \
- typecheck \
- programs
-
-# printing \
-
-include $(TOP)/mk/target.mk
-
+++ /dev/null
-#-----------------------------------------------------------------------------
-# $Id: Makefile,v 1.1 2001/03/01 15:36:20 simonmar Exp $
-
-TOP = ..
-include $(TOP)/mk/boilerplate.mk
-
-SUBDIRS=$(wildcard prog*/)
-
-include $(TOP)/mk/ghci.mk
+++ /dev/null
--- bug: shouldn't be defaulting these expressions
-:type (+)
-:type enumFromTo
+++ /dev/null
- ___ ___ _
- / _ \ /\ /\/ __(_)
- / /_\// /_/ / / | | GHC Interactive, version 5.03, 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.
+++ /dev/null
--- bug: we used to throw away the instance accidentally here
-:m PrelBase
-1 == (2 :: Int)
-1 == (2 :: Int)
+++ /dev/null
- ___ ___ _
- / _ \ /\ /\/ __(_)
- / /_\// /_/ / / | | GHC Interactive, version 5.03, for Haskell 98.
-/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
-\____/\/ /_/\____/|_| Type :? for help.
-
-Loading package std ... linking ... done.
-Prelude> -- bug: we used to throw away the instance accidentally here
-Prelude> :m PrelBase
-PrelBase> 1 == (2 :: Int)
-False
-PrelBase> 1 == (2 :: Int)
-False
-PrelBase> Leaving GHCi.
+++ /dev/null
--- check that 'it' works
-1
-it
-print it
-return 42
-it
-print it
+++ /dev/null
- ___ ___ _
- / _ \ /\ /\/ __(_)
- / /_\// /_/ / / | | GHC Interactive, version 5.03, 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.
+++ /dev/null
-import List
-main = print (sort [100,99..1])
+++ /dev/null
-:unset +s +t
--- test importing a module from a package
-:l ghci004
-main
+++ /dev/null
-Compiling Main ( ghci004.hs, interpreted )
+++ /dev/null
- ___ ___ _
- / _ \ /\ /\/ __(_)
- / /_\// /_/ / / | | GHC Interactive, version 5.03, for Haskell 98.
-/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
-\____/\/ /_/\____/|_| Type :? for help.
-
-Loading package std ... linking ... done.
-Prelude> :unset +s +t
-Prelude> -- test importing a module from a package
-Prelude> :l ghci004
-Ok, modules loaded: Main.
-Main> main
-[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,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100]
-Main> Leaving GHCi.
+++ /dev/null
-:unset +s +t
--- tests for :def, :undef
-let void m = m >> return ""
-let echo s = void (putStrLn s)
-:def echo echo
-:echo hello, world!
-
-let echo s = return (":! echo " ++ map Char.toUpper s)
-:echo hello, world!
-:def echo echo
-:undef echo
-:def echo echo
-:echo hello, world!
+++ /dev/null
- ___ ___ _
- / _ \ /\ /\/ __(_)
- / /_\// /_/ / / | | GHC Interactive, version 5.03, for Haskell 98.
-/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
-\____/\/ /_/\____/|_| Type :? for help.
-
-Loading package std ... linking ... done.
-Prelude> :unset +s +t
-Prelude> -- tests for :def, :undef
-Prelude> let void m = m >> return ""
-Prelude> let echo s = void (putStrLn s)
-Prelude> :def echo echo
-Prelude> :echo hello, world!
-hello, world!
-Prelude>
-Prelude> let echo s = return (":! echo " ++ map Char.toUpper s)
-Prelude> :echo hello, world!
-hello, world!
-Prelude> :def echo echo
-command `echo' is already defined
-Prelude> :undef echo
-Prelude> :def echo echo
-Prelude> :echo hello, world!
-HELLO, WORLD!
-Prelude> Leaving GHCi.
+++ /dev/null
-
-module Ghci006 where
-
-data Q = forall x . Show x => Q x
-showQ (Q x) = show x
-
--- associated bug is that at the interpreter command line,
--- showQ (Q "foo") crashed the interpreter.
+++ /dev/null
-:unset +s +t
-:set -fglasgow-exts
--- test for contexts on existential types crashing the interpreter
-:l ghci006
-showQ (Q "foo")
-
+++ /dev/null
-Compiling Ghci006 ( ghci006.hs, interpreted )
+++ /dev/null
- ___ ___ _
- / _ \ /\ /\/ __(_)
- / /_\// /_/ / / | | GHC Interactive, version 5.03, for Haskell 98.
-/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
-\____/\/ /_/\____/|_| Type :? for help.
-
-Loading package std ... linking ... done.
-Prelude> :unset +s +t
-Prelude> :set -fglasgow-exts
-Prelude> -- test for contexts on existential types crashing the interpreter
-Prelude> :l ghci006
-Ok, modules loaded: Ghci006.
-Ghci006> showQ (Q "foo")
-"\"foo\""
-Ghci006>
-Ghci006> Leaving GHCi.
+++ /dev/null
--- bug: shouldn't kill the whole system
-System.exitFailure
+++ /dev/null
- ___ ___ _
- / _ \ /\ /\/ __(_)
- / /_\// /_/ / / | | GHC Interactive, version 5.03, for Haskell 98.
-/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
-\____/\/ /_/\____/|_| Type :? for help.
-
-Loading package std ... linking ... done.
-Prelude> -- bug: shouldn't kill the whole system
-Prelude> System.exitFailure
-*** Exception: exit: ExitFailure 1
-Prelude> Leaving GHCi.
+++ /dev/null
--- testing :info
-:info +
-:info (+)
-:info Complex.:+
-:info (Complex.:+)
-:info RealFloat
-:info []
-:info ()
-:info (,)
-:info `List.isPrefixOf`
+++ /dev/null
- ___ ___ _
- / _ \ /\ /\/ __(_)
- / /_\// /_/ / / | | GHC Interactive, version 5.03, for Haskell 98.
-/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
-\____/\/ /_/\____/|_| Type :? for help.
-
-Loading package std ... linking ... done.
-Prelude> -- testing :info
-Prelude> :info +
--- + is a method in class Num
-infixl 6 +
-(+) :: forall a. (Num a) => a -> a -> a
-Prelude> :info (+)
--- + is a method in class Num
-infixl 6 +
-(+) :: forall a. (Num a) => a -> a -> a
-Prelude> :info Complex.:+
--- Complex.:+ is a data constructor
-infix 6 Complex.:+
-(Complex.:+) :: forall a. (RealFloat a) =>
- a -> a -> Complex.Complex a
-Prelude> :info (Complex.:+)
--- Complex.:+ is a data constructor
-infix 6 Complex.:+
-(Complex.:+) :: forall a. (RealFloat a) =>
- a -> a -> Complex.Complex a
-Prelude> :info RealFloat
--- RealFloat is a class
-class (RealFrac a, Floating a) => RealFloat a where {
- floatRadix :: a -> Integer;
- floatDigits :: a -> Int;
- floatRange :: a -> (Int, Int);
- decodeFloat :: a -> (Integer, Int);
- encodeFloat :: Integer -> Int -> a;
- exponent :: a -> Int {- has default method -};
- significand :: a -> a {- has default method -};
- scaleFloat :: Int -> a -> a {- has default method -};
- isInfinite :: a -> Bool;
- isDenormalized :: a -> Bool;
- isNegativeZero :: a -> Bool;
- isIEEE :: a -> Bool;
- isNaN :: a -> Bool;
- atan2 :: a -> a -> a {- has default method -};
- }
-Prelude> :info []
--- [] is a data constructor
-[] :: forall a. [a]
-
--- [] is a type constructor
-data [] a = [] | (:) a [a]
-Prelude> :info ()
--- () is a data constructor
-() :: ()
-
--- () is a type constructor
-data () = ()
-Prelude> :info (,)
--- (,) is a data constructor
-(,) :: forall a b. a -> b -> (a, b)
-
--- (,) is a type constructor
-data (,) a b = (,) a b
-Prelude> :info `List.isPrefixOf`
--- List.isPrefixOf is a variable
-List.isPrefixOf :: forall a. (Eq a) => [a] -> [a] -> Bool
-Prelude> Leaving GHCi.
+++ /dev/null
--- !!! test `:set args' and `:set prog'
-System.getArgs
-print it
-System.getProgName
-print it
-:set args
-System.getArgs
-print it
-System.getProgName
-print it
-:set args foo bar
-System.getArgs
-print it
-System.getProgName
-print it
-:set prog foo
-System.getArgs
-print it
-System.getProgName
-print it
+++ /dev/null
- ___ ___ _
- / _ \ /\ /\/ __(_)
- / /_\// /_/ / / | | GHC Interactive, version 5.03, for Haskell 98.
-/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
-\____/\/ /_/\____/|_| Type :? for help.
-
-Loading package std ... linking ... done.
-Prelude> -- !!! test `:set args' and `:set prog'
-Prelude> System.getArgs
-Prelude> print it
-[]
-Prelude> System.getProgName
-Prelude> print it
-"<interactive>"
-Prelude> :set args
-Prelude> System.getArgs
-Prelude> print it
-[]
-Prelude> System.getProgName
-Prelude> print it
-"<interactive>"
-Prelude> :set args foo bar
-Prelude> System.getArgs
-Prelude> print it
-["foo","bar"]
-Prelude> System.getProgName
-Prelude> print it
-"<interactive>"
-Prelude> :set prog foo
-Prelude> System.getArgs
-Prelude> print it
-["foo","bar"]
-Prelude> System.getProgName
-Prelude> print it
-"foo"
-Prelude> Leaving GHCi.
+++ /dev/null
--- !!! check we can detect deadlock
-:set -package concurrent
-Concurrent.newEmptyMVar >>= Concurrent.takeMVar
+++ /dev/null
- ___ ___ _
- / _ \ /\ /\/ __(_)
- / /_\// /_/ / / | | GHC Interactive, version 5.03, for Haskell 98.
-/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
-\____/\/ /_/\____/|_| Type :? for help.
-
-Loading package std ... linking ... done.
-Prelude> -- !!! check we can detect deadlock
-Prelude> :set -package concurrent
-Loading package lang ... linking ... done.
-Loading package concurrent ... linking ... done.
-Prelude> Concurrent.newEmptyMVar >>= Concurrent.takeMVar
-Deadlocked.
-Prelude> Leaving GHCi.
+++ /dev/null
-module Main where
-
-import B
-
-main = print ("hello world" ++ show (f 42))
+++ /dev/null
-module B (module B, module C) where
-
-import C
-
-k x = x `mod` 11
+++ /dev/null
-module C (f, g, h) where
-
-import D
-
-g x = f x + 1
-
-h x = x `div` 2
-
-data C = C {x :: Int}
+++ /dev/null
-module D where
-
-data T = A Int | B Float deriving Eq
-
-f x = x + 1
+++ /dev/null
-module D where
-
-data T = A Int | B Float deriving Eq
-
-f x = x + x
+++ /dev/null
-module D where
-
-data T = A Int | B Float deriving Eq
-
-f x = x + 1
+++ /dev/null
-#-----------------------------------------------------------------------------
-# $Id: Makefile,v 1.1 2001/03/01 15:36:20 simonmar Exp $
-
-TOP = ../..
-include $(TOP)/mk/boilerplate.mk
-
-include $(TOP)/mk/ghci.mk
+++ /dev/null
-:unset +s
--- first, tidy up:
-:! rm -f *.hi *.o *~
-:! cp D1.hs D.hs
-
--- load the program (all interpreted)
-:load A
-
--- reloading should do nothing
-:reload
-
--- make sure `main' works
-main
-
--- touch a module + recompile
-:! sleep 1
-:! touch C.hs
-:reload
-
--- make sure `main' still works
-main
-
--- compile D & reload
-:! $HC $HC_OPTS -no-recomp -c D.hs
-:reload
-main
-
--- change D, recompile & reload
-:! cp D2.hs D.hs
-:! $HC $HC_OPTS -no-recomp -c D.hs
-:reload
-:load A
-
--- make sure we're picking up the new D, via B
-:module B
-g 42
+++ /dev/null
-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 )
+++ /dev/null
- ___ ___ _
- / _ \ /\ /\/ __(_)
- / /_\// /_/ / / | | GHC Interactive, version 5.03, for Haskell 98.
-/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
-\____/\/ /_/\____/|_| Type :? for help.
-
-Loading package std ... linking ... done.
-Prelude> :unset +s
-Prelude> -- first, tidy up:
-Prelude> :! rm -f *.hi *.o *~
-Prelude> :! cp D1.hs D.hs
-Prelude>
-Prelude> -- load the program (all interpreted)
-Prelude> :load A
-Ok, modules loaded: Main, B, C, D.
-Main>
-Main> -- reloading should do nothing
-Main> :reload
-Ok, modules loaded: Main, B, C, D.
-Main>
-Main> -- make sure `main' works
-Main> main
-"hello world84"
-Main>
-Main> -- touch a module + recompile
-Main> :! sleep 1
-Main> :! touch C.hs
-Main> :reload
-Ok, modules loaded: Main, B, C, D.
-Main>
-Main> -- make sure `main' still works
-Main> main
-"hello world84"
-Main>
-Main> -- compile D & reload
-Main> :! $HC $HC_OPTS -no-recomp -c D.hs
-Main> :reload
-Ok, modules loaded: Main, B, C, D.
-Main> main
-"hello world84"
-Main>
-Main> -- change D, recompile & reload
-Main> :! cp D2.hs D.hs
-Main> :! $HC $HC_OPTS -no-recomp -c D.hs
-Main> :reload
-Ok, modules loaded: Main, B, C, D.
-Main> :load A
-Ok, modules loaded: Main, B, C, D.
-Main>
-Main> -- make sure we're picking up the new D, via B
-Main> :module B
-B> g 42
-44
-B> Leaving GHCi.
+++ /dev/null
-module A where
-
-data T = A Int | B Float deriving Eq
-
-f :: Int -> Int
-f x = x + 3
+++ /dev/null
-module A where
-
-data T = A Int | B Float deriving Eq
-
-f :: Double -> Double
-f x = x + x
+++ /dev/null
-module A where
-
-data T = A Int | B Float deriving Eq
-
-f :: Int -> Int
-f x = x + 3
+++ /dev/null
-module B (f, g, h) where
-
-import A
-
-g x = f x + 1
-
-h x = x `div` 2
+++ /dev/null
-module C (module B, module C) where
-
-import B
-
-k x = x `mod` 11
+++ /dev/null
-module Main where
-
-import C
-
-main = print ("hello world" ++ show (f 42))
+++ /dev/null
-#-----------------------------------------------------------------------------
-# $Id: Makefile,v 1.1 2001/03/01 15:36:20 simonmar Exp $
-
-TOP = ../..
-include $(TOP)/mk/boilerplate.mk
-
-include $(TOP)/mk/ghci.mk
+++ /dev/null
-:unset +s
-:unset +t
--- first, clean up:
-:! rm -f *.hi *.o *~
-:! cp A1.hs A.hs
-
-:load D
-
--- compile A & reload
-:! $HC $HC_OPTS -no-recomp -c A.hs
-:reload
-
-B.g 42
-B.g 42
-B.g 42
-
--- swap A2 for A, compile & reload
-:! cp A2.hs A.hs
-:! $HC $HC_OPTS -no-recomp -c A.hs
-:reload
--- the system should ignore the compiled version and compile its own.
-
-B.g 42
-B.g 42
-B.g 42
-
--- pick up newly compiled A
-:load D
-
-B.g 42
-B.g 42
-B.g 42
-
--- remove A.o: system should recompile A
-:! rm A.o
-:reload
-
-B.g 42
-B.g 42
-B.g 42
+++ /dev/null
-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 )
+++ /dev/null
- ___ ___ _
- / _ \ /\ /\/ __(_)
- / /_\// /_/ / / | | GHC Interactive, version 5.03, for Haskell 98.
-/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
-\____/\/ /_/\____/|_| Type :? for help.
-
-Loading package std ... linking ... done.
-Prelude> :unset +s
-Prelude> :unset +t
-Prelude> -- first, clean up:
-Prelude> :! rm -f *.hi *.o *~
-Prelude> :! cp A1.hs A.hs
-Prelude>
-Prelude> :load D
-Ok, modules loaded: Main, C, B, A.
-Main>
-Main> -- compile A & reload
-Main> :! $HC $HC_OPTS -no-recomp -c A.hs
-Main> :reload
-Ok, modules loaded: Main, C, B, A.
-Main>
-Main> B.g 42
-85.0
-Main> B.g 42
-85.0
-Main> B.g 42
-85.0
-Main>
-Main> -- swap A2 for A, compile & reload
-Main> :! cp A2.hs A.hs
-Main> :! $HC $HC_OPTS -no-recomp -c A.hs
-Main> :reload
-Ok, modules loaded: Main, C, B, A.
-Main> -- the system should ignore the compiled version and compile its own.
-Main>
-Main> B.g 42
-46
-Main> B.g 42
-46
-Main> B.g 42
-46
-Main>
-Main> -- pick up newly compiled A
-Main> :load D
-Ok, modules loaded: Main, C, B, A.
-Main>
-Main> B.g 42
-46
-Main> B.g 42
-46
-Main> B.g 42
-46
-Main>
-Main> -- remove A.o: system should recompile A
-Main> :! rm A.o
-Main> :reload
-Ok, modules loaded: Main, C, B, A.
-Main>
-Main> B.g 42
-46
-Main> B.g 42
-46
-Main> B.g 42
-46
-Main> Leaving GHCi.
+++ /dev/null
-module Main(main,a) where
-
-import B
-import C
-
-main = print (a 42)
-
-a x = b x + c x
+++ /dev/null
-module B where
-
-import D
-
-b x = d x
+++ /dev/null
-module C where
-
-import D
-
-c x = d x
+++ /dev/null
-module D where
-
--- data types and an instance
-data D a = A Int | B Float deriving Eq
-newtype N a = N Double
-type T a = (Int,Double)
-
--- a class
-class C a where c :: a -> Int
-
--- a function
-d :: Float -> Float
-d x = x / 3
+++ /dev/null
-module D where
-
--- data types and an instance
-data D a = A Int | B Float deriving Eq
-newtype N a = N Double
-type T a = (Int,Double)
-
--- a class
-class C a where c :: a -> Int
-
--- a function
-d :: Int -> Int
-d x = x * 2
+++ /dev/null
-module D where
-
--- data types and an instance
-data D a = A Int | B Float deriving Eq
-newtype N a = N Double
-type T a = (Int,Double)
-
--- a class
-class C a where c :: a -> Int
-
--- a function
-d :: Float -> Float
-d x = x / 3
+++ /dev/null
-#-----------------------------------------------------------------------------
-# $Id: Makefile,v 1.1 2001/03/01 15:36:21 simonmar Exp $
-
-TOP = ../..
-include $(TOP)/mk/boilerplate.mk
-
-include $(TOP)/mk/ghci.mk
+++ /dev/null
-: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.
---
--- This test will try various combinations of compiled and interpreted
--- versions of each module, and make sure each combination behaves
--- sensibly.
-
--- clean up
-:! rm *.o *.hi
-:! cp D1.hs D.hs
-
-:load A
-:type a
-a 42
-
--- sigh; sleep 1, because the filesystem only stores times in seconds
-:! sleep 1; cp D2.hs D.hs
-:reload
-:type (Main.a,B.b,C.c,D.d)
-a 42
-
--- compile D, check that :reload doesn't pick it up
-:! $HC $HC_OPTS -c D.hs
-:reload
-:type (Main.a,B.b,C.c,D.d)
-a 42
-
--- pick up the compiled D now, with :load
-:load A
-:type (Main.a,B.b,C.c,D.d)
-a 42
-
--- D,C compiled
-:! $HC $HC_OPTS -c C.hs
-:load A
-:type (Main.a,B.b,C.c,D.d)
-a 42
-
--- D,C,B compiled
-:! $HC $HC_OPTS -c B.hs
-:load A
-:type (Main.a,B.b,C.c,D.d)
-a 42
-
--- D,C,B,A compiled
-:! $HC $HC_OPTS -c A.hs
-:load A
-:type (Main.a,B.b,C.c,D.d)
-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
-
--- D,A compiled (better not use A.o)
-:! rm C.o
-:load A
-:type (Main.a,B.b,C.c,D.d)
-a 42
-
--- A compiled (better not use A.o)
-:! rm D.o
-:load A
-:type (Main.a,B.b,C.c,D.d)
-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
+++ /dev/null
-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-5.03: chasing modules from: A
-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 )
+++ /dev/null
- ___ ___ _
- / _ \ /\ /\/ __(_)
- / /_\// /_/ / / | | GHC Interactive, version 5.03, for Haskell 98.
-/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
-\____/\/ /_/\____/|_| 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> --
-Prelude> -- This test will try various combinations of compiled and interpreted
-Prelude> -- versions of each module, and make sure each combination behaves
-Prelude> -- sensibly.
-Prelude>
-Prelude> -- clean up
-Prelude> :! rm *.o *.hi
-Prelude> :! cp D1.hs D.hs
-Prelude>
-Prelude> :load A
-Ok, modules loaded: Main, B, C, D.
-Main> :type a
-Int -> Int
-Main> a 42
-168
-Main>
-Main> -- sigh; sleep 1, because the filesystem only stores times in seconds
-Main> :! sleep 1; cp D2.hs D.hs
-Main> :reload
-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
-28.0
-Main>
-Main> -- compile D, check that :reload doesn't pick it up
-Main> :! $HC $HC_OPTS -c D.hs
-Main> :reload
-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
-28.0
-Main>
-Main> -- pick up the compiled D now, with :load
-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
-28.0
-Main>
-Main> -- D,C compiled
-Main> :! $HC $HC_OPTS -c C.hs
-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
-28.0
-Main>
-Main> -- D,C,B compiled
-Main> :! $HC $HC_OPTS -c B.hs
-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
-28.0
-Main>
-Main> -- D,C,B,A compiled
-Main> :! $HC $HC_OPTS -c A.hs
-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)
-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)
-(Float -> Float, Float -> Float, Float -> Float, Float -> Float)
-Main> a 42
-28.0
-Main>
-Main> -- D,A compiled (better not use A.o)
-Main> :! rm C.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
-28.0
-Main>
-Main> -- A compiled (better not use A.o)
-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
-28.0
-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
-28.0
-Main> Leaving GHCi.
+++ /dev/null
-module AA where
-aa = putStr "At her 60th birthday party, Margaret Thatcher blew on the cake to light the candles.\n"
+++ /dev/null
-module BB where
-import ZZ
-bb = zz
+++ /dev/null
-module Main where
-import YY
-main = yy
+++ /dev/null
-#-----------------------------------------------------------------------------
-# $Id: Makefile,v 1.1 2001/04/03 16:28:11 sewardj Exp $
-
-TOP = ../..
-include $(TOP)/mk/boilerplate.mk
-
-include $(TOP)/mk/ghcmake.mk
+++ /dev/null
-module YY where
-import BB
-yy = bb
+++ /dev/null
-module ZZ where
-import AA
-zz = aa
+++ /dev/null
-At her 60th birthday party, Margaret Thatcher blew on the cake to light the candles.
+++ /dev/null
-#################################################################################
-#
-# ghc/tests/mk/boilerplate.mk
-#
-# Boilerplate Makefile for an fptools project
-#
-#################################################################################
-
-# Begin by slurping in the boilerplate from one level up,
-# with standard TOP-mangling
-# Remember, TOP is the top level of the innermost level
-# ( FPTOOLS_TOP, which will be set while processing
-# toplevel boilerplate, is the fptools top )
-
-TEST_TOP := $(TOP)
-TOP := $(TOP)/..
-
-include $(TOP)/mk/boilerplate.mk
-TOP:=$(TEST_TOP)
-
-# By default, we're testing the GHC in the build tree.
-HC=$(GHC_INPLACE)
-
-# we don't want recompilation checking in here
-SRC_HC_OPTS += -no-recomp
-
-# -----------------------------------------------------------------
-# Everything after this point
-# augments or overrides previously set variables.
-# -----------------------------------------------------------------
-
--include $(TOP)/mk/paths.mk
--include $(TOP)/mk/opts.mk
--include $(TOP)/mk/version.mk
--include $(TOP)/mk/suffix.mk
+++ /dev/null
-#-----------------------------------------------------------------------------
-# template for should_run tests.
-
-SCRIPTS = $(wildcard *.script)
-
-SRC_RUNTEST_OPTS += -x 0 \
- $(foreach i,$(wildcard $*.stdout),-o1 $(i)) \
- $(foreach i,$(wildcard $*.stderr),-o2 $(i))
-
-RUNTESTS = $(filter-out $(OMITTED_RUNTESTS), $(patsubst %.script,%.run,$(SCRIPTS)))
-
-all :: $(RUNTESTS)
-
-%.run : %.script
- HC=$(HC) HC_OPTS="$(HC_OPTS)" $(RUNTEST) $(HC) -i$< $(RUNTEST_OPTS) -- --interactive -ignore-dot-ghci
-
-include $(TOP)/mk/target.mk
+++ /dev/null
-#-----------------------------------------------------------------------------
-# $Id: should_compile.mk,v 1.5 2000/12/12 13:57:40 simonmar Exp $
-# template for should_compile tests.
-
-HS_SRCS = $(wildcard *.hs)
-
-SRC_RUNTEST_OPTS += -x 0 \
- $(foreach i,$(wildcard $*.stdout),-o1 $(i)) \
- $(foreach i,$(wildcard $*.stderr),-o2 $(i))
-
-%.o : %.hs
- @echo ---- Testing for successful compilation of $<
- $(RUNTEST) $(HC) $(RUNTEST_OPTS) -- $(HC_OPTS) -c $< -o $@
-
-%.hc : %.hs
- @echo ---- Testing for successful compilation of $<
- $(RUNTEST) $(HC) $(RUNTEST_OPTS) -- $(HC_OPTS) -C $< -o $@
-
-ifeq "$(HCOnly)" "YES"
-all :: $(HS_HCS)
-else
-all :: $(HS_OBJS)
-endif
-
-# Most single-module tests are declared to be module ShouldCompile, so we
-# can clean the .hi files in one go:
-CLEAN_FILES += ShouldCompile.hi
+++ /dev/null
-#-----------------------------------------------------------------------------
-# $Id: should_fail.mk,v 1.4 2000/11/03 16:23:38 simonmar Exp $
-# template for should_fail tests
-
-HS_SRCS = $(wildcard *.hs)
-
-SRC_RUNTEST_OPTS += -x 1 \
- $(foreach i,$(wildcard $*.stdout),-o1 $(i)) \
- $(foreach i,$(wildcard $*.stderr),-o2 $(i))
-
-%.o : %.hs
- @echo ---- Testing for failure to compile $<
- @$(RUNTEST) $(HC) $(RUNTEST_OPTS) -- $(HC_OPTS) -c $< -o $@
-
-all :: $(HS_OBJS)
-
-# occasionally a test goes wrong and compiles by mistake, so...
-CLEAN_FILES += ShouldFail.hi
+++ /dev/null
-#-----------------------------------------------------------------------------
-# template for should_run tests.
-
-HS_SRCS = $(wildcard *.hs)
-BINS = $(patsubst %.o,%.bin,$(HS_OBJS))
-RUNTESTS = $(filter-out $(OMITTED_RUNTESTS), $(patsubst %.bin,%.run,$(BINS)))
-
-SRC_RUNTEST_OPTS += -x 0 \
- $(foreach i,$(wildcard $*.stdout),-o1 $(i)) \
- $(foreach i,$(wildcard $*.stderr),-o2 $(i))
-
-all :: $(RUNTESTS)
-
-%.run : %.bin
- $(RUNTEST) $< $(RUNTEST_OPTS)
-
-%.bin : %.o
- $(HC) $(HC_OPTS) $($*_LD_OPTS) $< -o $@
-
-CLEAN_FILES += $(BINS) Main.hi
+++ /dev/null
-#################################################################################
-#
-# target.mk
-#
-# ghc/tests standard target rules
-#
-#################################################################################
-
-include $(FPTOOLS_TOP)/mk/target.mk
-