Possibly an error in Tutorial?

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Possibly an error in Tutorial?

Ignat Insarov
In this line:

> For example, the principal type of `head` is `[a]->a`; `[b]->a`, `a->a`, or even `a` are correct types, but too general, whereas something like `[Integer]->Integer` is too specific.

— It is not clear how `a → a` can be a correct type for `head`,
insofar as all occurrences of a type variable must be instantiated to
the same concrete type. If this sentence is actually correct, perhaps
it could be clarified to address the issue?

This concern was raised on Reddit:

Link to tutorial:
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
Only members subscribed via the mailman list are allowed to post.