3 -- A small multi-module program, with 4 modules, Main, B, C, D. B & C
4 -- depend on D, and A depends on B & C.
6 -- This test will try various combinations of compiled and interpreted
7 -- versions of each module, and make sure each combination behaves
18 -- sigh; sleep 1, because the filesystem only stores times in seconds
19 :! sleep 1; cp D2.hs D.hs
21 :type (Main.a,B.b,C.c,D.d)
24 -- compile D, check that :reload doesn't pick it up
25 :! $HC $HC_OPTS -c D.hs
27 :type (Main.a,B.b,C.c,D.d)
30 -- pick up the compiled D now, with :load
32 :type (Main.a,B.b,C.c,D.d)
36 :! $HC $HC_OPTS -c C.hs
38 :type (Main.a,B.b,C.c,D.d)
42 :! $HC $HC_OPTS -c B.hs
44 :type (Main.a,B.b,C.c,D.d)
48 :! $HC $HC_OPTS -c A.hs
50 :type (Main.a,B.b,C.c,D.d)
53 -- D,C,A compiled (better not use A.o)
56 :type (Main.a,B.b,C.c,D.d)
59 -- D,A compiled (better not use A.o)
62 :type (Main.a,B.b,C.c,D.d)
65 -- A compiled (better not use A.o)
68 :type (Main.a,B.b,C.c,D.d)
71 -- A,B,C compiled (better not use A.o, B.o, C.o)
72 :! $HC $HC_OPTS --make A
75 :type (Main.a,B.b,C.c,D.d)