mirror of
https://github.com/composewell/streamly.git
synced 2024-09-21 00:20:08 +03:00
replace error with fail
This commit is contained in:
parent
5df19ce712
commit
e560d9140d
@ -30,10 +30,10 @@ game = do
|
||||
case event of
|
||||
Harm n -> modify $ \h -> h - n
|
||||
Heal n -> modify $ \h -> h + n
|
||||
Quit -> error "quit"
|
||||
Quit -> fail "quit"
|
||||
|
||||
h <- get
|
||||
when (h <= 0) $ error "You die!"
|
||||
when (h <= 0) $ fail "You die!"
|
||||
liftIO $ putStrLn $ "Health = " ++ show h
|
||||
|
||||
main = do
|
||||
|
Loading…
Reference in New Issue
Block a user