on master help sign in
Fix typos in hints/type-annotations.md
678fc8eJeroen Engels
hints/type-annotations.md+1−3
@@ -8,7 +8,7 @@ This document is going to outline the various things that can go wrong and show
8
8
9## Annotation vs. Definition
9## Annotation vs. Definition
10
10
11−The most common issue is with user-defined type variables that are too general. So lets say you have defined a function like this:
11+The most common issue is with user-defined type variables that are too general. So let's say you have defined a function like this:
12
12
13```elm
13```elm
14addPair : (a, a) -> a
14addPair : (a, a) -> a
@@ -58,5 +58,3 @@ filter isOkay list =
58This case is very unfortunate because all the type annotations are correct, but there is a detail of how type inference works right now that **user-defined type variables are not shared between annotations**. This can lead to probably the worst type error messages we have because the problem here is that `a` in the outer annotation does not equal `a` in the inner annotation.
58This case is very unfortunate because all the type annotations are correct, but there is a detail of how type inference works right now that **user-defined type variables are not shared between annotations**. This can lead to probably the worst type error messages we have because the problem here is that `a` in the outer annotation does not equal `a` in the inner annotation.
59
59
60For now the best route is to leave off the inner annotation. It is unfortunate, and hopefully we will be able to do a nicer thing in future releases.
60For now the best route is to leave off the inner annotation. It is unfortunate, and hopefully we will be able to do a nicer thing in future releases.
61−
62−"""