Skip to content

Commit aeabc9f

Browse files
kianmengsjakobi
andauthored
Fix typos (#273)
* Fix typos Found via `codespell -H` * Update prettyprinter/app/GenerateReadme.hs Co-authored-by: Simon Jakobi <simon.jakobi@gmail.com> * Update README.md Co-authored-by: Simon Jakobi <simon.jakobi@gmail.com> --------- Co-authored-by: Simon Jakobi <simon.jakobi@gmail.com>
1 parent e1c6919 commit aeabc9f

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ anymore.
8787

8888
Text is not all letters and newlines. Often, we want to add more information,
8989
the simplest kind being some form of styling. An ANSI terminal supports
90-
coloring, a web browser a plethora of different formattings.
90+
coloring, a web browser a plethora of different formatting options.
9191

9292
More complex uses of annotations include e.g. adding type annotations for
9393
mouse-over hovers when printing a syntax tree, adding URLs to documentation, or

prettyprinter-convert-ansi-wl-pprint/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ the new `prettyprinter` one. Its purpose is making packages that only generate
66
`ansi-wl-pprint` data available to the `prettyprinter` ecosystem.
77

88
Note the difference to the `prettyprinter-compat-ansi-wl-pprint` module, which
9-
does *not* convert any data, and instead provides an API that mimicks
9+
does *not* convert any data, and instead provides an API that mimics
1010
`ansi-wl-pprint`, while secretly being `prettyprinter`-based behind the
1111
curtains. This package on the other hand does a proper conversion.
1212

prettyprinter/app/GenerateReadme.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ readmeContents = (mconcat . L.intersperse vspace)
9797
, paragraph [multiline| Text is not all letters and newlines. Often, we
9898
want to add more information, the simplest kind being some form of
9999
styling. An ANSI terminal supports coloring, a web browser a plethora of
100-
different formattings. |]
100+
different formatting options. |]
101101

102102
, paragraph [multiline| More complex uses of annotations include e.g.
103103
adding type annotations for mouse-over hovers when printing a syntax

prettyprinter/src/Prettyprinter.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@
180180
--
181181
-- /Modularity:/ To change the color of keywords later, you have to touch one
182182
-- point, namely the mapping in @'reAnnotateS'@, where @'Keyword'@ is mapped to
183-
-- 'Red'. If you have @'annotate Red …'@ everywher, you’ll have to do a full
183+
-- 'Red'. If you have @'annotate Red …'@ everywhere, you’ll have to do a full
184184
-- text replacement, producing a large diff and touching lots of places for a
185185
-- very small change.
186186
--
@@ -224,7 +224,7 @@ module Prettyprinter (
224224
-- * List functions
225225

226226
-- | The 'sep' and 'cat' functions differ in one detail: when 'group'ed, the
227-
-- 'sep's replace newlines wich 'space's, while the 'cat's simply remove
227+
-- 'sep's replace newlines which 'space's, while the 'cat's simply remove
228228
-- them. If you're not sure what you want, start with the 'sep's.
229229

230230
concatWith,

prettyprinter/src/Prettyprinter/Internal.hs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ indent i d = hang i (spaces i <> d)
858858
-- list [1,20,300,4000]
859859
--
860860
-- If there is not enough space, then the input is split into lines entry-wise
861-
-- therwise they are laid out vertically, with separators put in the front:
861+
-- otherwise they are laid out vertically, with separators put in the front:
862862
--
863863
-- >>> putDocW 10 doc
864864
-- list [1
@@ -1364,7 +1364,7 @@ annotate = Annotated
13641364
-- @
13651365
--
13661366
-- it should not be used without caution, for each invocation traverses the
1367-
-- entire contained document. If possible, it is preferrable to unannotate after
1367+
-- entire contained document. If possible, it is preferable to unannotate after
13681368
-- producing the layout by using 'unAnnotateS'.
13691369
unAnnotate :: Doc ann -> Doc xxx
13701370
unAnnotate = alterAnnotations (const [])
@@ -1375,7 +1375,7 @@ unAnnotate = alterAnnotations (const [])
13751375
-- generally annotated document.
13761376
--
13771377
-- Since this traverses the entire @'Doc'@ tree, including parts that are not
1378-
-- rendered due to other layouts fitting better, it is preferrable to reannotate
1378+
-- rendered due to other layouts fitting better, it is preferable to reannotate
13791379
-- after producing the layout by using @'reAnnotateS'@.
13801380
--
13811381
-- Since @'reAnnotate'@ has the right type and satisfies @'reAnnotate id = id'@,
@@ -1396,7 +1396,7 @@ reAnnotate re = alterAnnotations (pure . re)
13961396
-- not vice-versa.
13971397
--
13981398
-- Since this traverses the entire @'Doc'@ tree, including parts that are not
1399-
-- rendered due to other layouts fitting better, it is preferrable to reannotate
1399+
-- rendered due to other layouts fitting better, it is preferable to reannotate
14001400
-- after producing the layout by using @'alterAnnotationsS'@.
14011401
alterAnnotations :: (ann -> [ann']) -> Doc ann -> Doc ann'
14021402
alterAnnotations re = go
@@ -1871,7 +1871,7 @@ layoutPretty (LayoutOptions Unbounded) = layoutUnbounded
18711871
-- |------------------------|
18721872
--
18731873
-- Note that this exceeds the desired 26 character page width. The same
1874-
-- document, rendered with @'layoutSmart'@, fits the layout contstraints:
1874+
-- document, rendered with @'layoutSmart'@, fits the layout constraints:
18751875
--
18761876
-- >>> go layoutSmart doc
18771877
-- |------------------------|
@@ -1986,7 +1986,7 @@ layoutWadlerLeijen
19861986
where
19871987

19881988
-- * current column >= current nesting level
1989-
-- * current column - current indentaion = number of chars inserted in line
1989+
-- * current column - current indentation = number of chars inserted in line
19901990
best
19911991
:: Int -- Current nesting level
19921992
-> Int -- Current column, i.e. "where the cursor is"

prettyprinter/src/Prettyprinter/Render/Util/StackMachine.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,6 @@ unsafePeekStyle = StackMachine (\styles -> case styles of
163163
writeOutput :: output -> StackMachine output style ()
164164
writeOutput w = StackMachine (\styles -> ((), w, styles))
165165

166-
-- | Run the renderer and retrive the writing end
166+
-- | Run the renderer and retrieve the writing end
167167
execStackMachine :: [styles] -> StackMachine output styles a -> (output, [styles])
168168
execStackMachine styles (StackMachine r) = let (_, w, s) = r styles in (w, s)

0 commit comments

Comments
 (0)