X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Prelude.hs;h=8ede773a3674646398dd2744bbb08a30acc749aa;hb=08cc1c4f54b482dffaef1a1b43c5e0208894f643;hp=bb83068e300e7fd56e113c39c7e6778b65745355;hpb=d2063b5b0be014545b21819172c87756efcb0b0c;p=ghc-base.git diff --git a/Prelude.hs b/Prelude.hs index bb83068..8ede773 100644 --- a/Prelude.hs +++ b/Prelude.hs @@ -1,4 +1,4 @@ -{-# OPTIONS_GHC -XNoImplicitPrelude #-} +{-# OPTIONS_GHC -XNoImplicitPrelude -XBangPatterns #-} ----------------------------------------------------------------------------- -- | -- Module : Prelude @@ -155,15 +155,15 @@ import Data.Tuple #ifdef __GLASGOW_HASKELL__ import GHC.Base -import GHC.IO -import GHC.IO.Exception +-- import GHC.IO +-- import GHC.IO.Exception import Text.Read import GHC.Enum import GHC.Num import GHC.Real import GHC.Float import GHC.Show -import GHC.Err ( error, undefined ) +import GHC.Err ( undefined ) #endif #ifdef __HUGS__ @@ -172,12 +172,16 @@ import Hugs.Prelude #ifndef __HUGS__ infixr 0 $! +#endif -- ----------------------------------------------------------------------------- -- Miscellaneous functions -- | Strict (call-by-value) application, defined in terms of 'seq'. ($!) :: (a -> b) -> a -> b +#ifdef __GLASGOW_HASKELL__ +f $! x = let !vx = x in f vx -- see #2273 +#elif !defined(__HUGS__) f $! x = x `seq` f x #endif