From: Malcolm.Wallace@me.com Date: Tue, 4 Jan 2011 12:51:42 +0000 (+0000) Subject: Instances for ST not available in nhc98. X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=e4680148143d38e6dd2d7a9372e9392f1f5e63f0;hp=22dac12605805b0e2139caf975ba45d7d1fd5d47;p=ghc-base.git Instances for ST not available in nhc98. --- 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