[project @ 1998-01-07 18:27:51 by simonm]
authorsimonm <unknown>
Wed, 7 Jan 1998 18:27:53 +0000 (18:27 +0000)
committersimonm <unknown>
Wed, 7 Jan 1998 18:27:53 +0000 (18:27 +0000)
add nofib/GHC_ONLY/array002 to the array test suite.

ghc/tests/array/should_run/arr013.hs [new file with mode: 0644]
ghc/tests/array/should_run/arr013.stdout [new file with mode: 0644]

diff --git a/ghc/tests/array/should_run/arr013.hs b/ghc/tests/array/should_run/arr013.hs
new file mode 100644 (file)
index 0000000..8dafb42
--- /dev/null
@@ -0,0 +1,17 @@
+import Ratio -- 1.3
+import Array -- 1.3
+infix 1 =:
+(=:) a b = (a,b)
+
+main = putStr (shows sub_b "\n")
+    where
+       sub_b :: Array Int Double
+       sub_b = ixmap (102, 113) id b
+
+       b :: Array Int Double
+       b = map ( \ r -> fromRational r / pi )
+                (ixmap (101,200) (\ i -> toInteger i - 100) a)
+
+       a :: Array Integer (Ratio Integer)
+       a = array (1,100) ((1 =: 1) : [i =: fromInteger i * a!(i-1)
+                                       | i <- [2..100]])
diff --git a/ghc/tests/array/should_run/arr013.stdout b/ghc/tests/array/should_run/arr013.stdout
new file mode 100644 (file)
index 0000000..a4093df
--- /dev/null
@@ -0,0 +1 @@
+array (102, 113) [(102, 0.6366197723675814), (103, 1.909859317102744), (104, 7.639437268410976), (105, 38.197186342054884), (106, 229.1831180523293), (107, 1604.281826366305), (108, 12834.25461093044), (109, 115508.29149837396), (110, 1155082.9149837396), (111, 1.2705912064821135e7), (112, 1.5247094477785364e8), (113, 1.9821222821120973e9)]