more applicative.
error msg fix.
This commit is contained in:
9
Gap.hs
9
Gap.hs
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user