
21 Mar
2012
21 Mar
'12
9:18 a.m.
Wow, there are so many people interested in this:) After reading the replies and some trail and error, now I think I need to look into Numeric Prelude first. I hadn't known of NP until reading Richard O'Keefe's reply. I will also try purely syntactic expansion with TH, but I haven't used TH seriously anyway. On a side note, if we consider typeclasses as predicates on types, then (especially with the extensions enabled) the type system looks extremely like a obfuscated logic programming language.With existential types it even starts to look like a first-order thereom prover. At present we can easily express different flavors of conjunction, but expressing disjunction is hard. And that's why the Prelude can cause problems here.