summaryrefslogtreecommitdiff
path: root/testsuite/tests/deriving/should_run/drvrun012.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/deriving/should_run/drvrun012.hs')
-rw-r--r--testsuite/tests/deriving/should_run/drvrun012.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/deriving/should_run/drvrun012.hs b/testsuite/tests/deriving/should_run/drvrun012.hs
new file mode 100644
index 0000000000..3775a3b958
--- /dev/null
+++ b/testsuite/tests/deriving/should_run/drvrun012.hs
@@ -0,0 +1,11 @@
+-- Tests readings of record syntax
+
+module Main where
+
+data Foo = Foo { x :: Baz, y :: Maybe Int } deriving (Read,Show)
+
+infix 0 :%%
+data Baz = Int :%% Int deriving( Read,Show)
+
+
+main = print (read "Foo { x = 1 :%% 2, y = Just 4 }" :: Foo)