
6 Jul
2011
6 Jul
'11
5:23 a.m.
On Wed, 6 Jul 2011, Ian Childs wrote:
Suppose I have two terms s and t of type "a" and "b" respectively, and I want to write a function that returns s applied to t if "a" is an arrow type of form "b -> c", and nothing otherwise. How do i convince the compiler to accept the functional application only in the correct instance?
Why can't 's' simply have type 'b -> c'? With "term" do you mean a Haskell expression?