X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Control%2FException.hs;h=1a407809548f6c659329bd9e6522473d89253cad;hb=4b26136ab82fb1ff12e49477c4833a9586d368c5;hp=f351f87398b3ca08d964fff685d893217f6b666c;hpb=72e5908f7355d6486b9886b08ebeec15694fcacc;p=haskell-directory.git diff --git a/Control/Exception.hs b/Control/Exception.hs index f351f87..1a40780 100644 --- a/Control/Exception.hs +++ b/Control/Exception.hs @@ -152,7 +152,7 @@ import Data.Dynamic -- argument. Otherwise, the result is returned as normal. For example: -- -- > catch (openFile f ReadMode) --- > (\e -> hPutStr stderr (\"Couldn\'t open \"++f++\": \" ++ show e)) +-- > (\e -> hPutStr stderr ("Couldn't open "++f++": " ++ show e)) -- -- For catching exceptions in pure (non-'IO') expressions, see the -- function 'evaluate'. @@ -251,7 +251,7 @@ mapException f v = unsafePerformIO (catch (evaluate v) -- @('Right' a)@ if no exception was raised, or @('Left' e)@ if an -- exception was raised and its value is @e@. -- --- > try a = catch (Right \`liftM\` a) (return . Left) +-- > try a = catch (Right `liftM` a) (return . Left) -- -- Note: as with 'catch', it is only polite to use this variant if you intend -- to re-throw the exception after performing whatever cleanup is needed. @@ -372,7 +372,7 @@ userErrors _ = Nothing -- The arguments to 'bracket' are in this order so that we can partially apply -- it, e.g.: -- --- > withFile name = bracket (openFile name) hClose +-- > withFile name mode = bracket (openFile name mode) hClose -- bracket :: IO a -- ^ computation to run first (\"acquire resource\")