Re: [Haskell-cafe] Problem with TemplateHaskell

2011-11-02 Thread Magicloud Magiclouds
On Tue, Nov 1, 2011 at 5:42 PM, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: Hi,  I have code as following, to make a toDocument function (using Data.Bsin.=:) for a data structure. bson :: DecsQ - DecsQ bson decsq = do  decs - decsq  let datad = head decs      DataD _ _ _

Re: [Haskell-cafe] Problem with TemplateHaskell

2011-11-02 Thread Max Bolingbroke
On 2 November 2011 07:42, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: How to avoid the name changing? Maybe you should use nameBase rather than show? Max ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Problem with TemplateHaskell

2011-11-02 Thread Magicloud Magiclouds
On Wed, Nov 2, 2011 at 4:08 PM, Max Bolingbroke batterseapo...@hotmail.com wrote: On 2 November 2011 07:42, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: How to avoid the name changing? Maybe you should use nameBase rather than show? Max Yes, that is one of the problem. And

Re: [Haskell-cafe] Problem with TemplateHaskell

2011-11-02 Thread Magicloud Magiclouds
On Wed, Nov 2, 2011 at 4:50 PM, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: On Wed, Nov 2, 2011 at 4:08 PM, Max Bolingbroke batterseapo...@hotmail.com wrote: On 2 November 2011 07:42, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: How to avoid the name changing?

[Haskell-cafe] Problem with TemplateHaskell

2011-11-01 Thread Magicloud Magiclouds
Hi, I have code as following, to make a toDocument function (using Data.Bsin.=:) for a data structure. bson :: DecsQ - DecsQ bson decsq = do decs - decsq let datad = head decs DataD _ _ _ cons _ = datad to = mkName toDocument from = mkName fromDocument fund - mapM (\con