Commit 7341c6b8 authored by Simon Peyton Jones's avatar Simon Peyton Jones

Merge branch 'master' of http://darcs.haskell.org/testsuite

parents ccd4aa70 69db014b
module Dep01 where
import Control.Monad
import Control.Monad.ST
import Data.STRef
sumST :: Num a => [a] -> IO a
sumST xs = unsafeSTToIO $ do
n <- newSTRef 0
forM_ xs $ \x -> do
modifySTRef n (+x)
readSTRef n
Dep01.hs:8:12: Warning:
In the use of ‛unsafeSTToIO’ (imported from Control.Monad.ST):
Deprecated: "Please import from Control.Monad.ST.Unsafe instead; This will be removed in the next release"
module Dep02 where
import Control.Monad
import Control.Monad.ST.Lazy
import Data.STRef.Lazy
sumST :: Num a => [a] -> a
sumST xs = runST $ do
n <- newSTRef 0
forM_ xs $ \x -> do
modifySTRef n (+x)
readSTRef n
badST :: ()
badST = runST $ unsafeIOToST $ putStrLn "Hello World"
Dep02.hs:15:17: Warning:
In the use of ‛unsafeIOToST’ (imported from Control.Monad.ST.Lazy):
Deprecated: "Please import from Control.Monad.ST.Lazy.Unsafe instead; This will be removed in the next release"
......@@ -10,8 +10,6 @@ def f( name, opts ):
setTestOpts(f)
# Check correct methods are deprecated
test('Dep01', normal, compile, [''])
test('Dep02', normal, compile, [''])
test('Dep05', normal, compile_fail, [''])
test('Dep06', normal, compile_fail, [''])
test('Dep07', normal, compile_fail, [''])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment