diff options
Diffstat (limited to 'compiler/prelude/PrelRules.hs')
-rw-r--r-- | compiler/prelude/PrelRules.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/prelude/PrelRules.hs b/compiler/prelude/PrelRules.hs index f87dce4798..919a1d51fe 100644 --- a/compiler/prelude/PrelRules.hs +++ b/compiler/prelude/PrelRules.hs @@ -643,11 +643,11 @@ instance Functor RuleM where fmap = liftM instance Applicative RuleM where - pure = return + pure x = RuleM $ \_ _ _ -> Just x (<*>) = ap instance Monad RuleM where - return x = RuleM $ \_ _ _ -> Just x + return = pure RuleM f >>= g = RuleM $ \dflags iu e -> case f dflags iu e of Nothing -> Nothing Just r -> runRuleM (g r) dflags iu e |