summaryrefslogtreecommitdiff
path: root/compiler/deSugar
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2019-06-08 20:48:07 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-06-12 07:37:12 -0400
commit1219f8e8a3d1b58263bea76822322b746a632778 (patch)
treebd93bdf1e09cd26a7c6104ba37c6734a74e8a7bc /compiler/deSugar
parent217e6db4af6752b13c586d4e8925a4a9a2f47245 (diff)
downloadhaskell-1219f8e8a3d1b58263bea76822322b746a632778.tar.gz
Use DeriveFunctor throughout the codebase (#15654)
Diffstat (limited to 'compiler/deSugar')
-rw-r--r--compiler/deSugar/Coverage.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/deSugar/Coverage.hs b/compiler/deSugar/Coverage.hs
index d140829544..59b8bcfc78 100644
--- a/compiler/deSugar/Coverage.hs
+++ b/compiler/deSugar/Coverage.hs
@@ -6,6 +6,7 @@
{-# LANGUAGE NondecreasingIndentation, RecordWildCards #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE TypeFamilies #-}
+{-# LANGUAGE DeriveFunctor #-}
module Coverage (addTicksToBinds, hpcInitCode) where
@@ -1071,12 +1072,10 @@ noFVs = emptyOccEnv
-- over what free variables we track.
data TM a = TM { unTM :: TickTransEnv -> TickTransState -> (a,FreeVars,TickTransState) }
+ deriving (Functor)
-- a combination of a state monad (TickTransState) and a writer
-- monad (FreeVars).
-instance Functor TM where
- fmap = liftM
-
instance Applicative TM where
pure a = TM $ \ _env st -> (a,noFVs,st)
(<*>) = ap