on master help sign in
switch to the "custom-types" hint in a couple error messages
commitb585ba7cf8ee10af39ac36e640ac4dcaaad1bbcf authorEvan Czaplicki <evancz@users.noreply.github.com> dateSat 20 Jul 2019, 17:02 (7 years ago) parent9d97114
1 file changed+12−12
compiler/src/Reporting/Error/Type.hs+12−12
compiler/src/Reporting/Error/Type.hs+12−12
@@ -253,11 +253,11 @@ toPatternReport source localizer patternRegion category tipe expected =
253253 , patternTypeComparison localizer tipe expectedType
254254 (addPatternCategory ("The " <> D.ordinal index <> " pattern is trying to match") category)
255255 "But all the previous patterns in the list are:"
256− [ D.toSimpleHint $
257− "Everything in the list needs to be the same type of value.\
258− \ This way you never run into unexpected values partway through.\
259− \ To mix different types in a single list, create a \"union type\" as\
260− \ described in: <http://guide.elm-lang.org/types/union_types.html>"
256+ [ D.link "Hint"
257+ "Everything in a list must be the same type of value. This way, we never\
258+ \ run into unexpected values partway through a List.map, List.foldl, etc. Read"
259+ "custom-types"
260+ "to learn how to “mix” types."
261261 ]
262262 )
263263
@@ -694,11 +694,11 @@ toExprReport source localizer exprRegion category tipe expected =
694694 , "The " <> ith <> " element of this list does not match all the previous elements:"
695695 , "The " <> ith <> " element is"
696696 , "But all the previous elements in the list are:"
697− , [ D.toSimpleHint $
698− "Everything in the list needs to be the same type of value.\
699− \ This way you never run into unexpected values partway through.\
700− \ To mix different types in a single list, create a \"union type\" as\
701− \ described in: <http://guide.elm-lang.org/types/union_types.html>"
697+ , [ D.link "Hint"
698+ "Everything in a list must be the same type of value. This way, we never\
699+ \ run into unexpected values partway through a List.map, List.foldl, etc. Read"
700+ "custom-types"
701+ "to learn how to “mix” types."
702702 ]
703703 )
704704
@@ -745,7 +745,7 @@ toExprReport source localizer exprRegion category tipe expected =
745745 , [ D.link "Hint"
746746 "All branches in an `if` must produce the same type of values. This way, no\
747747 \ matter which branch we take, the result is always a consistent shape. Read"
748− "union-types"
748+ "custom-types"
749749 "to learn how to “mix” types."
750750 ]
751751 )
@@ -760,7 +760,7 @@ toExprReport source localizer exprRegion category tipe expected =
760760 , [ D.link "Hint"
761761 "All branches in a `case` must produce the same type of values. This way, no\
762762 \ matter which branch we take, the result is always a consistent shape. Read"
763− "union-types"
763+ "custom-types"
764764 "to learn how to “mix” types."
765765 ]
766766 )