
7 Dec
2007
7 Dec
'07
2:57 p.m.
On Dec 7, 2007 7:41 PM, Dan Weston
Luke Palmer wrote:
You can project the compile time numbers into runtime ones:
Yes, that works well if I know a priori what the arity of the function is. But I want to be able to have the compiler deduce the arity of the function (e.g. by applying undefined until it is no longer a function), precisely so I don't have to supply it myself.
Function arity is (I think) something already known to GHC, so I don't know why we can't get at it too.
No, it is not. Consider: compose f g x = f (g x) What is the arity of f? Luke