X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Foreign%2FC%2FError.hs;h=89c736d06506e88ee42e778a47120eb39d643424;hb=f98950484a7cb01e43352e3d88277a2784cd58bf;hp=d2e6f6494b420b97ee47bd90c56a9cb89a79f3bd;hpb=3f6fd26597b7c0e45a8ac51aa07ff1f07b8f7111;p=ghc-base.git diff --git a/Foreign/C/Error.hs b/Foreign/C/Error.hs index d2e6f64..89c736d 100644 --- a/Foreign/C/Error.hs +++ b/Foreign/C/Error.hs @@ -1,4 +1,6 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude -#include "HsBase.h" #-} +{-# LANGUAGE CPP, NoImplicitPrelude, ForeignFunctionInterface #-} +{-# OPTIONS_GHC -#include "HsBase.h" #-} + ----------------------------------------------------------------------------- -- | -- Module : Foreign.C.Error @@ -358,8 +360,9 @@ throwErrnoIfRetry pred loc f = else throwErrno loc else return res --- | as 'throwErrnoIfRetry', but checks for operations that would block and --- executes an alternative action before retrying in that case. +-- | as 'throwErrnoIfRetry', but additionally if the operation +-- yields the error code 'eAGAIN' or 'eWOULDBLOCK', an alternative +-- action is executed before retrying. -- throwErrnoIfRetryMayBlock :: (a -> Bool) -- ^ predicate to apply to the result value @@ -489,7 +492,7 @@ throwErrnoPathIfMinus1_ = throwErrnoPathIf_ (== -1) -- conversion of an "errno" value into IO error -- -------------------------------------------- --- | Construct a Haskell 98 I\/O error based on the given 'Errno' value. +-- | Construct an 'IOError' based on the given 'Errno' value. -- The optional information can be used to improve the accuracy of -- error messages. --