aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2017-09-28 21:36:01 +0200
committerDaniel Gröber <dxld@darkboxed.org>2017-09-28 21:36:01 +0200
commit09b4ef21af303c55881cfa82b42ad8ed0d7c712f (patch)
tree4194b326e6a26b287080da0cfe06330ba9aa4ad9
parent4b7b646c4fddb1c368aead0315a1f6ce0784b230 (diff)
Fix lib with GHC<7.10
-rw-r--r--lib/Distribution/Helper.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Distribution/Helper.hs b/lib/Distribution/Helper.hs
index 73ad668..bef95ba 100644
--- a/lib/Distribution/Helper.hs
+++ b/lib/Distribution/Helper.hs
@@ -227,7 +227,7 @@ type MonadQuery m = ( MonadIO m
newtype ComponentQuery m a = ComponentQuery (Query m [(ChComponentName, a)])
deriving (Functor)
-instance Monad m => Apply (ComponentQuery m) where
+instance (Functor m, Monad m) => Apply (ComponentQuery m) where
ComponentQuery flab <.> ComponentQuery fla =
ComponentQuery $ liftM2 go flab fla
where
@@ -289,7 +289,7 @@ packageId :: MonadIO m => Query m (String, Version)
-- | Run a ComponentQuery on all components of the package.
components :: Monad m => ComponentQuery m (ChComponentName -> b) -> Query m [b]
-components (ComponentQuery sc) = map (\(cn, f) -> f cn) <$> sc
+components (ComponentQuery sc) = map (\(cn, f) -> f cn) `liftM` sc
-- | Modules or files Cabal would have the compiler build directly. Can be used
-- to compute the home module closure for a component.