
1 Aug
2018
1 Aug
'18
1:49 a.m.
after using haskell for a while i was surprised by this little thing f::a->b f a=a and this is not making sense to me till now, so please can someone enlighten me, why does haskell assume that b can not be the same type of a? after all having two distinct math variables does not mean they can not have the same value. I know i could use f::a->a, but its not the same thing, on this last case I'm requesting them to be the same type, but on the first I'm not forbidding it, is there a math reason behind it? would type inference be rendered impossible if considering the case of them being equal? thanks Rui Azevedo (neu-rah)