
24 Mar
2007
24 Mar
'07
11:15 a.m.
apfelmus schrieb:
For me, the fourth trial works, at least on
f :: (forall s . Num s => Maybe s) -> Int f y = case y of Just x -> x Nothing -> 0
This works, because the compiler knows that x has to have type Int. But if you want to apply a function g :: (forall a. Num a => a) -> Int to x before returning, it doesn't work any more. But I need this function application. However, thanks for your help. Regards, Martin.