summaryrefslogtreecommitdiff
path: root/compiler/typecheck/TcTyDecls.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/typecheck/TcTyDecls.hs')
-rw-r--r--compiler/typecheck/TcTyDecls.hs9
1 files changed, 3 insertions, 6 deletions
diff --git a/compiler/typecheck/TcTyDecls.hs b/compiler/typecheck/TcTyDecls.hs
index 205771b2db..7a68fe1144 100644
--- a/compiler/typecheck/TcTyDecls.hs
+++ b/compiler/typecheck/TcTyDecls.hs
@@ -10,6 +10,7 @@ files for imported data types.
-}
{-# LANGUAGE CPP #-}
+{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ViewPatterns #-}
@@ -149,12 +150,10 @@ synonymTyConsOfType ty
-- a failure message reporting that a cycle was found.
newtype SynCycleM a = SynCycleM {
runSynCycleM :: SynCycleState -> Either (SrcSpan, SDoc) (a, SynCycleState) }
+ deriving (Functor)
type SynCycleState = NameSet
-instance Functor SynCycleM where
- fmap = liftM
-
instance Applicative SynCycleM where
pure x = SynCycleM $ \state -> Right (x, state)
(<*>) = ap
@@ -677,9 +676,7 @@ newtype RoleM a = RM { unRM :: Maybe Name -- of the tycon
-> Int -- size of VarPositions
-> RoleInferenceState
-> (a, RoleInferenceState) }
-
-instance Functor RoleM where
- fmap = liftM
+ deriving (Functor)
instance Applicative RoleM where
pure x = RM $ \_ _ _ state -> (x, state)