[Haskell-cafe] Re: Pickling HList
joelr1 at gmail.com
Tue Nov 22 11:29:29 EST 2005
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 since.
My idea was to, basically, create my own record sans labels. I wanted
to specify picklers and default values for each field instead. I have
over 250 records, though, and some have over 10 fields. There is a
lot of sharing of fields between the records but I still think this
is too much for GHC to handle.
Can you venture a guess on runtime performance of such code?
On Nov 22, 2005, at 4:07 PM, Keean Schupke wrote:
> hMarkAll Just hlist
> class HList l => HMarkAll c l m | c l -> m where
> hMarkAll :: (forall a . a -> c a) -> l -> m
> instance HMarkAll c HNil HNil where
> hMarkAll _ _ = HNil
> instance HMarkAll c l m => HMarkAll c (HCons e l) (HCons (c e)
> m) where
> hMarkAll c (HCons e l) = HCons (c e) (hMarkAll c l)
More information about the Haskell-Cafe