summaryrefslogtreecommitdiff
path: root/compiler/GHC/Parser
diff options
context:
space:
mode:
authorEric Lindblad <lindblad@gmx.us>2022-09-13 10:31:23 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-09-14 03:13:56 -0400
commit646d15ad8f1119f339998ee8dd79ea96cfd1d165 (patch)
tree84bc30035fb31ea0f418384b2399400d53539cbf /compiler/GHC/Parser
parentdc6af9ed87e619d754bfc385df931c81cba6d93a (diff)
downloadhaskell-646d15ad8f1119f339998ee8dd79ea96cfd1d165.tar.gz
Fix typos
This fixes various typos and spelling mistakes in the compiler. Fixes #21891
Diffstat (limited to 'compiler/GHC/Parser')
-rw-r--r--compiler/GHC/Parser/Annotation.hs4
-rw-r--r--compiler/GHC/Parser/Errors/Types.hs4
-rw-r--r--compiler/GHC/Parser/Lexer.x2
-rw-r--r--compiler/GHC/Parser/PostProcess.hs2
-rw-r--r--compiler/GHC/Parser/PostProcess/Haddock.hs2
5 files changed, 7 insertions, 7 deletions
diff --git a/compiler/GHC/Parser/Annotation.hs b/compiler/GHC/Parser/Annotation.hs
index 2f00422f8b..101c14f4ef 100644
--- a/compiler/GHC/Parser/Annotation.hs
+++ b/compiler/GHC/Parser/Annotation.hs
@@ -547,7 +547,7 @@ realSpanAsAnchor s = Anchor s UnchangedAnchor
-- element, and print them together with the element, interleaving
-- them into the output stream. But when editing the AST to move
-- fragments around it is useful to be able to first separate the
--- comments into those occuring before the AST element and those
+-- comments into those occurring before the AST element and those
-- following it. The 'EpaCommentsBalanced' constructor is used to do
-- this. The GHC parser will only insert the 'EpaComments' form.
data EpAnnComments = EpaComments
@@ -633,7 +633,7 @@ meaning we can have type LocatedN RdrName
-- Annotations for items in a list
-- ---------------------------------------------------------------------
--- | Captures the location of punctuation occuring between items,
+-- | Captures the location of punctuation occurring between items,
-- normally in a list. It is captured as a trailing annotation.
data TrailingAnn
= AddSemiAnn EpaLocation -- ^ Trailing ';'
diff --git a/compiler/GHC/Parser/Errors/Types.hs b/compiler/GHC/Parser/Errors/Types.hs
index f0314d80c7..aac26d5532 100644
--- a/compiler/GHC/Parser/Errors/Types.hs
+++ b/compiler/GHC/Parser/Errors/Types.hs
@@ -77,7 +77,7 @@ data PsMessage
{-| PsWarnBidirectionalFormatChars is a warning (controlled by the -Wwarn-bidirectional-format-characters flag)
that occurs when unicode bi-directional format characters are found within in a file
- The 'PsLoc' contains the exact position in the buffer the character occured, and the
+ The 'PsLoc' contains the exact position in the buffer the character occurred, and the
string contains a description of the character.
-}
| PsWarnBidirectionalFormatChars (NonEmpty (PsLoc, Char, String))
@@ -498,7 +498,7 @@ data ParseContext
= ParseContext
{ is_infix :: !(Maybe RdrName)
-- ^ If 'Just', this is an infix
- -- pattern with the binded operator name
+ -- pattern with the bound operator name
, incomplete_do_block :: !PatIncompleteDoBlock
-- ^ Did the parser likely fail due to an incomplete do block?
} deriving Eq
diff --git a/compiler/GHC/Parser/Lexer.x b/compiler/GHC/Parser/Lexer.x
index 71e5fa5eb8..12928d8c0e 100644
--- a/compiler/GHC/Parser/Lexer.x
+++ b/compiler/GHC/Parser/Lexer.x
@@ -2431,7 +2431,7 @@ data PState = PState {
-- implement pushCurrentContext (which is only called from one place).
-- AZ question: setLastToken which sets last_loc and last_len
- -- is called whan processing AlexToken, immediately prior to
+ -- is called when processing AlexToken, immediately prior to
-- calling the action in the token. So from the perspective
-- of the action, it is the *current* token. Do I understand
-- correctly?
diff --git a/compiler/GHC/Parser/PostProcess.hs b/compiler/GHC/Parser/PostProcess.hs
index 9cce37e051..d89ef3ee8d 100644
--- a/compiler/GHC/Parser/PostProcess.hs
+++ b/compiler/GHC/Parser/PostProcess.hs
@@ -2985,7 +2985,7 @@ instance MonadP PV where
{- Note [Parser-Validator Details]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-A PV computation is parametrized by some 'ParseContext' for diagnostic messages, which can be set
+A PV computation is parameterized by some 'ParseContext' for diagnostic messages, which can be set
depending on validation context. We use this in checkPattern to fix #984.
Consider this example, where the user has forgotten a 'do':
diff --git a/compiler/GHC/Parser/PostProcess/Haddock.hs b/compiler/GHC/Parser/PostProcess/Haddock.hs
index 95f02f8f21..00fa69b770 100644
--- a/compiler/GHC/Parser/PostProcess/Haddock.hs
+++ b/compiler/GHC/Parser/PostProcess/Haddock.hs
@@ -1576,7 +1576,7 @@ constructs that are separated by a keyword. For example:
We could use EPA (exactprint annotations) to fix this, but not without
modification. For example, EpaLocation contains RealSrcSpan but not BufSpan.
-Also, the fix would be more straghtforward after #19623.
+Also, the fix would be more straightforward after #19623.
For examples, see tests/haddock/should_compile_flag_haddock/T17544_kw.hs
-}