summaryrefslogtreecommitdiff
path: root/testsuite/tests/deriving/should_run/drvrun009.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/deriving/should_run/drvrun009.hs')
-rw-r--r--testsuite/tests/deriving/should_run/drvrun009.hs20
1 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/tests/deriving/should_run/drvrun009.hs b/testsuite/tests/deriving/should_run/drvrun009.hs
new file mode 100644
index 0000000000..0bd22ab787
--- /dev/null
+++ b/testsuite/tests/deriving/should_run/drvrun009.hs
@@ -0,0 +1,20 @@
+-- !!! Check the Read instance for Array
+-- [Not strictly a 'deriving' issue]
+
+module Main( main ) where
+import Data.Array
+
+bds :: ((Int,Int),(Int,Int))
+bds = ((1,4),(2,5))
+
+type MyArr = Array (Int,Int) Int
+
+a :: MyArr
+a = array bds [ ((i,j), i+j) | (i,j) <- range bds ]
+
+main = do { putStrLn (show a) ;
+ let { b :: MyArr ;
+ b = read (show a) } ;
+ putStrLn (show b)
+ }
+