[commit: packages/haskeline] master: Fix withInterrupt function docs (df94abf)
git at git.haskell.org
git at git.haskell.org
Tue Dec 13 19:22:03 UTC 2016
Repository : ssh://git@git.haskell.org/haskeline
On branch : master
Link : http://git.haskell.org/packages/haskeline.git/commitdiff/df94abfa2ea8a9d6fa5a913467111213467beaca
>---------------------------------------------------------------
commit df94abfa2ea8a9d6fa5a913467111213467beaca
Author: Roman Zaynetdinov <romanznet at gmail.com>
Date: Sat Jun 4 13:08:05 2016 +0300
Fix withInterrupt function docs
Change outdated (I suppose so) `wrapInterrupt` to actual `withInterrupt`.
>---------------------------------------------------------------
df94abfa2ea8a9d6fa5a913467111213467beaca
System/Console/Haskeline.hs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/System/Console/Haskeline.hs b/System/Console/Haskeline.hs
index b4fff00..0eea273 100644
--- a/System/Console/Haskeline.hs
+++ b/System/Console/Haskeline.hs
@@ -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
More information about the ghc-commits
mailing list