[project @ 1999-02-19 17:11:59 by simonm]
authorsimonm <unknown>
Fri, 19 Feb 1999 17:12:07 +0000 (17:12 +0000)
committersimonm <unknown>
Fri, 19 Feb 1999 17:12:07 +0000 (17:12 +0000)
Some test updates.

17 files changed:
ghc/tests/array/should_run/arr003.hs
ghc/tests/array/should_run/arr007.hs
ghc/tests/array/should_run/arr008.hs
ghc/tests/array/should_run/arr012.hs
ghc/tests/array/should_run/arr013.hs
ghc/tests/array/should_run/arr014.hs
ghc/tests/ccall/should_compile/cc003.hs
ghc/tests/codeGen/should_run/cg044.hs
ghc/tests/codeGen/should_run/cg045.stderr
ghc/tests/deSugar/should_compile/ds002.stderr
ghc/tests/deSugar/should_compile/ds003.stderr
ghc/tests/deSugar/should_compile/ds019.stderr
ghc/tests/deSugar/should_compile/ds020.stderr
ghc/tests/deSugar/should_compile/ds022.stderr
ghc/tests/deSugar/should_compile/ds040.stderr
ghc/tests/deSugar/should_compile/ds043.stderr
ghc/tests/deSugar/should_run/dsrun005.stderr

index 14a9921..b264951 100644 (file)
@@ -12,8 +12,5 @@
 import Array
 
 main =
- let a1 = array (1,3) (zip ([1..4]) ['a'..'d']) in
+ let a1 = array (1::Int,3) (zip ([1..4]) ['a'..'d']) in
  print (a1!2)
-
-
-
index ec0c983..df9c34a 100644 (file)
@@ -6,6 +6,6 @@ import Array
 
 main =
  let 
-  a1 = array (1,0) [(1,'a')]
+  a1 = array (1::Int,0) [(1,'a')]
  in
  print (a1!0)
index 30d79a6..237b0c1 100644 (file)
@@ -8,7 +8,7 @@ import Array
 
 main = 
  let 
-  a1 = array (1,0) []
-  a2 = array (0,1) (zip [0..] ['a'..'z'])
+  a1 = array (1::Int,0) []
+  a2 = array (0::Int,1) (zip [0..] ['a'..'z'])
  in
  print (a1::Array Int Int) >> print a2
index e0ed3a9..895efac 100644 (file)
@@ -11,7 +11,7 @@ main =
   a1 = array (0,10) (zip [0..10] ['a'..'z'])
  in
  print a1 >>
- print (map (toUpper) a1) >>
+ print (fmap (toUpper) a1) >>
  print (ixmap (3,8) (+1) a1)
 
 
index 8dafb42..08205b0 100644 (file)
@@ -9,7 +9,7 @@ main = putStr (shows sub_b "\n")
        sub_b = ixmap (102, 113) id b
 
        b :: Array Int Double
-       b = map ( \ r -> fromRational r / pi )
+       b = fmap ( \ r -> fromRational r / pi )
                 (ixmap (101,200) (\ i -> toInteger i - 100) a)
 
        a :: Array Integer (Ratio Integer)
index 7efb1b5..44a31fd 100644 (file)
@@ -18,7 +18,7 @@ setup = let isz = 10
 --         x <- newArray (0, omax) (error "uninitialised")
            dmy <- newArray (0, imax) 0      
            x <- newArray (0, omax) dmy
-           as <- (accumulate . replicate osz) (newArray (0, imax) 6)
+           as <- (sequence . replicate osz) (newArray (0, imax) 6)
            mapM_ (\(i,v) -> writeArray x i v) (zip [0..omax] as)
            return x      
 
index 4ac4c82..c2a71e8 100644 (file)
@@ -4,4 +4,4 @@ module ShouldCompile where
 
 fubar :: IO Int
 fubar = _ccall_ f >>_ccall_ b
-                    --^ result type of f "lost" (never gets generalised)
+                    -- ^ result type of f "lost" (never gets generalised)
index 75efa61..c5afa9d 100644 (file)
@@ -3,8 +3,8 @@ module Main(main) where
 
 main :: IO ()
 main = do
- sequence (map putStrLn double_tests)
- sequence (map putStrLn float_tests)
+ sequence_ (map putStrLn double_tests)
+ sequence_ (map putStrLn float_tests)
   where
    double_tests = run_tests double_numbers
    float_tests  = run_tests float_numbers  
index df8bdc1..479570d 100644 (file)
@@ -1,2 +1,2 @@
 
-Fail: hello world!
\ No newline at end of file
+Fail: hello world!
index a5435e8..b9d7d06 100644 (file)
@@ -5,5 +5,3 @@ ds002.hs:7: Pattern match(es) are overlapped in the definition of function `f':
 
 ds002.hs:11: Pattern match(es) are overlapped in the definition of function `g':
            g x y z = ...
-
-
index c7a52de..11e93b0 100644 (file)
@@ -2,5 +2,3 @@
 ds003.hs:5: Pattern match(es) are overlapped in the definition of function `f':
            f (x : (x1 : (x2 : x3))) ~(y, ys) z = ...
            f x y True = ...
-
-
index 318885b..502a6c9 100644 (file)
@@ -3,5 +3,3 @@ ds019.hs:5: Pattern match(es) are overlapped in the definition of function `f':
            f d (j, k) p = ...
            f (e, f, g) l q = ...
            f h (m, n) r = ...
-
-
index d75568c..719bd5e 100644 (file)
@@ -11,5 +11,3 @@ ds020.hs:13: Pattern match(es) are overlapped in the definition of function `d':
 
 ds020.hs:19: Pattern match(es) are overlapped in the definition of function `f':
            f (x@~[]) = ...
-
-
index d935cb4..3ed5e4e 100644 (file)
@@ -2,5 +2,3 @@
 ds022.hs:20: Pattern match(es) are overlapped in the definition of function `i':
            i 1 1.1 = ...
            i 2 2.2 = ...
-
-
index f420d6a..0a7bb3f 100644 (file)
@@ -1,5 +1,3 @@
 
 ds040.hs:7: Pattern match(es) are overlapped in the definition of function `^^^^':
            ^^^^ _ _ = ...
-
-
index 4ffb3fb..84fc830 100644 (file)
@@ -2,5 +2,3 @@
 ds043.hs:8: Pattern match(es) are overlapped in a group of case alternatives beginning
                                                 (B _ _ _ _ True False):
            B {e = True, f = False} -> ...
-
-
index f266a5a..1b77cf3 100644 (file)
@@ -1,2 +1,4 @@
-dsrun005.hs:42: Non-exhaustive patterns in function f
+
+Fail: dsrun005.hs:42: Non-exhaustive patterns in function f
+