13 Nov 2006 05:11
[Hugs] #46: Records aren't working properly when declared using 'newtype' syntax.
Hugs <trac <at> galois.com>
2006-11-13 04:11:15 GMT
2006-11-13 04:11:15 GMT
#46: Records aren't working properly when declared using 'newtype' syntax.
----------------------------+-----------------------------------------------
Reporter: Elifant | Owner: nobody
Type: defect | Status: new
Priority: major | Milestone: next release
Component: hugs | Version: 200609
Keywords: newtype record |
----------------------------+-----------------------------------------------
Test code:
{{{
newtype Test = Test { var :: String }
main = print (var x)
where x = Test { var = "a" }
}}}
Output:
{{{
"
Program error: pattern match failure: instShow_v16_v1443 (Test_Test "a")
}}}
Records update is also broken:
{{{
newtype Test = Test { var :: String }
main = print (var x{var="b"})
where x = Test "a"
}}}
Output:
{{{
(Continue reading)
RSS Feed