From 09b4ef21af303c55881cfa82b42ad8ed0d7c712f Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Thu, 28 Sep 2017 21:36:01 +0200 Subject: Fix lib with GHC<7.10 --- lib/Distribution/Helper.hs | 4 ++-- 1 file 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. -- cgit v1.2.3