prog002.script 609 Bytes
Newer Older
1
2
:unset +s
:unset +t
Simon Marlow's avatar
Simon Marlow committed
3
4
5
6

:l ../shell.hs
:def shell (\s -> do shell s; return "")

7
-- first, clean up:
Simon Marlow's avatar
Simon Marlow committed
8
9
:shell rm -f *.hi *.o *~
:shell cp A1.hs A.hs
10
11
12
13

:load D

-- compile A & reload
14
:shell $HC $HC_OPTS -fforce-recomp -c A.hs
15
16
17
18
19
20
21
:reload

B.g 42
B.g 42
B.g 42

-- swap A2 for A, compile & reload
Simon Marlow's avatar
Simon Marlow committed
22
23
:shell sleep 1
:shell cp A2.hs A.hs
24
:shell $HC $HC_OPTS -fforce-recomp -c A.hs
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
: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
Simon Marlow's avatar
Simon Marlow committed
40
:shell rm A.o
41
42
43
44
45
:reload

B.g 42
B.g 42
B.g 42