Commit df94abfa authored by Roman Zaynetdinov's avatar Roman Zaynetdinov
Browse files

Fix withInterrupt function docs

Change outdated (I suppose so) `wrapInterrupt` to actual `withInterrupt`.
parent 3cf1bd3d
......@@ -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