File tree 3 files changed +18
-4
lines changed
3926-ghci-with-sublibraries
module-added-multiple-times
3 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,12 @@ replThread :: IO ()
17
17
replThread = repl [] $ do
18
18
replCommand " :main"
19
19
line <- replGetLine
20
- when (line /= " hello world" ) $ error " Main module didn't load correctly."
20
+ let expected = " hello world"
21
+ when (line /= expected) $
22
+ error $
23
+ " Main module didn't load correctly.\n "
24
+ <> " Expected: " <> expected <> " \n "
25
+ <> " Actual : " <> line <> " \n "
21
26
liftIO $ threadDelay 1000000 -- wait for an edit of the internal library
22
27
reloadAndTest " testInt" " 42" " Internal library didn't reload."
23
28
liftIO $ threadDelay 1000000 -- wait for an edit of the internal library
Original file line number Diff line number Diff line change @@ -7,4 +7,9 @@ main = do
7
7
repl [] $ do
8
8
replCommand " putStrLn greeting"
9
9
line <- replGetLine
10
- when (line /= " Hello, world!" ) $ error " Didn't load correctly."
10
+ let expected = " Hello, world!"
11
+ when (line /= expected) $
12
+ error $
13
+ " Didn't load correctly.\n "
14
+ <> " Expected: " <> expected <> " \n "
15
+ <> " Actual : " <> line <> " \n "
Original file line number Diff line number Diff line change @@ -6,5 +6,9 @@ main :: IO ()
6
6
main = repl [] $ do
7
7
replCommand " :main"
8
8
line <- replGetLine
9
- when (line /= " Hello World!" )
10
- $ error " Main module didn't load correctly."
9
+ let expected = " Hello World!"
10
+ when (line /= expected) $
11
+ error $
12
+ " Main module didn't load correctly.\n "
13
+ <> " Expected: " <> expected <> " \n "
14
+ <> " Actual : " <> line <> " \n "
You can’t perform that action at this time.
0 commit comments