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/main/CmdLineParser.hs | |
parent | 8754002973dcde8709458044e541ddc8f4fcf6bb (diff) | |
download | haskell-wip/derive-functor.tar.gz |
Use DeriveFunctor throughout the codebase (#15654)wip/derive-functor
Diffstat (limited to 'compiler/main/CmdLineParser.hs')
-rw-r--r-- | compiler/main/CmdLineParser.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/main/CmdLineParser.hs b/compiler/main/CmdLineParser.hs index 6763aed128..d2cc56f033 100644 --- a/compiler/main/CmdLineParser.hs +++ b/compiler/main/CmdLineParser.hs @@ -1,4 +1,5 @@ {-# LANGUAGE CPP #-} +{-# LANGUAGE DeriveFunctor #-} ------------------------------------------------------------------------------- -- @@ -166,9 +167,7 @@ liftEwM action = EwM (\_ es ws -> do { r <- action; return (es, ws, r) }) -- (CmdLineP s) typically instantiates the 'm' in (EwM m) and (OptKind m) newtype CmdLineP s a = CmdLineP { runCmdLine :: s -> (a, s) } - -instance Functor (CmdLineP s) where - fmap = liftM + deriving (Functor) instance Applicative (CmdLineP s) where pure a = CmdLineP $ \s -> (a, s) |