Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ linear space. There are multiple ways to build a `BriDoc`, not all
of which fit in linear space. So care is necessary to keep memory
bounded.

The compexities of the `BriDoc` structure, together with the lack of
The complexities of the `BriDoc` structure, together with the lack of
documentation, make Brittany at least challenging to maintain.

### Hindent
Expand Down Expand Up @@ -386,7 +386,7 @@ but arguably stills achieves consistent style.
Forking or contributing to Hindent is not an option because if we replace
`haskell-src-exts` with `ghc` (or `ghc-exact-print`) then we'll have to work
with a different AST type and all the code in Hindent will become
incompatible and there won't be much code to be re-used in that case. It is
incompatible and there won't be much code to be reused in that case. It is
also possible that we'll find a nicer way to write pretty-printer.

## Examples
Expand Down
2 changes: 1 addition & 1 deletion app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ configParser =
help "Fail if formatting is not idempotent"
]
-- We cannot parse the source type here, because we might need to do
-- autodection based on the input file extension (not available here)
-- autodetection based on the input file extension (not available here)
-- before storing the resolved value in the config struct.
<*> pure ModuleSource
<*> (option parseColorMode . mconcat)
Expand Down
2 changes: 1 addition & 1 deletion data/examples/declaration/data/record-out.hs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ data Foo = Foo
fooGag,
fooGog ::
NonEmpty
( Indentity
( Identity
Bool
),
-- | Huh!
Expand Down
2 changes: 1 addition & 1 deletion data/examples/declaration/data/record.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ data Foo = Foo
{ fooX :: Int -- ^ X
, fooY :: Int -- ^ Y
, fooBar, fooBaz :: NonEmpty (Identity Bool) -- ^ BarBaz
, fooGag, fooGog :: NonEmpty (Indentity
, fooGag, fooGog :: NonEmpty (Identity
Bool)
-- ^ GagGog
, fooFoo
Expand Down
2 changes: 1 addition & 1 deletion data/examples/declaration/rewrite-rule/prelude2-out.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
-- when we disable the rule that expands (++) into foldr

-- The foldr/cons rule looks nice, but it can give disastrously
-- bloated code when commpiling
-- bloated code when compiling
-- array (a,b) [(1,2), (2,2), (3,2), ...very long list... ]
-- i.e. when there are very very long literal lists
-- So I've disabled it for now. We could have special cases
Expand Down
2 changes: 1 addition & 1 deletion data/examples/declaration/rewrite-rule/prelude2.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
-- when we disable the rule that expands (++) into foldr

-- The foldr/cons rule looks nice, but it can give disastrously
-- bloated code when commpiling
-- bloated code when compiling
-- array (a,b) [(1,2), (2,2), (3,2), ...very long list... ]
-- i.e. when there are very very long literal lists
-- So I've disabled it for now. We could have special cases
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ foo
)
-> do
-- Begin do
(x, y) <- -- GHC parser fails if layed out over multiple lines
(x, y) <- -- GHC parser fails if laid out over multiple lines
f -- Call into f
( a,
c -- Tuple together arguments
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ foo
(e, f)
) ->
do -- Begin do
(x,y) -- GHC parser fails if layed out over multiple lines
(x,y) -- GHC parser fails if laid out over multiple lines
<- f -- Call into f
(a,
c) -- Tuple together arguments
Expand Down
4 changes: 2 additions & 2 deletions src/Ormolu/Printer/Meat/Common.hs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ data FamilyStyle
| -- | Top-level declarations
Free

-- | Outputs the name of the module-like entity, preceeded by the correct prefix ("module" or "signature").
-- | Outputs the name of the module-like entity, preceded by the correct prefix ("module" or "signature").
p_hsmodName :: ModuleName -> R ()
p_hsmodName mname = do
sourceType <- askSourceType
Expand Down Expand Up @@ -92,7 +92,7 @@ p_rdrName l = located l $ \x -> do
-- insert spaces when we have a parenthesized operator starting with `#`.
handleUnboxedSumsAndHashInteraction
| unboxedSums,
-- Qualified names do not start wth a `#`.
-- Qualified names do not start with a `#`.
Unqual (occNameString -> '#' : _) <- x =
\y -> space *> y <* space
| otherwise = id
Expand Down
4 changes: 2 additions & 2 deletions src/Ormolu/Printer/Meat/Declaration/Value.hs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ p_matchGroup' placer render style mg@MG {..} = do
-- | Function id obtained through pattern matching on 'FunBind' should not
-- be used to print the actual equations because the different ‘RdrNames’
-- used in the equations may have different “decorations” (such as backticks
-- and paretheses) associated with them. It is necessary to use per-equation
-- and parentheses) associated with them. It is necessary to use per-equation
-- names obtained from 'm_ctxt' of 'Match'. This function replaces function
-- name inside of 'Function' accordingly.
adjustMatchGroupStyle ::
Expand Down Expand Up @@ -588,7 +588,7 @@ p_hsExpr :: HsExpr GhcPs -> R ()
p_hsExpr = p_hsExpr' NotApplicand N

-- | An applicand is the left-hand side in a function application, i.e. @f@ in
-- @f a@. We need to track this in order to add extra identation in cases like
-- @f a@. We need to track this in order to add extra indentation in cases like
--
-- > foo =
-- > do
Expand Down
2 changes: 1 addition & 1 deletion tests/Ormolu/Fixity/ParserSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ spec = do
elabel "module name"
]
)
it "fails with correct parse error (typo: export intead exports)" $
it "fails with correct parse error (typo: export instead exports)" $
parseModuleReexportDeclaration "module Control.Lens export Control.Lens.Lens"
`shouldFailWith` err
20
Expand Down