
1 Jun
2007
1 Jun
'07
12:43 p.m.
I have a function for checking return values of functions: checkResult :: String -> CInt -> IO () checkResult _ 0 = return () checkResult f n = fail $ f ++ " failed (" ++ show n ++ ")" Now, I want to call that on the exit value of lots of functions, like this: {#fun foo {} -> `()' `checkResult "foo"'*- #} {#fun bar {} -> `()' `checkResult "bar"'*- #} ... However, the marshallers can only be function names, not arbitrary expressions. Wouldn't it be a useful generalization to allow arbitrary expressions as marshallers? That way you could even have one-off marshallers as lambda expressions. /Björn