Re: [Haskell-cafe] Re: Pickling HList

2005-11-22 Thread Keean Schupke
This function is already in the HList library (well early versions anyway)... I dont think this is in the current distribution. Its a generic constructor wrapper. For example: hMarkAll Just hlist class HList l = HMarkAll c l m | c l - m where hMarkAll :: (forall a . a - c a) -

Re: [Haskell-cafe] Re: Pickling HList

2005-11-22 Thread Joel Reymont
Keean, I sort of gave up on HList for the time being since I found easier ways to solve my problem. Mainly, I could not estimate the impact it would have on run-time performance of my code and GHC not being able to compile the code was not a good indication. Simon PJ fixed that error

Re: [Haskell-cafe] Re: Pickling HList

2005-11-22 Thread Keean Schupke
That all depends... In theory all the HList stuff happens at compile time, and what you are left with is normal function application... Of course compilers arn't that good yet, but as a reasonable idea, consider just that value level... Most of the extra work is the packing/unpacking of pairs

[Haskell-cafe] Re: Pickling HList

2005-11-10 Thread Joel Reymont
Credit goes to Cale: class (HList l, HList p) = HLPU p l | p - l, l - p where puHList :: p - PU l instance HLPU HNil HNil where puHList HNil = lift HNil instance (HList l, HLPU p l) = HLPU (HCons (PU e) p) (HCons e l) where puHList (HCons pe l) = wrap (\(a, b) - HCons a b,