repeated field name allowed in constructor
data Foo = Bar {x :: Int}
| Baz {x :: Int,
x :: String
}
main = do let a = Bar 1
b = Baz 2 "3"
print $ x a
print $ x b
:load "p:/DSFP/sandbox/bug1.hs" GHCi, version 7.8.3: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Prelude> [1 of 1] Compiling Main ( P:\DSFP\sandbox\bug1.hs, interpreted ) Ok, modules loaded: Main.
- Main> main
1 1729382256910738103
- Main>
Trac metadata
Trac field | Value |
---|---|
Version | 7.8.3 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |