X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Flib%2Ftests%2FArray%2Farr009%2FMain.hs;fp=ghc%2Flib%2Ftests%2FArray%2Farr009%2FMain.hs;h=a6fe26e04d1d6422a437fe15af916e89d51b1791;hb=1fb1ab5d53a09607e7f6d2450806760688396387;hp=0000000000000000000000000000000000000000;hpb=fa6fb09e2e4e6918eebc79ed187f32c88817c9db;p=ghc-hetmet.git diff --git a/ghc/lib/tests/Array/arr009/Main.hs b/ghc/lib/tests/Array/arr009/Main.hs new file mode 100644 index 0000000..a6fe26e --- /dev/null +++ b/ghc/lib/tests/Array/arr009/Main.hs @@ -0,0 +1,17 @@ +-- Array - derived ops +-- +-- testing the well-behavedness of +-- derived ops for empty and non-empty arrays +-- +import Array + +main = + let + a1 = array (1,0) ([]::[(Int,Int)]) + a2 = array (1,26) (zip [1..] ['a'..'z']) + + dump a = (bounds a, indices a, elems a, assocs a) + in + print (dump a1) >> + print (dump a2) +