X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=GHC%2FIO.hs;h=9615953a1525018ede21451ea32d799eb1ddde56;hb=c821b83ac3c6f6cceeceee702b033d53aa92258c;hp=f2ccc7d5b974047d2bc20c7e981cc61cf149017a;hpb=7e8f2da24a671fa3b314e49f244cabe37af7ccd2;p=ghc-base.git diff --git a/GHC/IO.hs b/GHC/IO.hs index f2ccc7d..9615953 100644 --- a/GHC/IO.hs +++ b/GHC/IO.hs @@ -1,5 +1,5 @@ {-# OPTIONS_GHC -fno-warn-orphans #-} -{-# OPTIONS_GHC -XNoImplicitPrelude -funbox-strict-fields #-} +{-# OPTIONS_GHC -XNoImplicitPrelude -funbox-strict-fields -XBangPatterns #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | @@ -336,7 +336,4 @@ a `finally` sequel = -- > evaluate x = (return $! x) >>= return -- evaluate :: a -> IO a -evaluate a = IO $ \s -> case a `seq` () of () -> (# s, a #) - -- NB. can't write - -- a `seq` (# s, a #) - -- because we can't have an unboxed tuple as a function argument +evaluate a = IO $ \s -> let !va = a in (# s, va #) -- NB. see #2273