diff options
Diffstat (limited to 'compiler/utils/Maybes.hs')
-rw-r--r-- | compiler/utils/Maybes.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/utils/Maybes.hs b/compiler/utils/Maybes.hs index 14bc46b9b8..37acb25a1a 100644 --- a/compiler/utils/Maybes.hs +++ b/compiler/utils/Maybes.hs @@ -1,5 +1,6 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE ConstraintKinds #-} +{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE FlexibleContexts #-} @@ -95,9 +96,7 @@ tryMaybeT action = MaybeT $ catch (Just `fmap` action) handler -} data MaybeErr err val = Succeeded val | Failed err - -instance Functor (MaybeErr err) where - fmap = liftM + deriving (Functor) instance Applicative (MaybeErr err) where pure = Succeeded |