Use explicit language extensions & remove extension fields from base.cabal
[ghc-base.git] / Control / Applicative.hs
index 4997a6a..c38e580 100644 (file)
@@ -1,3 +1,5 @@
+{-# LANGUAGE CPP #-}
+
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  Control.Applicative
@@ -41,8 +43,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 +156,7 @@ instance Applicative IO where
     pure = return
     (<*>) = ap
 
+#ifndef __NHC__
 instance Applicative (ST s) where
     pure = return
     (<*>) = ap
@@ -159,6 +164,7 @@ instance Applicative (ST s) where
 instance Applicative (Lazy.ST s) where
     pure = return
     (<*>) = ap
+#endif
 
 #ifdef __GLASGOW_HASKELL__
 instance Applicative STM where