[Haskell] Weird field name mangling.
Arthur van Leeuwen
arthurvl at cs.uu.nl
Wed Nov 22 11:58:49 EST 2006
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
More information about the Haskell
mailing list