| As I understand it the GHC team are heading towards a release including | TH in the not too distant future. I think it would be good if the | biggest outstanding issues could be fixed before then (and indeed, just | fixed ASAP). Yes, that's a good idea. | The one that causes me the most hoop jumping is the type parameters to | some of the TH datastructures. For example, I have some code like this: It's all to do with Tim's "two-level types" scheme, but I do agree with you that it seems more trouble than its worth. Tim: how vigorously do you want to defend this? If not, can we let Ian remove the parameterisation? Simon | -----Original Message----- | From: template-haskell-admin@haskell.org [mailto:template-haskell- | admin@haskell.org] On Behalf Of Ian Lynagh | Sent: 08 April 2003 13:17 | To: template-haskell@haskell.org | | | As I understand it the GHC team are heading towards a release including | TH in the not too distant future. I think it would be good if the | biggest outstanding issues could be fixed before then (and indeed, just | fixed ASAP). | | The one that causes me the most hoop jumping is the type parameters to | some of the TH datastructures. For example, I have some code like this: | | class ToDec a where | to_dec :: a -> Dec | | instance ToDec Dec where | to_dec = id | | class ToExp a where | to_exp :: a -> Exp | | instance ToExp Exp where | to_exp = id | | instance (ToExp e, ToDec d) => Foo (Match p e d) where | foo (Mat p (Normal e) ds) = bar (Normal (Let (map to_dec ds) (to_exp e))) | | Which I'd much rather be able to write as | | instance Foo Match where | foo (Mat p (Normal e) ds) = bar (Normal (Let (map to_dec ds) (to_exp e))) | | Previous discussions about this have all petered out before reaching a | conclusion, but I haven't seen anyone actually stand up and defend the | parameterised types, and it's hard to see how they could be useful | without everything being parameterised anyway. Can we get rid of them? | Please? Or at least have an explanation of why not... | | Hmmm, or maybe I should be asking for them to be extended to cover all | the types to make it easier to have a type of reification that annotates | the tree with type and strictness information. I'd still have the | problem above, but at least more things would be possible. | | Anyway, I'm confused, but sitting in the middle is just driving me mad! | | | Thanks | Ian | | _______________________________________________ | template-haskell mailing list | template-haskell@haskell.org | http://www.haskell.org/mailman/listinfo/template-haskell