X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=compiler%2Futils%2FMonadUtils.hs;h=b1882c349fc5ada3bc96d0acc30a9154205494f6;hb=e4fa0854318cde1a317727ab3d29edc0ca772e9d;hp=edce9957867dae5d2bff79aeb6618d06669f0b32;hpb=acb70e7c53a81ffea471d3bd6fb75c12e6bb2a37;p=ghc-hetmet.git diff --git a/compiler/utils/MonadUtils.hs b/compiler/utils/MonadUtils.hs index edce995..b1882c3 100644 --- a/compiler/utils/MonadUtils.hs +++ b/compiler/utils/MonadUtils.hs @@ -21,7 +21,11 @@ module MonadUtils -- Detection of available libraries ---------------------------------------------------------------------------------------- +#if __GLASGOW_HASKELL__ >= 606 #define HAVE_APPLICATIVE 1 +#else +#define HAVE_APPLICATIVE 0 +#endif -- we don't depend on MTL for now #define HAVE_MTL 0 @@ -54,6 +58,10 @@ class Functor f => Applicative f where infixl 4 <$> infixl 4 <*> +instance Applicative IO where + pure = return + (<*>) = ap + #endif ----------------------------------------------------------------------------------------