diff options
Diffstat (limited to 'testsuite/tests/deriving/should_run/drvrun010.hs')
-rw-r--r-- | testsuite/tests/deriving/should_run/drvrun010.hs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/deriving/should_run/drvrun010.hs b/testsuite/tests/deriving/should_run/drvrun010.hs new file mode 100644 index 0000000000..0a2f3d2742 --- /dev/null +++ b/testsuite/tests/deriving/should_run/drvrun010.hs @@ -0,0 +1,12 @@ +module Main where + +data Test = Test { field :: Int } deriving (Eq,Show,Read) + +main = putStrLn $ + if read (show (Test {field=(-1)})) == Test (-1) + then "works" else "not" + +-- The point here is that if 'show' generates +-- Test { field=-1 } +-- the lexer things the '=-' is one lexeme, which does not work + |