blob: aad1482f2ad574b74905ff99a008ecddea5b17f1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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) }
|