Instances for ST not available in nhc98.
authorMalcolm.Wallace@me.com <unknown>
Tue, 4 Jan 2011 12:51:42 +0000 (12:51 +0000)
committerMalcolm.Wallace@me.com <unknown>
Tue, 4 Jan 2011 12:51:42 +0000 (12:51 +0000)
Control/Applicative.hs

index 4997a6a..a7f7fe8 100644 (file)
@@ -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