[Haskell] Weird field name mangling.
Simon Peyton-Jones
simonpj at microsoft.com
Thu Nov 23 03:50:00 EST 2006
[Redirecting to ghc-bugs]
That's a bug in 6.4.1 thank you. The reason has to do with z-encoding strings in case they are output to C-land.
Happily the bug is not present in 6.6; I doubt we'll fix 6.4.1 now.
I've added a test to make sure it does not creep back: drvrun022
Simon
| -----Original Message-----
| From: haskell-bounces at haskell.org [mailto:haskell-bounces at haskell.org] On Behalf Of Arthur van
| Leeuwen
| Sent: 22 November 2006 16:59
| To: haskell at haskell.org
| Subject: [Haskell] Weird field name mangling.
|
| L.S.,
|
| consider the following code:
|
| > module TestZ where
| >
| > import Data.Generics
| >
| > data TestZ = TestZ { testz :: Int }
| > deriving (Show, Read, Eq, Typeable, Data)
| >
| > main = print $ constrFields . toConstr $ TestZ { testz = 2 }
|
| I would expect this to output ["testz"]. Instead it outputs ["testzz"],
| using GHCi 6.4.1. Why is that z doubled?
|
| Doei, Arthur.
|
| --
|
| /\ / | arthurvl at cs.uu.nl | Work like you don't need
| the money
| /__\ / | A friend is someone with whom | Love like you have never
| been hurt
| / \/__ | you can dare to be yourself | Dance like there's nobody
| watching
|
|
|
| _______________________________________________
| Haskell mailing list
| Haskell at haskell.org
| http://www.haskell.org/mailman/listinfo/haskell
More information about the Glasgow-haskell-bugs
mailing list