summaryrefslogtreecommitdiff
path: root/testsuite/tests/deriving/should_run/drvrun012.hs
blob: 3775a3b958a1e4a4bf8db5608476a6728968511e (plain)
1
2
3
4
5
6
7
8
9
10
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)