Fork me on GitHub
#core-typed
<
2017-07-07
>
mrchance14:07:58

@didibus Well, the return type of a function is obviously the type of the body, and if y is used as an arg to +, then it must be a number. Sounds pretty straightforward to me.

mrchance14:07:36

I am reasonably sure that Haskell could infer it

mrchance14:07:59

test x = x + 5

*Main> :t test
test :: Num a => a -> a