diff options
author | Simon Marlow <simonmar@microsoft.com> | 2008-02-01 12:27:53 +0000 |
---|---|---|
committer | Simon Marlow <simonmar@microsoft.com> | 2008-02-01 12:27:53 +0000 |
commit | e4fa0854318cde1a317727ab3d29edc0ca772e9d (patch) | |
tree | 24f5893404124b9029aa967aa1c16fb014365323 /compiler/utils/MonadUtils.hs | |
parent | 21c9699eb5175355db4c44643a58b3c532238400 (diff) | |
download | haskell-e4fa0854318cde1a317727ab3d29edc0ca772e9d.tar.gz |
FIX BUILD with GHC 6.4.x
Diffstat (limited to 'compiler/utils/MonadUtils.hs')
-rw-r--r-- | compiler/utils/MonadUtils.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/utils/MonadUtils.hs b/compiler/utils/MonadUtils.hs index edce995786..b1882c349f 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 ---------------------------------------------------------------------------------------- |