Peculiar anomaly with record style data types and deriving Read
-- Given this data type
data Foo = Foo { foo :: Int } deriving (Read, Show)
-- this fails
bar :: Foo
bar = read "Foo 42"
-- However, non-record-style construction is allowed:
baz :: Foo
baz = Foo 42
Trac metadata
Trac field | Value |
---|---|
Version | 6.10.4 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |