summaryrefslogtreecommitdiff
path: root/compiler/rename
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/rename
parent217e6db4af6752b13c586d4e8925a4a9a2f47245 (diff)
downloadhaskell-1219f8e8a3d1b58263bea76822322b746a632778.tar.gz
Use DeriveFunctor throughout the codebase (#15654)
Diffstat (limited to 'compiler/rename')
-rw-r--r--compiler/rename/RnPat.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/rename/RnPat.hs b/compiler/rename/RnPat.hs
index ca8c665e28..4a08ab4761 100644
--- a/compiler/rename/RnPat.hs
+++ b/compiler/rename/RnPat.hs
@@ -16,6 +16,7 @@ free variables.
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE ViewPatterns #-}
+{-# LANGUAGE DeriveFunctor #-}
module RnPat (-- main entry points
rnPat, rnPats, rnBindPat, rnPatAndThen,
@@ -72,7 +73,7 @@ import TysWiredIn ( nilDataCon )
import DataCon
import qualified GHC.LanguageExtensions as LangExt
-import Control.Monad ( when, liftM, ap, guard )
+import Control.Monad ( when, ap, guard )
import qualified Data.List.NonEmpty as NE
import Data.Ratio
@@ -107,11 +108,9 @@ p1 scope over p2,p3.
newtype CpsRn b = CpsRn { unCpsRn :: forall r. (b -> RnM (r, FreeVars))
-> RnM (r, FreeVars) }
+ deriving (Functor)
-- See Note [CpsRn monad]
-instance Functor CpsRn where
- fmap = liftM
-
instance Applicative CpsRn where
pure x = CpsRn (\k -> k x)
(<*>) = ap