diff options
Diffstat (limited to 'testsuite/tests/deriving/should_run/drvrun011.hs')
-rw-r--r-- | testsuite/tests/deriving/should_run/drvrun011.hs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/tests/deriving/should_run/drvrun011.hs b/testsuite/tests/deriving/should_run/drvrun011.hs new file mode 100644 index 0000000000..aad1482f2a --- /dev/null +++ b/testsuite/tests/deriving/should_run/drvrun011.hs @@ -0,0 +1,16 @@ +-- Tests some simple deriving stuff, and built-in instances + +module Main( main ) where + +data Command = Commit (Maybe String) | Foo | Baz Bool | Boz Int + deriving (Read,Show) + +type T = ([Command], [Command], [Command]) +val :: T +val = ([Commit Nothing, Commit (Just "foo")], + [Foo, Baz True], + [Boz 3, Boz (-2)]) + +main = do { print val ; + print ((read (show val)) :: T) } + |