summaryrefslogtreecommitdiff
path: root/testsuite/tests/parser/should_run/operator.hs
blob: 5a7bcf9e97320fd67ccb7c804841311fcf085b15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
module Main where

data Hash = Hash { (#) :: Int }
  deriving (Show,Read)

main = do
  let h = Hash 3
      s = show h
      x = read s :: Hash
      y = show x
  print h
  putStrLn s
  print x
  putStrLn y
  let h' = Hash { (#) = 3 }
      s' = show h'
      x' = read s' :: Hash
      y' = show x'
  print h'
  putStrLn s'
  print x'
  putStrLn y'