diff options
author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2019-06-08 20:48:07 +0200 |
---|---|---|
committer | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2019-06-09 14:35:50 +0200 |
commit | 4c44e323e8ac0e28e87e93ab53cbf7eb21ac9c25 (patch) | |
tree | b0991218e9cac8f76224df017856045c71d779e4 /compiler/coreSyn/CoreLint.hs | |
parent | 8754002973dcde8709458044e541ddc8f4fcf6bb (diff) | |
download | haskell-wip/derive-functor.tar.gz |
Use DeriveFunctor throughout the codebase (#15654)wip/derive-functor
Diffstat (limited to 'compiler/coreSyn/CoreLint.hs')
-rw-r--r-- | compiler/coreSyn/CoreLint.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/coreSyn/CoreLint.hs b/compiler/coreSyn/CoreLint.hs index ef4e858568..91760c282b 100644 --- a/compiler/coreSyn/CoreLint.hs +++ b/compiler/coreSyn/CoreLint.hs @@ -7,6 +7,7 @@ A ``lint'' pass to check for Core correctness -} {-# LANGUAGE CPP #-} +{-# LANGUAGE DeriveFunctor #-} module CoreLint ( lintCoreBindings, lintUnfolding, @@ -2076,6 +2077,7 @@ newtype LintM a = LintEnv -> WarnsAndErrs -> -- Warning and error messages so far (Maybe a, WarnsAndErrs) } -- Result and messages (if any) + deriving (Functor) type WarnsAndErrs = (Bag MsgDoc, Bag MsgDoc) @@ -2146,9 +2148,6 @@ we behave as follows (#15057, #T15664): when the type is expanded. -} -instance Functor LintM where - fmap = liftM - instance Applicative LintM where pure x = LintM $ \ _ errs -> (Just x, errs) (<*>) = ap |