[Hugs] #46: Records aren't working properly when declared using 'newtype' syntax.
#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: {{{ " Program error: pattern match failure: instShow_v16_v1443 (Test_Test "b") }}} It I change "newtype" with "data", all is OK. -- Ticket URL: http://hackage.haskell.org/trac/hugs/ticket/46 Hugs http://www.haskell.org/hugs/ Hugs 98, an interpreter for Haskell
#46: Records aren't working properly when declared using 'newtype' syntax. ----------------------+----------------------------------------------------- Reporter: Elifant | Owner: nobody Type: defect | Status: closed Priority: major | Milestone: next release Component: hugs | Version: 200609 Resolution: fixed | Keywords: newtype record ----------------------+----------------------------------------------------- Changes (by ross): * resolution: => fixed * status: new => closed Comment: now fixed in CVS (but see #48). -- Ticket URL: http://hackage.haskell.org/trac/hugs/ticket/46 Hugs http://www.haskell.org/hugs/ Hugs 98, an interpreter for Haskell
participants (1)
-
Hugs