Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
track changes needed for latest ghc
  • Loading branch information
coke committed Jun 23, 2013
1 parent 2a05b7f commit 0d18b5d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Pugs/src/Pugs/AST/Eval.hs
Expand Up @@ -3,7 +3,7 @@
module Pugs.AST.Eval where
import Pugs.Internals
import Pugs.Cont hiding (resetT)
import System.IO.Error (try, IOError)
import System.IO.Error (tryIOError, IOError)
import Control.Exception (SomeException)

import Pugs.AST.SIO
Expand Down Expand Up @@ -154,7 +154,7 @@ Perform an IO action and raise an exception if it fails.
-}
guardIO :: IO a -> Eval a
guardIO x = do
rv <- io $ try x
rv <- io $ tryIOError x
case rv of
Left e -> fail (show e)
Right v -> return v
Expand All @@ -167,7 +167,7 @@ supress the exception and return an associated value instead.
-}
guardIOexcept :: MonadIO m => [((IOError -> Bool), a)] -> IO a -> m a
guardIOexcept safetyNet x = do
rv <- io $ try x
rv <- io $ tryIOError x
case rv of
Right v -> return v
Left e -> catcher e safetyNet
Expand Down

0 comments on commit 0d18b5d

Please sign in to comment.