To answer your questions, a -> b denotes functions from type a to type b; so the function “round”, taking a float and returning an int, has type Float -> Int. It’s required to exist just because the rules of type inference specifically refer to it. You could implement HM without a List type or an Int type, it might be silly, but it would be meaningful. But if you tried to implement it without ->, it’s not clear to me what you’d actually be implementing.
And ∀ is read “for all”—it’s pretty standard in math, but if you don’t know it or how standard it is, yeah, it would be opaque. Someone commented when I first wrote this that I ought to make a note of that, and I agreed it was a good idea and forgot to do it. I’ll try again to remember to update it in the near future, along with a note about the arrow.
Thanks for the datapoint!
To answer your questions,
a -> b
denotes functions from type a to type b; so the function “round”, taking a float and returning an int, has typeFloat -> Int
. It’s required to exist just because the rules of type inference specifically refer to it. You could implement HM without aList
type or anInt
type, it might be silly, but it would be meaningful. But if you tried to implement it without->
, it’s not clear to me what you’d actually be implementing.And
∀
is read “for all”—it’s pretty standard in math, but if you don’t know it or how standard it is, yeah, it would be opaque. Someone commented when I first wrote this that I ought to make a note of that, and I agreed it was a good idea and forgot to do it. I’ll try again to remember to update it in the near future, along with a note about the arrow.Thanks again!