diff options
author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2019-06-08 20:48:07 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-06-12 07:37:12 -0400 |
commit | 1219f8e8a3d1b58263bea76822322b746a632778 (patch) | |
tree | bd93bdf1e09cd26a7c6104ba37c6734a74e8a7bc /compiler/cmm/PprC.hs | |
parent | 217e6db4af6752b13c586d4e8925a4a9a2f47245 (diff) | |
download | haskell-1219f8e8a3d1b58263bea76822322b746a632778.tar.gz |
Use DeriveFunctor throughout the codebase (#15654)
Diffstat (limited to 'compiler/cmm/PprC.hs')
-rw-r--r-- | compiler/cmm/PprC.hs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/compiler/cmm/PprC.hs b/compiler/cmm/PprC.hs index bacdc9face..e57c409a04 100644 --- a/compiler/cmm/PprC.hs +++ b/compiler/cmm/PprC.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE CPP, GADTs #-} +{-# LANGUAGE CPP, DeriveFunctor, GADTs, PatternSynonyms #-} ----------------------------------------------------------------------------- -- @@ -61,7 +61,7 @@ import Data.Map (Map) import Data.Word import System.IO import qualified Data.Map as Map -import Control.Monad (liftM, ap) +import Control.Monad (ap) import qualified Data.Array.Unsafe as U ( castSTUArray ) import Data.Array.ST @@ -1082,10 +1082,7 @@ pprExternDecl lbl <> semi type TEState = (UniqSet LocalReg, Map CLabel ()) -newtype TE a = TE { unTE :: TEState -> (a, TEState) } - -instance Functor TE where - fmap = liftM +newtype TE a = TE { unTE :: TEState -> (a, TEState) } deriving (Functor) instance Applicative TE where pure a = TE $ \s -> (a, s) |