Commit f18a911b authored by judah's avatar judah
Browse files

Merge pull request #41 from zaynetro/patch-1

Fix withInterrupt function docs
parents 3cf1bd3d df94abfa
......@@ -294,13 +294,13 @@ of type 'Interrupt'. For example:
> tryAction :: InputT IO ()
> tryAction = handle (\Interrupt -> outputStrLn "Cancelled.")
> $ wrapInterrupt $ someLongAction
> $ withInterrupt $ someLongAction
The action can handle the interrupt itself; a new 'Interrupt' exception will be thrown
every time Ctrl-C is pressed.
> tryAction :: InputT IO ()
> tryAction = wrapInterrupt loop
> tryAction = withInterrupt loop
> where loop = handle (\Interrupt -> outputStrLn "Cancelled; try again." >> loop)
> someLongAction
......
Supports Markdown
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