Commit db260a44 authored by Simon Marlow's avatar Simon Marlow
Browse files

add test for #1914

parent 742044ef
:set -v1
:! echo "module A where { import B; }" >A.hs
:! echo "module B where { type T = Int; }" >B.hs
-- hack: avoid the need for sleep by using specific timestamps:
:! touch -t 01010000 A.hs
:! touch -t 01010000 B.hs
:load A
:! echo "module A where { import B; oops }" >A.hs
:! touch -t 01010001 A.hs
:reload
-- B should still be loaded
:module *B
:! echo "module A where { import B; }" >A.hs
:! touch -t 01010002 A.hs
:reload
-- should not have to reload B
[1 of 2] Compiling B ( B.hs, interpreted )
[2 of 2] Compiling A ( A.hs, interpreted )
[2 of 2] Compiling A ( A.hs, interpreted )
A.hs:1:32: parse error on input `}'
[2 of 2] Compiling A ( A.hs, interpreted )
Ok, modules loaded: B, A.
Failed, modules loaded: B.
Ok, modules loaded: B, A.
...@@ -39,3 +39,5 @@ test('ghci026', namebase_if_compiler_lt('ghc','6.9', 'ghci026-6.8'), ghci_script ...@@ -39,3 +39,5 @@ test('ghci026', namebase_if_compiler_lt('ghc','6.9', 'ghci026-6.8'), ghci_script
test('ghci027', normal, ghci_script, ['ghci027.script']) test('ghci027', normal, ghci_script, ['ghci027.script'])
test('ghci028', normal, ghci_script, ['ghci028.script']) test('ghci028', normal, ghci_script, ['ghci028.script'])
test('1914', normal, ghci_script, ['1914.script'])
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