blob: 0a2f3d27420b1ff7eb2ce0a967d122027cd12ee1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
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
|