From d5616fbc8cb905d0f72cc0647d55b0bad0a63245 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 23 Jul 2024 09:41:27 -0400 Subject: [PATCH 01/18] spelling: automatically Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- semantic/src/Semantic/Config.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/semantic/src/Semantic/Config.hs b/semantic/src/Semantic/Config.hs index 2dbd5a188a..031e3bee16 100644 --- a/semantic/src/Semantic/Config.hs +++ b/semantic/src/Semantic/Config.hs @@ -52,7 +52,7 @@ data Config , configTreeSitterUnmarshalTimeout :: Duration -- ^ Timeout in milliseconds before canceling tree-sitter unmarshalling (default: 4000). , configAssignmentTimeout :: Duration -- ^ Millisecond timeout for assignment (default: 4000) , configMaxTelemetyQueueSize :: Int -- ^ Max size of telemetry queues before messages are dropped (default: 1000). - , configIsTerminal :: Flag IsTerminal -- ^ Whether a terminal is attached (set automaticaly at runtime). + , configIsTerminal :: Flag IsTerminal -- ^ Whether a terminal is attached (set automatically at runtime). , configLogPrintSource :: Flag LogPrintSource -- ^ Whether to print the source reference when logging errors (set automatically at runtime). , configLogFormatter :: LogFormatter -- ^ Log formatter to use (set automatically at runtime). , configSHA :: String -- ^ SHA to include in log messages (set automatically). From 9c9633f45b787d1e26eb37b51def479c87f4719d Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 23 Jul 2024 09:11:54 -0400 Subject: [PATCH 02/18] spelling: cannot Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- docs/grammar-development-guide.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/grammar-development-guide.md b/docs/grammar-development-guide.md index d83b4308d1..6d894f1e8f 100644 --- a/docs/grammar-development-guide.md +++ b/docs/grammar-development-guide.md @@ -117,7 +117,7 @@ Here are some guidelines to determine what approach to take when removing superf 2. **Add it to the inline array.** If the rule is used more than once and its definition is not simple, make it `inline`. If this does not cause parsing problems, this is the best approach, because it will avoid intermediate node allocations and parsing operations at runtime. One possible side-effect of `inline` is that is sometimes makes the parser much larger in terms of number of states. To evaluate whether this has happened, it’s worth looking at the `STATE_COUNT` in `parser.c` before and after. If the state count goes way up, it may not be worth adding the rule to `inline` since more states mean more one-time memory footprint for the parser. If it goes up a few percent (or goes down), it’s fine to add. -3. **Mark it hidden.** If `inline` causes conflicts or drastically increases the size of the parse table, it's better to mark it as hidden. This is often useful when two nodes can not exist without one another. For example, `class_body_declaration` was a child of `class_body` and occurred together 100% of the time. Similarly, `type_arguments` can not exist independent of its child node, `type_argument`. In both cases, it makes sense to hide the former. +3. **Mark it hidden.** If `inline` causes conflicts or drastically increases the size of the parse table, it's better to mark it as hidden. This is often useful when two nodes cannot exist without one another. For example, `class_body_declaration` was a child of `class_body` and occurred together 100% of the time. Similarly, `type_arguments` cannot exist independent of its child node, `type_argument`. In both cases, it makes sense to hide the former. ```diff (generic_type (type_identifier) @@ -138,7 +138,7 @@ Most languages have a long-tail of features that are not frequently utilized in ### Handling conflicts -Conflicts may arise due to ambiguities in the grammar. This is when the parser can not decide what the next symbol in an input stream should be because there are multiple ways to parse some strings. +Conflicts may arise due to ambiguities in the grammar. This is when the parser cannot decide what the next symbol in an input stream should be because there are multiple ways to parse some strings. - **Refactor by removing duplication.** Take two rules that parse the same string and combine them into a single rule that gets used in two places. Simplifying the number of rules reduces the search space of possible paths the parser can pursue, and resultantly can resolve to a single rule more easily. From c553e788c87c11d3599bad94292163eb4f1f9ec1 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 23 Jul 2024 10:21:53 -0400 Subject: [PATCH 03/18] spelling: comparison Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .../{comparision-operator.A.rb => comparison-operator.A.rb} | 0 ...ision-operator.diffA-B.txt => comparison-operator.diffA-B.txt} | 0 ...ision-operator.diffB-A.txt => comparison-operator.diffB-A.txt} | 0 ...arision-operator.parseA.txt => comparison-operator.parseA.txt} | 0 ...arision-operator.parseB.txt => comparison-operator.parseB.txt} | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename semantic/test/fixtures/ruby/corpus/{comparision-operator.A.rb => comparison-operator.A.rb} (100%) rename semantic/test/fixtures/ruby/corpus/{comparision-operator.diffA-B.txt => comparison-operator.diffA-B.txt} (100%) rename semantic/test/fixtures/ruby/corpus/{comparision-operator.diffB-A.txt => comparison-operator.diffB-A.txt} (100%) rename semantic/test/fixtures/ruby/corpus/{comparision-operator.parseA.txt => comparison-operator.parseA.txt} (100%) rename semantic/test/fixtures/ruby/corpus/{comparision-operator.parseB.txt => comparison-operator.parseB.txt} (100%) diff --git a/semantic/test/fixtures/ruby/corpus/comparision-operator.A.rb b/semantic/test/fixtures/ruby/corpus/comparison-operator.A.rb similarity index 100% rename from semantic/test/fixtures/ruby/corpus/comparision-operator.A.rb rename to semantic/test/fixtures/ruby/corpus/comparison-operator.A.rb diff --git a/semantic/test/fixtures/ruby/corpus/comparision-operator.diffA-B.txt b/semantic/test/fixtures/ruby/corpus/comparison-operator.diffA-B.txt similarity index 100% rename from semantic/test/fixtures/ruby/corpus/comparision-operator.diffA-B.txt rename to semantic/test/fixtures/ruby/corpus/comparison-operator.diffA-B.txt diff --git a/semantic/test/fixtures/ruby/corpus/comparision-operator.diffB-A.txt b/semantic/test/fixtures/ruby/corpus/comparison-operator.diffB-A.txt similarity index 100% rename from semantic/test/fixtures/ruby/corpus/comparision-operator.diffB-A.txt rename to semantic/test/fixtures/ruby/corpus/comparison-operator.diffB-A.txt diff --git a/semantic/test/fixtures/ruby/corpus/comparision-operator.parseA.txt b/semantic/test/fixtures/ruby/corpus/comparison-operator.parseA.txt similarity index 100% rename from semantic/test/fixtures/ruby/corpus/comparision-operator.parseA.txt rename to semantic/test/fixtures/ruby/corpus/comparison-operator.parseA.txt diff --git a/semantic/test/fixtures/ruby/corpus/comparision-operator.parseB.txt b/semantic/test/fixtures/ruby/corpus/comparison-operator.parseB.txt similarity index 100% rename from semantic/test/fixtures/ruby/corpus/comparision-operator.parseB.txt rename to semantic/test/fixtures/ruby/corpus/comparison-operator.parseB.txt From 854d688a7f951844591253dea50cd0e0f6a20b9f Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 23 Jul 2024 09:42:50 -0400 Subject: [PATCH 04/18] spelling: compatible Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .licenses/semantic/cabal/time-locale-compat.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.licenses/semantic/cabal/time-locale-compat.txt b/.licenses/semantic/cabal/time-locale-compat.txt index c110fae77c..b6837e482c 100644 --- a/.licenses/semantic/cabal/time-locale-compat.txt +++ b/.licenses/semantic/cabal/time-locale-compat.txt @@ -2,7 +2,7 @@ type: cabal name: time-locale-compat version: 0.1.1.5 -summary: Compatibile module for time-format locale +summary: Compatible module for time-format locale homepage: https://github.com/khibino/haskell-time-locale-compat license: bsd-3-clause --- From 7dc4f2c75127c25a9ab665ac4831a5e570551992 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 23 Jul 2024 10:40:16 -0400 Subject: [PATCH 05/18] spelling: disclaimer Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .licenses/semantic/cabal/terminfo.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.licenses/semantic/cabal/terminfo.txt b/.licenses/semantic/cabal/terminfo.txt index de7c49c0a0..63919a9fe0 100644 --- a/.licenses/semantic/cabal/terminfo.txt +++ b/.licenses/semantic/cabal/terminfo.txt @@ -13,10 +13,10 @@ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistribution of source code must retain the above copyright notice, -this list of conditions and the following disclamer. +this list of conditions and the following disclaimer. - Redistribution in binary form must reproduce the above copyright notice, -this list of conditions and the following disclamer in the documentation +this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND ANY From 4f05f2cd44042f8f61a93da6aa226e19b9ce8df9 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 23 Jul 2024 09:11:32 -0400 Subject: [PATCH 06/18] spelling: github Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .licenses/semantic/cabal/cmark-gfm.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.licenses/semantic/cabal/cmark-gfm.txt b/.licenses/semantic/cabal/cmark-gfm.txt index 75ba799c34..aa9959ef65 100644 --- a/.licenses/semantic/cabal/cmark-gfm.txt +++ b/.licenses/semantic/cabal/cmark-gfm.txt @@ -97,7 +97,7 @@ SOFTWARE. buffer.h, buffer.c, chunk.h -are derived from code (C) 2012 Github, Inc. +are derived from code (C) 2012 GitHub, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in From c320af95299fd4b57a99580a979dab8f775e569e Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 23 Jul 2024 10:02:00 -0400 Subject: [PATCH 07/18] spelling: indexed Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- semantic-tags/src/Tags/Tag.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/semantic-tags/src/Tags/Tag.hs b/semantic-tags/src/Tags/Tag.hs index d8d448bad5..883d70bcf0 100644 --- a/semantic-tags/src/Tags/Tag.hs +++ b/semantic-tags/src/Tags/Tag.hs @@ -5,7 +5,7 @@ import Data.Text (Text) import qualified Proto.Semantic as P import Source.Loc --- | A 0-indxed Span where the column offset units are utf-16 code units (2 +-- | A 0-indexed Span where the column offset units are utf-16 code units (2 -- bytes), suitable for the LSP (Language Server Protocol) specification. newtype UTF16CodeUnitSpan = UTF16CodeUnitSpan { unUTF16CodeUnitSpan :: Span } deriving (Eq, Show) From 6c03a91c07a4bacbf4df6cae5766c7d0323bd083 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 23 Jul 2024 09:40:38 -0400 Subject: [PATCH 08/18] spelling: into Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- docs/why-haskell.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/why-haskell.md b/docs/why-haskell.md index f2addd0df5..4d457f5a66 100644 --- a/docs/why-haskell.md +++ b/docs/why-haskell.md @@ -42,7 +42,7 @@ Haskell is a pleasure to work in everyday. It's both productive and eye-opening. - *Editor tooling* is sub-par (especially compared to language communities like Java and C#) and finicky - we often end up just compiling in a separate terminal. - *Edges of the type system*. We often find ourselves working at the edges of Haskell's incredible type system, wishing for dependent types or reaching for complex workarounds like the [Advanced Overlap][] techniques designed by Oleg Kiselyov & Simon Peyton Jones. -- *Infra glue*. Haskell is very competent at standard infrastructure functionality like running a webserver, but it isn't the focus of the language community so you're often left writing your own libraries and components when you need to plug in to modern infrastructure. +- *Infra glue*. Haskell is very competent at standard infrastructure functionality like running a webserver, but it isn't the focus of the language community so you're often left writing your own libraries and components when you need to plug into modern infrastructure. - *Lazy evaluation* isn't always what you want and can have performance problems and make some debugging activities incredibly frustrating. We use the `StrictData` language extension to combat some of these difficulties. - *Haskell has a reputation for being difficult to learn.* Some of that is well deserved, but half of it has more to do with how many of us first learned imperative programming and the switch to a functional paradigm takes some patience. Haskell also leverages a much more mathematically rigorous set of abstractions which likely aren't as familiar to web developers. We have, however, had very good luck on-boarding new team members with a wide range of previous experience and the quality of learning Haskell resources has really improved. From e73c917bc5508a1132573378755296a5f6d5fbd7 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 23 Jul 2024 10:03:56 -0400 Subject: [PATCH 09/18] spelling: membership Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- semantic-ast/src/AST/Element.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/semantic-ast/src/AST/Element.hs b/semantic-ast/src/AST/Element.hs index 7066c1c24c..5c1c95cfb3 100644 --- a/semantic-ast/src/AST/Element.hs +++ b/semantic-ast/src/AST/Element.hs @@ -59,7 +59,7 @@ class Element' (side :: Side) sub sup where instance Element' 'Here t t where prj' = Just --- | Membershp on the left. +-- | Membership on the left. instance Element t l => Element' 'L t (l :+: r) where prj' (L1 l) = prj l From 54b3a89111a73f7ab2a6982879f879ccae081ee3 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 23 Jul 2024 10:06:24 -0400 Subject: [PATCH 10/18] spelling: overridden Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- semantic-analysis/.ghci.repl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/semantic-analysis/.ghci.repl b/semantic-analysis/.ghci.repl index f80a093837..feebdc3da2 100644 --- a/semantic-analysis/.ghci.repl +++ b/semantic-analysis/.ghci.repl @@ -10,7 +10,7 @@ :set -fwrite-interface -fobject-code -- Disable breaking on error since it hangs on uncaught exceptions when the sandbox is disabled: https://gitlab.haskell.org/ghc/ghc/issues/17743 --- This was already disabled in .ghci, but it turns out that if your user-wide .ghci file sets -fbreak-on-error, it gets overriden, so we override it back again here. +-- This was already disabled in .ghci, but it turns out that if your user-wide .ghci file sets -fbreak-on-error, it gets overridden, so we override it back again here. :set -fno-break-on-error -- Bonus: silence “add these modules to your .cabal file” warnings for files we :load From 4d636b18e88b8478fd74a09e78c5c0fac4815583 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 23 Jul 2024 10:06:38 -0400 Subject: [PATCH 11/18] spelling: parameters Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- semantic-java/src/Language/Java/AST.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/semantic-java/src/Language/Java/AST.hs b/semantic-java/src/Language/Java/AST.hs index eaa9016a23..17cc53e11f 100644 --- a/semantic-java/src/Language/Java/AST.hs +++ b/semantic-java/src/Language/Java/AST.hs @@ -1791,7 +1791,7 @@ instance Data.Traversable.Traversable ConstructorBody where data ConstructorDeclaration a = ConstructorDeclaration { ann :: a, body :: (AST.Parse.Err (ConstructorBody a)), - typeParamaters :: (GHC.Maybe.Maybe (AST.Parse.Err (TypeParameters a))), + typeParameters :: (GHC.Maybe.Maybe (AST.Parse.Err (TypeParameters a))), name :: (AST.Parse.Err (Identifier a)), parameters :: (AST.Parse.Err (FormalParameters a)), extraChildren :: ([AST.Parse.Err ((Modifiers GHC.Generics.:+: Throws) a)]) From 08b83795c211676487b52c4ae2d42e99a9c2f666 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 23 Jul 2024 10:08:12 -0400 Subject: [PATCH 12/18] spelling: particularly Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- semantic-python/src/Language/Python/Core.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/semantic-python/src/Language/Python/Core.hs b/semantic-python/src/Language/Python/Core.hs index 9e5bd48fa7..dcf0881b29 100644 --- a/semantic-python/src/Language/Python/Core.hs +++ b/semantic-python/src/Language/Python/Core.hs @@ -115,7 +115,7 @@ instance Compile Py.Attribute -- @ -- (b :<- c) >>>= (a :<- b) >>>= cont -- @ --- The tree structure that we get out of tree-sitter is not particulary conducive to expressing +-- The tree structure that we get out of tree-sitter is not particularly conducive to expressing -- this naturally, so we engage in a small desugaring step so that we can turn a list [a, b, c] -- into a sequenced Core expression using >>>= and a fold through which information—specifically -- the LHS to assign—flows. From 03a2f8ceb8442fc94beba1319b382f5f2a190c97 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 23 Jul 2024 10:53:29 -0400 Subject: [PATCH 13/18] spelling: plugins Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- script/protoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/protoc b/script/protoc index 4c02734021..df880d0d5a 100755 --- a/script/protoc +++ b/script/protoc @@ -13,7 +13,7 @@ PARENT_DIR=$(dirname $(pwd)) export PROJECT="github.com/github/semantic" # Generate Haskell for semantic's protobuf types. See the entrypoint in -# Dockerfile for where the protoc pluggins are configured. +# Dockerfile for where the protoc plugins are configured. docker run --rm --user $(id -u):$(id -g) -v $(pwd):/go/src/$PROJECT -w /go/src/$PROJECT \ semantic-protoc --proto_path=proto \ --haskell_out=./semantic-proto/src \ From 0ddd4ee6ddb999516b376e72bf80e263065bee4c Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 23 Jul 2024 10:54:14 -0400 Subject: [PATCH 14/18] spelling: satisfying Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- semantic/src/Parsing/Parser.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/semantic/src/Parsing/Parser.hs b/semantic/src/Parsing/Parser.hs index 83e5958eb1..017a5f786f 100644 --- a/semantic/src/Parsing/Parser.hs +++ b/semantic/src/Parsing/Parser.hs @@ -52,7 +52,7 @@ data Parser term where -- $abstract -- Most of our features are intended to operate over multiple languages, each represented by disjoint term types. Thus, we typically implement them using typeclasses, allowing us to share a single interface to invoke the feature, while specializing the implementation(s) as appropriate for each distinct term type. -- --- In order to accomplish this, we employ 'SomeParser', which abstracts over parsers of various term types, while ensuring that some desired constraint holds. Constructing a @'SomeParser' c@ requires satisfiyng the constraint @c@ against the underlying 'Parser'’s term type, and so it can be used to parse with any of a map of parsers whose terms support @c@. +-- In order to accomplish this, we employ 'SomeParser', which abstracts over parsers of various term types, while ensuring that some desired constraint holds. Constructing a @'SomeParser' c@ requires satisfying the constraint @c@ against the underlying 'Parser'’s term type, and so it can be used to parse with any of a map of parsers whose terms support @c@. -- -- In practice, this means using 'Control.Effect.Parse.parseWith', and passing in a map of parsers to select from for your feature. It is recommended to define the map as a concrete top-level binding using the abstract parsers or ideally the canonical maps of parsers, below; using the abstracted parsers or canonical maps directly with 'Control.Effect.Parse.parseWith' will lead to significantly slower compiles. -- From c23d173bb672320558ff2fd6486328599a72c361 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 23 Jul 2024 10:15:06 -0400 Subject: [PATCH 15/18] spelling: telemetry Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- semantic/src/Semantic/Config.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/semantic/src/Semantic/Config.hs b/semantic/src/Semantic/Config.hs index 031e3bee16..bcec8c93c7 100644 --- a/semantic/src/Semantic/Config.hs +++ b/semantic/src/Semantic/Config.hs @@ -51,7 +51,7 @@ data Config , configTreeSitterParseTimeout :: Duration -- ^ Timeout in milliseconds before canceling tree-sitter parsing (default: 6000). , configTreeSitterUnmarshalTimeout :: Duration -- ^ Timeout in milliseconds before canceling tree-sitter unmarshalling (default: 4000). , configAssignmentTimeout :: Duration -- ^ Millisecond timeout for assignment (default: 4000) - , configMaxTelemetyQueueSize :: Int -- ^ Max size of telemetry queues before messages are dropped (default: 1000). + , configMaxTelemetryQueueSize :: Int -- ^ Max size of telemetry queues before messages are dropped (default: 1000). , configIsTerminal :: Flag IsTerminal -- ^ Whether a terminal is attached (set automatically at runtime). , configLogPrintSource :: Flag LogPrintSource -- ^ Whether to print the source reference when logging errors (set automatically at runtime). , configLogFormatter :: LogFormatter -- ^ Log formatter to use (set automatically at runtime). @@ -98,7 +98,7 @@ defaultConfig options = do , configTreeSitterParseTimeout = fromMilliseconds parseTimeout , configTreeSitterUnmarshalTimeout = fromMilliseconds unmarshalTimeout , configAssignmentTimeout = fromMilliseconds assignTimeout - , configMaxTelemetyQueueSize = size + , configMaxTelemetryQueueSize = size , configIsTerminal = flag IsTerminal isTerminal , configLogPrintSource = flag LogPrintSource isTerminal , configLogFormatter = if isTerminal then terminalFormatter else logfmtFormatter @@ -131,16 +131,16 @@ logOptionsFromConfig Config{..} = LogOptions withLoggerFromConfig :: Config -> (LogQueue -> IO c) -> IO c -withLoggerFromConfig config = withLogger (logOptionsFromConfig config) (configMaxTelemetyQueueSize config) +withLoggerFromConfig config = withLogger (logOptionsFromConfig config) (configMaxTelemetryQueueSize config) withErrorReporterFromConfig :: Config -> Error.ErrorLogger -> (ErrorQueue -> IO c) -> IO c withErrorReporterFromConfig Config{..} errorLogger = - withErrorReporter (nullErrorReporter errorLogger) configMaxTelemetyQueueSize + withErrorReporter (nullErrorReporter errorLogger) configMaxTelemetryQueueSize withStatterFromConfig :: Config -> (StatQueue -> IO c) -> IO c withStatterFromConfig Config{..} = - withStatter configStatsHost configStatsPort configAppName configMaxTelemetyQueueSize + withStatter configStatsHost configStatsPort configAppName configMaxTelemetryQueueSize lookupStatsAddr :: IO (Stat.Host, Stat.Port) lookupStatsAddr = do From 8cccb0c2f279eb917066e13cea4636d1a82fb5ad Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 23 Jul 2024 09:09:09 -0400 Subject: [PATCH 16/18] spelling: the Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- docs/development.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/development.md b/docs/development.md index 28b751a11e..7046474bcf 100644 --- a/docs/development.md +++ b/docs/development.md @@ -37,7 +37,7 @@ You may want to customize Atom to support your haskelling: - [`ide-haskell`](https://atom.io/packages/ide-haskell) also provides errors, warnings, types, etc. using `ghc-mod` and other tools: - `stack install ghc-mod hlint happy` — this installs `ghc-mod` and `hlint` executables on your system required for the `haskell-ghc-mod` Atom package below. - Install [`haskell-ghc-mod`](https://atom.io/packages/haskell-ghc-mod), and [`ide-haskell-cabal`](https://atom.io/packages/ide-haskell-cabal) - - If you don't launch Atom from your shell, set the additional paths for the the `haskell-ghc-mod` package in Atom to include `/Users/$USER/.local/bin/` and `/usr/local/bin`. This is done by going to `Atom -> Preferences -> Packages -> haskell-ghc-mod -> Settings` and editing "Additional Paths": + - If you don't launch Atom from your shell, set the additional paths for the `haskell-ghc-mod` package in Atom to include `/Users/$USER/.local/bin/` and `/usr/local/bin`. This is done by going to `Atom -> Preferences -> Packages -> haskell-ghc-mod -> Settings` and editing "Additional Paths": ![image](https://user-images.githubusercontent.com/875834/31060015-5ff171b0-a6c0-11e7-9f44-65ff776cd9a2.png) - [`autocomplete-haskell`](https://atom.io/packages/autocomplete-haskell): Autocompletion - [`ide-haskell-hasktags`](https://atom.io/packages/ide-haskell-hasktags): Symbols From 30cf82ee6f03eb4bef32d1b9a1db50e57d6b91d9 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 23 Jul 2024 10:56:09 -0400 Subject: [PATCH 17/18] spelling: tibell Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- docs/coding-style.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/coding-style.md b/docs/coding-style.md index 0da77c5a02..980b06194d 100644 --- a/docs/coding-style.md +++ b/docs/coding-style.md @@ -1,6 +1,6 @@ Haskell is a syntactically-flexible language, which gives the programmer a tremendous amount of leeway regarding the appearance of their code. This is a set of best practices that we use in `semantic` and its related projects. -This file draws from the style guides written by [Johan Tibbel](https://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md) and [Kowainik](https://kowainik.github.io/posts/2019-02-06-style-guide). +This file draws from the style guides written by [Johan Tibell](https://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md) and [Kowainik](https://kowainik.github.io/posts/2019-02-06-style-guide). # General guidelines From cf9c01bb7b7deb65d910d74af7d54e447d042c54 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 23 Jul 2024 09:11:00 -0400 Subject: [PATCH 18/18] spelling: workaround Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- semantic-tags/test/Test.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/semantic-tags/test/Test.hs b/semantic-tags/test/Test.hs index 10eeecc5e0..d6b39bd13b 100644 --- a/semantic-tags/test/Test.hs +++ b/semantic-tags/test/Test.hs @@ -82,7 +82,7 @@ testTree = Tasty.testGroup "Tags.Tagging.Precise" -- NB: This emoji (:man-woman-girl-girl:) cannot be entered into a string literal in haskell for some reason, you'll get: -- > lexical error in string/character literal at character '\8205' - -- The work around is to enter the unicode directly (7 code points). + -- The workaround is to enter the unicode directly (7 code points). -- utf-8: 25 bytes to represent -- utf-16: 23 bytes to represent , testCase "multi code point unicode :man-woman-girl-girl:" $