From: simonm Date: Wed, 7 Jan 1998 18:27:53 +0000 (+0000) Subject: [project @ 1998-01-07 18:27:51 by simonm] X-Git-Tag: Approx_2487_patches~1115 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=b3163aefcecd596fe200f9d3cb5ea82443767269;p=ghc-hetmet.git [project @ 1998-01-07 18:27:51 by simonm] add nofib/GHC_ONLY/array002 to the array test suite. --- diff --git a/ghc/tests/array/should_run/arr013.hs b/ghc/tests/array/should_run/arr013.hs new file mode 100644 index 0000000..8dafb42 --- /dev/null +++ b/ghc/tests/array/should_run/arr013.hs @@ -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 index 0000000..a4093df --- /dev/null +++ b/ghc/tests/array/should_run/arr013.stdout @@ -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)]