[Haskell-cafe] Are there arithmetic composition of functions?

sdiyazg at sjtu.edu.cn sdiyazg at sjtu.edu.cn
Wed Mar 21 14:18:14 CET 2012

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.

More information about the Haskell-Cafe mailing list