diff options
Diffstat (limited to 'compiler/ghci')
-rw-r--r-- | compiler/ghci/ByteCodeAsm.hs | 6 | ||||
-rw-r--r-- | compiler/ghci/ByteCodeGen.hs | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/compiler/ghci/ByteCodeAsm.hs b/compiler/ghci/ByteCodeAsm.hs index 0776e406d6..fb38ca1c02 100644 --- a/compiler/ghci/ByteCodeAsm.hs +++ b/compiler/ghci/ByteCodeAsm.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE BangPatterns, CPP, MagicHash, RecordWildCards #-} +{-# LANGUAGE BangPatterns, CPP, DeriveFunctor, MagicHash, RecordWildCards #-} {-# OPTIONS_GHC -optc-DNON_POSIX_SOURCE #-} -- -- (c) The University of Glasgow 2002-2006 @@ -224,9 +224,7 @@ data Assembler a | AllocLabel Word16 (Assembler a) | Emit Word16 [Operand] (Assembler a) | NullAsm a - -instance Functor Assembler where - fmap = liftM + deriving (Functor) instance Applicative Assembler where pure = NullAsm diff --git a/compiler/ghci/ByteCodeGen.hs b/compiler/ghci/ByteCodeGen.hs index c4a08c4e40..33ae172d71 100644 --- a/compiler/ghci/ByteCodeGen.hs +++ b/compiler/ghci/ByteCodeGen.hs @@ -1,4 +1,5 @@ {-# LANGUAGE CPP, MagicHash, RecordWildCards, BangPatterns #-} +{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# OPTIONS_GHC -fprof-auto-top #-} -- @@ -1861,7 +1862,7 @@ data BcM_State -- See Note [generating code for top-level string literal bindings]. } -newtype BcM r = BcM (BcM_State -> IO (BcM_State, r)) +newtype BcM r = BcM (BcM_State -> IO (BcM_State, r)) deriving (Functor) ioToBc :: IO a -> BcM a ioToBc io = BcM $ \st -> do @@ -1891,9 +1892,6 @@ thenBc_ (BcM expr) (BcM cont) = BcM $ \st0 -> do returnBc :: a -> BcM a returnBc result = BcM $ \st -> (return (st, result)) -instance Functor BcM where - fmap = liftM - instance Applicative BcM where pure = returnBc (<*>) = ap |