From e4680148143d38e6dd2d7a9372e9392f1f5e63f0 Mon Sep 17 00:00:00 2001 From: "Malcolm.Wallace@me.com" Date: Tue, 4 Jan 2011 12:51:42 +0000 Subject: [PATCH] Instances for ST not available in nhc98. --- Control/Applicative.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Control/Applicative.hs b/Control/Applicative.hs index 4997a6a..a7f7fe8 100644 --- a/Control/Applicative.hs +++ b/Control/Applicative.hs @@ -41,8 +41,10 @@ import Control.Category import Control.Arrow (Arrow(arr, (&&&)), ArrowZero(zeroArrow), ArrowPlus((<+>))) import Control.Monad (liftM, ap, MonadPlus(..)) import Control.Monad.Instances () +#ifndef __NHC__ import Control.Monad.ST (ST) import qualified Control.Monad.ST.Lazy as Lazy (ST) +#endif import Data.Functor ((<$>), (<$)) import Data.Monoid (Monoid(..)) @@ -152,6 +154,7 @@ instance Applicative IO where pure = return (<*>) = ap +#ifndef __NHC__ instance Applicative (ST s) where pure = return (<*>) = ap @@ -159,6 +162,7 @@ instance Applicative (ST s) where instance Applicative (Lazy.ST s) where pure = return (<*>) = ap +#endif #ifdef __GLASGOW_HASKELL__ instance Applicative STM where -- 1.7.10.4