Commit 16ece0cc authored by Simon Marlow's avatar Simon Marlow
Browse files

fixes required after changes in #1205

":load M" now complains if M.hs doesn't contain module M, but ':load
M.hs' does not.  This seems reasonable to me, but there's potential
for confusion.  I'm not sure how to improve the situation though.
parent d5dd387a
......@@ -8,7 +8,7 @@
:shell cp D1.hs D.hs
-- load the program (all interpreted)
:load A
:load A.hs
-- reloading should do nothing
:reload
......@@ -33,7 +33,7 @@ main
:shell cp D2.hs D.hs
:shell $HC $HC_OPTS -fforce-recomp -c D.hs
:reload
:load A
:load A.hs
-- make sure we're picking up the new D, via B
:module B
......
......@@ -8,7 +8,7 @@
:shell rm -f *.hi *.o *~
:shell cp A1.hs A.hs
:load D
:load D.hs
-- compile A & reload
:shell $HC $HC_OPTS -fforce-recomp -c A.hs
......@@ -30,7 +30,7 @@ B.g 42
B.g 42
-- pick up newly compiled A
:load D
:load D.hs
B.g 42
B.g 42
......
module Main(main,a) where
module A(main,a) where
import B
import C(c)
......
:unset +s
:unset +t
-- A small multi-module program, with 4 modules, Main, B, C, D. B & C
-- A small multi-module program, with 4 modules, A, B, C, D. B & C
-- depend on D, and A depends on B & C.
--
-- This test will try various combinations of compiled and interpreted
......@@ -23,62 +23,62 @@ putStrLn "Run 2"
-- sigh; sleep 1, because the filesystem only stores times in seconds
:shell sleep 1; cp D2.hs D.hs
:reload
:type (Main.a,B.b,C.c,D.d)
:type (A.a,B.b,C.c,D.d)
a 42
putStrLn "Run 3"
-- compile D, check that :reload doesn't pick it up
:shell $HC $HC_OPTS -c D.hs
:reload
:type (Main.a,B.b,C.c,D.d)
:type (A.a,B.b,C.c,D.d)
a 42
putStrLn "Run 4"
-- pick up the compiled D now, with :load
:load A
:type (Main.a,B.b,C.c,D.d)
:type (A.a,B.b,C.c,D.d)
a 42
putStrLn "Run 5"
-- D,C compiled
:shell $HC $HC_OPTS -c C.hs
:load A
:type (Main.a,B.b,C.c,D.d)
:type (A.a,B.b,C.c,D.d)
a 42
putStrLn "Run 6"
-- D,C,B compiled
:shell $HC $HC_OPTS -c B.hs
:load A
:type (Main.a,B.b,C.c,D.d)
:type (A.a,B.b,C.c,D.d)
a 42
putStrLn "Run 7"
-- D,C,B,A compiled
:shell $HC $HC_OPTS -c A.hs
:load A
:type (Main.a,B.b,C.c,D.d)
:type (A.a,B.b,C.c,D.d)
a 42
putStrLn "Run 8"
-- D,C,A compiled (better not use A.o)
:shell rm B.o
:load A
:type (Main.a,B.b,C.c,D.d)
:type (A.a,B.b,C.c,D.d)
a 42
putStrLn "Run 9"
-- D,A compiled (better not use A.o)
:shell rm C.o
:load A
:type (Main.a,B.b,C.c,D.d)
:type (A.a,B.b,C.c,D.d)
a 42
putStrLn "Run 10"
-- A compiled (better not use A.o)
:shell rm D.o
:load A
:type (Main.a,B.b,C.c,D.d)
:type (A.a,B.b,C.c,D.d)
a 42
putStrLn "Run 11"
......@@ -86,5 +86,5 @@ putStrLn "Run 11"
:shell $HC $HC_OPTS --make -v0 A
:shell rm D.o
:load A
:type (Main.a,B.b,C.c,D.d)
:type (A.a,B.b,C.c,D.d)
a 42
......@@ -2,62 +2,62 @@ Run 1
a :: Int -> Int
168
Run 2
(Main.a,B.b,C.c,D.d) :: (Float -> Float,
Float -> Float,
Float -> Float,
Float -> Float)
(A.a,B.b,C.c,D.d) :: (Float -> Float,
Float -> Float,
Float -> Float,
Float -> Float)
28.0
Run 3
(Main.a,B.b,C.c,D.d) :: (Float -> Float,
Float -> Float,
Float -> Float,
Float -> Float)
(A.a,B.b,C.c,D.d) :: (Float -> Float,
Float -> Float,
Float -> Float,
Float -> Float)
28.0
Run 4
(Main.a,B.b,C.c,D.d) :: (Float -> Float,
Float -> Float,
Float -> Float,
Float -> Float)
(A.a,B.b,C.c,D.d) :: (Float -> Float,
Float -> Float,
Float -> Float,
Float -> Float)
28.0
Run 5
(Main.a,B.b,C.c,D.d) :: (Float -> Float,
Float -> Float,
Float -> Float,
Float -> Float)
(A.a,B.b,C.c,D.d) :: (Float -> Float,
Float -> Float,
Float -> Float,
Float -> Float)
28.0
Run 6
(Main.a,B.b,C.c,D.d) :: (Float -> Float,
Float -> Float,
Float -> Float,
Float -> Float)
(A.a,B.b,C.c,D.d) :: (Float -> Float,
Float -> Float,
Float -> Float,
Float -> Float)
28.0
Run 7
(Main.a,B.b,C.c,D.d) :: (Float -> Float,
Float -> Float,
Float -> Float,
Float -> Float)
(A.a,B.b,C.c,D.d) :: (Float -> Float,
Float -> Float,
Float -> Float,
Float -> Float)
28.0
Run 8
(Main.a,B.b,C.c,D.d) :: (Float -> Float,
Float -> Float,
Float -> Float,
Float -> Float)
(A.a,B.b,C.c,D.d) :: (Float -> Float,
Float -> Float,
Float -> Float,
Float -> Float)
28.0
Run 9
(Main.a,B.b,C.c,D.d) :: (Float -> Float,
Float -> Float,
Float -> Float,
Float -> Float)
(A.a,B.b,C.c,D.d) :: (Float -> Float,
Float -> Float,
Float -> Float,
Float -> Float)
28.0
Run 10
(Main.a,B.b,C.c,D.d) :: (Float -> Float,
Float -> Float,
Float -> Float,
Float -> Float)
(A.a,B.b,C.c,D.d) :: (Float -> Float,
Float -> Float,
Float -> Float,
Float -> Float)
28.0
Run 11
(Main.a,B.b,C.c,D.d) :: (Float -> Float,
Float -> Float,
Float -> Float,
Float -> Float)
(A.a,B.b,C.c,D.d) :: (Float -> Float,
Float -> Float,
Float -> Float,
Float -> Float)
28.0
......@@ -38,7 +38,7 @@ test('impexp',
test('ATLoop',
extra_clean(['ATLoop_help.o','ATLoop_help.hi']),
multimod_compile,
['ATLoop','-v0'])
['ATLoop.hs','-v0'])
test('Deriving', normal, compile, [''])
test('DerivingNewType', expect_fail, compile, [''])
......
test('parser.prog001',
extra_clean(['Read006.hi', 'Read006.o', 'Read007.hi', 'Read007.o']),
multimod_compile,
['Read007', '-v0'])
['Read007.hs', '-v0'])
......@@ -20,7 +20,7 @@ test('TH_repGuard', normal, compile, ['-v0'])
test('TH_repGuardOutput', normal, compile_and_run, [''])
test('TH_repPatSig', normal, compile_fail, [''])
test('TH_spliceE5', normal, multimod_compile_and_run, ['TH_spliceE5', '-v0'])
test('TH_spliceE5', normal, multimod_compile_and_run, ['TH_spliceE5.hs', '-v0'])
# Testing profiling with TH is a bit tricky; we've already disabled
# the prof way above, and also we want to add options specifically for
# profiling (-osuf p_o) because this is necessary when mixing
......@@ -33,7 +33,7 @@ test('TH_spliceE5_prof',
'TH_spliceE5_Lib.o',
'TH_spliceE5.hi', 'TH_spliceE5.p_o'])],
multimod_compile_and_run,
['TH_spliceE5', '-v0 -prof -auto-all -osuf p_o'])
['TH_spliceE5.hs', '-v0 -prof -auto-all -osuf p_o'])
test('TH_spliceD1',
extra_clean(['TH_spliceD1_Lib.hi', 'TH_spliceD1_Lib.o']),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment