Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/reporting/common_misspellings.zig
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ pub const CommonMisspellings = struct {
.{ "fn", "`fn` is not a keyword in Roc. Use `fn_name = |arg1, arg2| body` to define functions." },
.{ "fun", "`fun` is not a keyword in Roc. Use `fn_name = |arg1, arg2| body` to define functions." },
.{ "fn", "`fn` is not a keyword in Roc. Use `fn_name = |arg1, arg2| body` to define functions." },
.{ "is", "`is` is not a keyword in Roc." },
.{ "lambda", "`lambda` is not a keyword in Roc. Use `fn_name = |arg1, arg2| body` to define functions." },
.{ "class", "Roc doesn't have a `class` keyword, but it does have nominal types. Docs for nominal types can be found at <https://www.roc-lang.org/docs>" },
.{ "trait", "Roc doesn't have a `trait` keyword, but it does have static dispatch. Docs for nominal types can be found at <https://www.roc-lang.org/docs>" },
Expand Down Expand Up @@ -67,6 +68,13 @@ pub const CommonMisspellings = struct {
.{ "vector", "Roc uses `List` for sequential collections, not `vector`." },
.{ "Vec", "Roc uses `List` for sequential collections, not `Vec`." },
.{ "map", "Roc uses `Dict` for key-value mappings, not `map`. Also, many Roc types have a method named `map`, but that would be called using `my_val.map(...)` syntax, not `map` as a standalone function." },
.{ "fold_left", "Roc uses the names `fold` and `fold_rev`, not `fold_left` and `fold_right`." },
.{ "foldLeft", "Roc uses the names `fold` and `fold_rev`, not `foldLeft` and `foldRight`." },
.{ "foldl", "Roc uses the names `fold` and `fold_rev`, not `foldl` and `foldr`." },
.{ "foldr", "Roc uses the names `fold` and `fold_rev`, not `foldl` and `foldr`." },
.{ "reduce", "Roc uses the names `fold` and `fold_rev`, not `reduce` and `reduce_right`." },
.{ "reduce_right", "Roc uses the names `fold` and `fold_rev`, not `reduce` and `reduce_right`." },
.{ "reduceRight", "Roc uses the names `fold` and `fold_rev`, not `reduce` and `reduceRight`." },
.{ "hash", "Roc uses `Dict` for key-value mappings." },
.{ "hashmap", "Roc uses `Dict` for key-value mappings." },
.{ "HashMap", "Roc uses `Dict` for key-value mappings." },
Expand Down
Loading