Commit 14b9d3a5 authored by simonpj's avatar simonpj
Browse files

[project @ 2002-07-23 14:51:01 by simonpj]

Add deriving record show test
parent dbb37607
......@@ -14,3 +14,4 @@ test "drvrun006" { vtr("", "", "") }
test "drvrun007" { vtr("", "", "") }
test "drvrun008" { vtr("-funbox-strict-fields", "", "") }
test "drvrun009" { vtr("", "", "") }
test "drvrun010" { vtr("", "", "") }
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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment