more applicative.

error msg fix.
This commit is contained in:
Kazu Yamamoto
2012-02-15 14:52:48 +09:00
parent 7474968486
commit 96cbf68e16
6 changed files with 34 additions and 32 deletions

9
Gap.hs
View File

@@ -15,8 +15,8 @@ module Gap (
#endif
) where
import AA ()
import Control.Applicative hiding (empty)
import Control.Exception
import Control.Monad
import DynFlags
import FastString
@@ -115,10 +115,7 @@ setCtx ms = do
return (not . null $ top)
#endif
where
isTop mos = lookupMod `gcatch` returnFalse
isTop mos = lookupMod <|> returnFalse
where
lookupMod = lookupModule (ms_mod_name mos) Nothing >> return True
returnFalse = constE $ return False
constE :: a -> (SomeException -> a)
constE func = \_ -> func
returnFalse = return False