[Haskell-cafe] Re: HList error with hFoldr

2008-02-02 Thread Denis Bueno
On Jan 28, 2008 12:45 AM, [EMAIL PROTECTED] wrote: It seems strange that you need the types e and e' (perhaps this is a quirk or a bug of GHC 6.8). With GHC 6.6, I have derived the following instance (Floating f, MetricSpace e f, HFoldr ApplyDistSum Float l1 f, HZip (HCons e l)

[Haskell-cafe] Re: HList error with hFoldr

2008-01-27 Thread oleg
After some fooling around, I came up with something I think makes sense. Let me know if this is the right/wrong thing. It seems to work for the examples I've tried so far. instance (Floating f, MetricSpace e f ,MetricSpace e' f, HZip l l (HCons (e', e') l') ,HFoldr

[Haskell-cafe] Re: HList error with hFoldr

2008-01-26 Thread Denis Bueno
On Sat, Jan 26, 2008 at 1:59 AM, [EMAIL PROTECTED] wrote: [snip useful explanation of error} Here's a bit elaborated example: [...] Thanks! this works, and I understand why it didn't before. The example I posted was a stepping stone toward a definition of distance using hFoldr and hZip.

[Haskell-cafe] Re: HList error with hFoldr

2008-01-26 Thread Denis Bueno
On Sat, Jan 26, 2008 at 11:03 AM, Denis Bueno [EMAIL PROTECTED] wrote: Have I made some sort of simple error, or am I going about this the wrong way altogether? After some fooling around, I came up with something I think makes sense. Let me know if this is the right/wrong thing. It seems to