--- /dev/null
+ ___ ___ _
+ / _ \ /\ /\/ __(_)
+ / /_\// /_/ / / | | 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.
--- /dev/null
+-- check that 'it' works
+1
+it
+print it
+return 42
+it
+print it
--- /dev/null
+ ___ ___ _
+ / _ \ /\ /\/ __(_)
+ / /_\// /_/ / / | | 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.
--- first, tidy up:
:unset +s
+-- first, tidy up:
:! rm -f *.hi *.o *~
:! cp D1.hs D.hs
-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 )
\____/\/ /_/\____/|_| 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>
+:unset +s
+:unset +t
-- first, clean up:
:! rm -f *.hi *.o *~
-:unset +s
:! cp A1.hs A.hs
:load D
-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 )
\____/\/ /_/\____/|_| 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
+: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.
--
-- clean up
:! rm *.o *.hi
-:unset +s
:! cp D1.hs D.hs
:load A
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
-- 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
-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 )
\____/\/ /_/\____/|_| 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>
Prelude> -- clean up
Prelude> :! rm *.o *.hi
-Prelude> :unset +s
Prelude> :! cp D1.hs D.hs
Prelude>
Prelude> :load A
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>
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