summaryrefslogtreecommitdiff
path: root/testsuite/tests/lib/should_run/text001.hs
blob: 18aab82dd993784f31270ca45a72bf384b5a2bd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{-	Bug report 28 May 99

When compiled with ghc-4.02, everything's fine, it outputs "Value 7" as
expected. But compiled with ghc-pre-4.03 it yields this error message.

   Fail: Prelude.read: no parse
-}

module Main where

data Msg = Value Int | Inc   deriving (Show, Read)
  
main = do let v = read "Value 7"::Msg
          print v