projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Interface file optimisation and removal of nameParent
[ghc-hetmet.git]
/
compiler
/
utils
/
IOEnv.hs
diff --git
a/compiler/utils/IOEnv.hs
b/compiler/utils/IOEnv.hs
index
e1dfdb4
..
8116eff
100644
(file)
--- a/
compiler/utils/IOEnv.hs
+++ b/
compiler/utils/IOEnv.hs
@@
-17,7
+17,7
@@
module IOEnv (
getEnv, setEnv, updEnv,
runIOEnv, unsafeInterleaveM,
getEnv, setEnv, updEnv,
runIOEnv, unsafeInterleaveM,
- tryM, tryAllM, fixM,
+ tryM, tryAllM, tryMostM, fixM,
-- I/O operations
ioToIOEnv,
-- I/O operations
ioToIOEnv,
@@
-25,7
+25,7
@@
module IOEnv (
) where
#include "HsVersions.h"
) where
#include "HsVersions.h"
-import Panic ( try, tryUser, Exception(..) )
+import Panic ( try, tryUser, tryMost, Exception(..) )
import DATA_IOREF ( IORef, newIORef, readIORef, writeIORef )
import UNSAFE_IO ( unsafeInterleaveIO )
import FIX_IO ( fixIO )
import DATA_IOREF ( IORef, newIORef, readIORef, writeIORef )
import UNSAFE_IO ( unsafeInterleaveIO )
import FIX_IO ( fixIO )
@@
-100,6
+100,9
@@
tryAllM :: IOEnv env r -> IOEnv env (Either Exception r)
-- even a pattern-match failure is a programmer error
tryAllM (IOEnv thing) = IOEnv (\ env -> try (thing env))
-- even a pattern-match failure is a programmer error
tryAllM (IOEnv thing) = IOEnv (\ env -> try (thing env))
+tryMostM :: IOEnv env r -> IOEnv env (Either Exception r)
+tryMostM (IOEnv thing) = IOEnv (\ env -> tryMost (thing env))
+
---------------------------
unsafeInterleaveM :: IOEnv env a -> IOEnv env a
unsafeInterleaveM (IOEnv m) = IOEnv (\ env -> unsafeInterleaveIO (m env))
---------------------------
unsafeInterleaveM :: IOEnv env a -> IOEnv env a
unsafeInterleaveM (IOEnv m) = IOEnv (\ env -> unsafeInterleaveIO (m env))