From 17b327fc1d3249ecb26552ca5b63dd95118487c5 Mon Sep 17 00:00:00 2001 From: Karl Ostmo Date: Wed, 24 Jan 2024 13:59:53 -0800 Subject: [PATCH] workspace spelling dictionary (#1587) The spellchecker in VS code can be quite noisy, given all of the esoteric terminology and shorthand variable names in code. However, it is also super helpful for catching typos, if you can wade through the noise. Adding a project-specific dictionary will significantly cut down on that noise. --- .vscode/settings.json | 117 +++++++++++++++++- src/Swarm/TUI/Inventory/Sorting.hs | 6 +- src/swarm-lang/Swarm/Language/Syntax.hs | 2 +- .../Swarm/Language/Text/Markdown.hs | 2 +- 4 files changed, 121 insertions(+), 6 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index ca31cdf0..7babdf58 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -10,5 +10,120 @@ "data/schema/recipes.json": [ "data/recipes.yaml" ], - } + }, + "cSpell.words": [ + "accum", + "antiquotation", + "antiquoted", + "antiquoting", + "assocs", + "autoplay", + "Bifunctor", + "bimap", + "Blackhole", + "Blackholes", + "bquote", + "Bytestring", + "callsite", + "cata", + "CESK", + "Cmds", + "Colour", + "Combinators", + "conv", + "Corasick", + "datatypes", + "determinator", + "determinators", + "distrib", + "eithers", + "elems", + "ents", + "floorplan", + "Focusable", + "foldl", + "foldr", + "Gameplay", + "Hashable", + "hifi", + "HLINT", + "homomorphic", + "hsep", + "Ixed", + "JSONE", + "Keymap", + "kolor", + "leaderboard", + "mappend", + "mconcat", + "mempty", + "Monoid", + "multiset", + "multiworld", + "objs", + "omni", + "Parameterizable", + "parens", + "pathfinding", + "Perlin", + "perp", + "playfield", + "Polytype", + "polytypes", + "pparens", + "prec", + "precomputation", + "Precompute", + "preprocess", + "prereq", + "prereqs", + "Prettyprinter", + "preuse", + "previewable", + "pushable", + "quasiquoter", + "quasiquoters", + "sconcat", + "scrollability", + "selfdestruct", + "Semigroup", + "snoc", + "Splittable", + "squote", + "SRGB", + "struct", + "Structs", + "Subdir", + "Substate", + "subrecord", + "subterms", + "subtyping", + "Subworld", + "subworlds", + "succ", + "reqs", + "teleporting", + "Tiebreaking", + "toplevel", + "tuplify", + "typecheck", + "typechecked", + "typechecks", + "typeclass", + "ucata", + "Unchainable", + "uncurry", + "unequip", + "unfoldr", + "uniplate", + "unranked", + "Unwalkable", + "unwords", + "upperleft", + "vals", + "verbed", + "wakeable", + "wakeup", + "walkability" + ] } \ No newline at end of file diff --git a/src/Swarm/TUI/Inventory/Sorting.hs b/src/Swarm/TUI/Inventory/Sorting.hs index 14d831ab..14e8223c 100644 --- a/src/Swarm/TUI/Inventory/Sorting.hs +++ b/src/Swarm/TUI/Inventory/Sorting.hs @@ -60,8 +60,8 @@ cycleSortDirection (InventorySortOptions direction order) = -- | All non-alphabetic sort criteria perform alphabetic tie-breaking. -- "Reverse ordering" only applies to the *primary* sort criteria; the secondary -- alphabetic sort is always in ascending order. -getSortCompartor :: Ord a => InventorySortOptions -> (a, Entity) -> (a, Entity) -> Ordering -getSortCompartor (InventorySortOptions direction order) = case order of +getSortComparator :: Ord a => InventorySortOptions -> (a, Entity) -> (a, Entity) -> Ordering +getSortComparator (InventorySortOptions direction order) = case order of ByNaturalAlphabetic -> compReversible (alphabetic . snd) ByQuantity -> compReversible fst <> secondary ByType -> compReversible (view entityProperties . snd) <> secondary @@ -76,4 +76,4 @@ getSortCompartor (InventorySortOptions direction order) = case order of sortInventory :: Ord a => InventorySortOptions -> [(a, Entity)] -> [(a, Entity)] sortInventory opts = - sortBy $ getSortCompartor opts + sortBy $ getSortComparator opts diff --git a/src/swarm-lang/Swarm/Language/Syntax.hs b/src/swarm-lang/Swarm/Language/Syntax.hs index 20e5f798..55dc7734 100644 --- a/src/swarm-lang/Swarm/Language/Syntax.hs +++ b/src/swarm-lang/Swarm/Language/Syntax.hs @@ -315,7 +315,7 @@ data Const -- | Logical equality comparison Eq - | -- | Logical unequality comparison + | -- | Logical inequality comparison Neq | -- | Logical lesser-then comparison Lt diff --git a/src/swarm-lang/Swarm/Language/Text/Markdown.hs b/src/swarm-lang/Swarm/Language/Text/Markdown.hs index d1ee7977..8c5a02a9 100644 --- a/src/swarm-lang/Swarm/Language/Text/Markdown.hs +++ b/src/swarm-lang/Swarm/Language/Text/Markdown.hs @@ -7,7 +7,7 @@ -- -- Simple Markdown AST and related utilities. -- --- Parametrising 'Document' with the type of +-- Parameterising 'Document' with the type of -- inline code and code blocks allows us to -- inspect and validate Swarm code in descriptions. --