Skip to content

Commit

Permalink
Fix typos (#2573)
Browse files Browse the repository at this point in the history
  • Loading branch information
rex4539 authored Jan 8, 2024
1 parent 75bce8f commit d6d21a2
Show file tree
Hide file tree
Showing 31 changed files with 38 additions and 38 deletions.
2 changes: 1 addition & 1 deletion assets/css/linuwial.css
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ table.info {

/* @end */

/* @group Auxillary Pages */
/* @group Auxiliary Pages */


.extension-list {
Expand Down
2 changes: 1 addition & 1 deletion assets/js/tex-chtml.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions examples/milestone/Hanoi/Hanoi.juvix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- Towers of Hanoi is a puzzle with three rods and n disks of decresing size.
--- The disks are stacked ontop of each other through the first rod.
--- Towers of Hanoi is a puzzle with three rods and n disks of decreasing size.
--- The disks are stacked on top of each other through the first rod.
--- The aim of the game is to move the stack of disks to another rod while
--- following these rules:
---
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/juvix/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ void io_flush();
void io_trace(word_t x);
void io_print_toplevel(word_t x);

// If the returned value is true, `ret` constains a closure and `arg` an
// If the returned value is true, `ret` contains a closure and `arg` an
// argument that should be supplied to this closure. If the returned value is
// false, `ret` contains the value in the monad.
bool io_interpret(word_t x, word_t *ret, word_t *arg);
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/juvix/mem/alloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ static inline void alloc_save_memory_pointer(word_t *ptr) {
#define RESTORE_MEMORY_POINTERS juvix_memory_pointer = alloc_memory_pointer();

// Preallocate n words. `SAVE` and `RESTORE` should save and restore live local
// variables on the global stack (can lauch GC which needs access to these
// variables on the global stack (can launch GC which needs access to these
// variables).
#define PREALLOC(n, SAVE, RESTORE) \
if (unlikely(is_next_page(juvix_memory_pointer, n))) { \
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/juvix/mem/mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void *memset(void *dest, int c, size_t n) {
u32 c32 = ((u32)-1) / 255 * (unsigned char)c;

/* In preparation to copy 32 bytes at a time, aligned on
* an 8-byte bounary, fill head/tail up to 28 bytes each.
* an 8-byte boundary, fill head/tail up to 28 bytes each.
* As in the initial byte-based head/tail fill, each
* conditional below ensures that the subsequent offsets
* are valid (e.g. !(n<=24) implies n>=28). */
Expand Down
6 changes: 3 additions & 3 deletions src/Juvix/Compiler/Asm/Interpreter/RuntimeState.hs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ Memory consists of:
- referenced with TempRef
- constant maximum height (depends on the function)
- current height of the local temporary stack is known at compile-time for each
intruction; a program violating this assumption (e.g. by having a `Branch`
instruction; a program violating this assumption (e.g. by having a `Branch`
instruction whose two branches result in different stack heights) is
errorneous
erroneous
- compiled to a constant number of local variables / registers
- Core.Let is compiled to store the value in the local temporary area
- Core.Case is compiled to store the value in the local temporary area,
Expand All @@ -45,7 +45,7 @@ Memory consists of:
(or different invocations of the same function)
- maximum constant height of a local value stack (depends on the function)
- current height of the local value stack is known at compile-time for each
intruction; a program violating this assumption is errorneous
instruction; a program violating this assumption is erroneous
- compiled to a constant number of local variables / registers (unless the
target IR itself is a stack machine)
-}
Expand Down
2 changes: 1 addition & 1 deletion src/Juvix/Compiler/Concrete/Data/NameSignature/Builder.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module Juvix.Compiler.Concrete.Data.NameSignature.Builder
( mkNameSignature,
mkRecordNameSignature,
HasNameSignature,
-- to supress unused warning
-- to suppress unused warning
getBuilder,
)
where
Expand Down
2 changes: 1 addition & 1 deletion src/Juvix/Compiler/Concrete/Language.hs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ instance Serialize (NameItem 'Scoped)
instance Serialize (NameItem 'Parsed)

data NameBlock (s :: Stage) = NameBlock
{ -- | Symbols map to themselves so we can retrive the location
{ -- | Symbols map to themselves so we can retrieve the location
-- | NOTE the index is wrt to the block, not the whole signature.
_nameBlock :: HashMap Symbol (NameItem s),
_nameImplicit :: IsImplicit
Expand Down
2 changes: 1 addition & 1 deletion src/Juvix/Compiler/Concrete/Translation/FromSource.hs
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ runExpressionParser fpath input = do
(_, Left err) -> return (Left (ErrMegaparsec (MegaparsecError err)))
(_, Right r) -> return (Right r)

-- | The first pipe is optional, and thus we need a `Maybe`. The rest of the elements are guaranted to be given a `Just`.
-- | The first pipe is optional, and thus we need a `Maybe`. The rest of the elements are guaranteed to be given a `Just`.
pipeSep1 :: (Member ParserResultBuilder r) => (Irrelevant (Maybe KeywordRef) -> ParsecS r a) -> ParsecS r (NonEmpty a)
pipeSep1 e = do
p <- Irrelevant <$> optional (kw kwPipe)
Expand Down
4 changes: 2 additions & 2 deletions src/Juvix/Compiler/Core/Extra/Utils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -353,13 +353,13 @@ substs t = umapN go
_ -> n

-- | substitute a term t for the free variable with de Bruijn index 0, avoiding
-- variable capture; shifts all free variabes with de Bruijn index > 0 by -1 (as
-- variable capture; shifts all free variables with de Bruijn index > 0 by -1 (as
-- if the topmost binder was removed)
subst :: Node -> Node -> Node
subst t = substs [t]

-- | substitute a term t for the free variable with de Bruijn index idx, avoiding
-- variable capture; shifts all free variabes with de Bruijn index > idx by -1 (as
-- variable capture; shifts all free variables with de Bruijn index > idx by -1 (as
-- if the binder idx was removed)
substVar :: Index -> Node -> Node -> Node
substVar idx t = umapN go
Expand Down
4 changes: 2 additions & 2 deletions src/Juvix/Compiler/Core/Transformation/NaiveMatchToCase.hs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ shiftEmbedded wrappingLevel m = umapN go
-- * The number of let bindings added in step 1, equal to the total
-- number of pattern binders in the matchbranch.
--
-- * The auxillary bindings added in the translation (i.e bindings
-- * The auxiliary bindings added in the translation (i.e bindings
-- not present in the original match bindings, added for nested
-- cases and case bindings).
--
Expand Down Expand Up @@ -111,7 +111,7 @@ shiftEmbedded wrappingLevel m = umapN go
-- correct variables above.
--
-- The index for the free variable @x@ in the body has increased from 4 to 15.
-- This is because we have added 3 binders around the body, 6 auxillary binders,
-- This is because we have added 3 binders around the body, 6 auxiliary binders,
-- 1 binder for the lambda surrounding the case and 1 binder for the fail
-- branch.
compileMatchBranch :: forall r. (Members '[InfoTableBuilder] r) => Indexed MatchBranch -> Sem r Node
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Juvix.Compiler.Core.Language

-- | Returns the node representing a function Int -> Nat that is used to transform
-- literal integers to builtin Nat. The symbol representing the literalIntToNat function is passed
-- so that it can be called recusively.
-- so that it can be called recursively.
literalIntToNatNode :: (Member InfoTableBuilder r) => Symbol -> Sem r Node
literalIntToNatNode sym = do
md <- getModule
Expand Down
2 changes: 1 addition & 1 deletion src/Juvix/Compiler/Internal/Extra/Base.hs
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ matchExpressions = go
(ExpressionInstanceHole {}, _) -> err

err :: Sem r a
err = throw @Text "Expression missmatch"
err = throw @Text "Expression mismatch"

matchVars :: Name -> Name -> Sem r Bool
matchVars va vb = do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ checkStrictlyPositiveOccurrences p = do
indName = indInfo ^. inductiveInfoName

{- The following `go` function determines if there is any negative
occurence of the symbol `name` in the given expression. The `inside` flag
occurrence of the symbol `name` in the given expression. The `inside` flag
used below indicates whether the current search is performed on the left of
an inner arrow or not.
-}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ addIdens idens = do

-- | Assumes the given function has been type checked. Does *not* register the
-- function.
-- Conditons:
-- Conditions:
-- 1. Only one clause.
-- 2. No pattern matching.
-- 3. Terminates.
Expand Down
2 changes: 1 addition & 1 deletion src/Juvix/Compiler/Pipeline/EntryPoint.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Juvix.Compiler.Pipeline.Package.Base
import Juvix.Compiler.Pipeline.Root.Base
import Juvix.Prelude

-- | An option specifiying how symbols should be pruned in the Internal to Core translation
-- | An option specifying how symbols should be pruned in the Internal to Core translation
data SymbolPruningMode
= FilterUnreachable
| KeepAll
Expand Down
2 changes: 1 addition & 1 deletion src/Juvix/Data/Effect/Fail.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- | An effect similar to Polysemy Fail but wihout an error message
-- | An effect similar to Polysemy Fail but without an error message
module Juvix.Data.Effect.Fail where

import Control.Exception qualified as X
Expand Down
2 changes: 1 addition & 1 deletion src/Juvix/Data/Effect/Git/Process.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ newtype CloneEnv = CloneEnv

makeLenses ''CloneEnv

-- | Run a git command in the current working direcotory of the parent process.
-- | Run a git command in the current working directory of the parent process.
runGitCmd :: (Members '[Process, Error GitProcessError] r) => [Text] -> Sem r Text
runGitCmd args = do
mcmd <- findExecutable' $(mkRelFile "git")
Expand Down
2 changes: 1 addition & 1 deletion src/Juvix/Data/Effect/Git/Process/Error.hs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ instance Pretty GitCmdErrorDetails where
pretty d = pretty msg
where
msg :: Text
msg = "Error ocurred when executing the git command with arguments: " <> show (d ^. gitCmdErrorDetailsArgs)
msg = "Error occurred when executing the git command with arguments: " <> show (d ^. gitCmdErrorDetailsArgs)

instance Pretty GitProcessError where
pretty = \case
Expand Down
2 changes: 1 addition & 1 deletion src/Juvix/Parser/Error.hs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ instance ToGenericError StdinOrFileError where
return
GenericError
{ _genericErrorLoc = singletonInterval (mkInitialLoc formatStdinPath),
_genericErrorMessage = prettyError "Neither JUVIX_FILE_OR_PROJECT nor --stdin option is choosen",
_genericErrorMessage = prettyError "Neither JUVIX_FILE_OR_PROJECT nor --stdin option is chosen",
_genericErrorIntervals = []
}

Expand Down
2 changes: 1 addition & 1 deletion src/Juvix/Prelude/Path.hs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ infixr 5 <//>

infixr 5 <///>

-- | Appens a relative path to some directory
-- | Appends a relative path to some directory
(<///>) :: SomeBase Dir -> Path Rel t -> SomeBase t
(<///>) s r = mapSomeBase (<//> r) s

Expand Down
2 changes: 1 addition & 1 deletion test/Package/Negative.hs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ testDescr NegTest {..} =
)
case mapLeft fromJuvixError res of
Left (Just err) -> whenJust (_checkErr err) assertFailure
Left Nothing -> assertFailure "An error ocurred but it was not when reading the package."
Left Nothing -> assertFailure "An error occurred but it was not when reading the package."
Right {} -> assertFailure "There was no error when reading the package"
}

Expand Down
2 changes: 1 addition & 1 deletion test/Package/Positive.hs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ testDescr root PosTest {..} =
$ buildDir
case res of
Right p -> whenJust (_checkPackage p buildDir) assertFailure
Left {} -> assertFailure "An error ocurred when reading the package."
Left {} -> assertFailure "An error occurred when reading the package."
}

allTests :: TestTree
Expand Down
2 changes: 1 addition & 1 deletion test/Parsing/Negative.hs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ testDescr NegTest {..} =
res <- testRunIOEither entryPoint upToParsedSource
case mapLeft fromJuvixError res of
Left (Just parErr) -> whenJust (_checkErr parErr) assertFailure
Left Nothing -> assertFailure "An error ocurred but it was not in the parser."
Left Nothing -> assertFailure "An error occurred but it was not in the parser."
Right _ -> assertFailure "The parser did not find an error."
}

Expand Down
2 changes: 1 addition & 1 deletion test/Resolver/Negative.hs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ testDescr NegTest {..} =
res <- testRunIOEither entryPoint upToParsedSource
case mapLeft fromJuvixError res of
Left (Just parErr) -> whenJust (_checkErr parErr) assertFailure
Left Nothing -> assertFailure "An error ocurred but it was not in the path resolver."
Left Nothing -> assertFailure "An error occurred but it was not in the path resolver."
Right _ -> assertFailure "The path resolver did not find an error."
}

Expand Down
6 changes: 3 additions & 3 deletions test/Scope/Negative.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ testDescr NegTest {..} =
res <- testRunIOEitherTermination entryPoint upToInternal
case mapLeft fromJuvixError res of
Left (Just err) -> whenJust (_checkErr err) assertFailure
Left Nothing -> assertFailure "An error ocurred but it was not in the scoper."
Left Nothing -> assertFailure "An error occurred but it was not in the scoper."
Right {} -> assertFailure "The scope checker did not find an error."
}

Expand Down Expand Up @@ -219,14 +219,14 @@ scoperErrorTests =
ErrModuleDoesNotExportSymbol {} -> Nothing
_ -> wrongError,
NegTest
"Wrong number of interator initializers"
"Wrong number of iterator initializers"
$(mkRelDir ".")
$(mkRelFile "Iterators1.juvix")
$ \case
ErrIteratorInitializer {} -> Nothing
_ -> wrongError,
NegTest
"Wrong number of interator ranges"
"Wrong number of iterator ranges"
$(mkRelDir ".")
$(mkRelFile "Iterators2.juvix")
$ \case
Expand Down
2 changes: 1 addition & 1 deletion test/Termination/Negative.hs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ testDescr NegTest {..} =
case mapLeft fromJuvixError result of
Left (Just lexError) -> whenJust (_checkErr lexError) assertFailure
Left Nothing -> assertFailure "The termination checker did not find an error."
Right _ -> assertFailure "An error ocurred but it was not by the termination checker."
Right _ -> assertFailure "An error occurred but it was not by the termination checker."
}

allTests :: TestTree
Expand Down
2 changes: 1 addition & 1 deletion test/Typecheck/Negative.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ testDescr NegTest {..} =
result <- testRunIOEither entryPoint upToInternalTyped
case mapLeft fromJuvixError result of
Left (Just tyError) -> whenJust (_checkErr tyError) assertFailure
Left Nothing -> assertFailure "An error ocurred but it was not in the type checker."
Left Nothing -> assertFailure "An error occurred but it was not in the type checker."
Right _ -> assertFailure "The type checker did not find an error."
}

Expand Down
2 changes: 1 addition & 1 deletion test/Typecheck/NegativeNew.hs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ testDescr Old.NegTest {..} =
result <- testRunIOEither entryPoint upToCore
case mapLeft fromJuvixError result of
Left (Just tyError) -> whenJust (_checkErr tyError) assertFailure
Left Nothing -> assertFailure "An error ocurred but it was not in the type checker."
Left Nothing -> assertFailure "An error occurred but it was not in the type checker."
Right _ -> assertFailure "The type checker did not find an error."
}

Expand Down
2 changes: 1 addition & 1 deletion tests/positive/Format.juvix
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ exampleFunction1

axiom undefined : {A : Type} -> A;

-- 200 in the body is idented with respect to the start of the chain
-- 200 in the body is indented with respect to the start of the chain
-- (at {A : Type})
exampleFunction2
: {A : Type}
Expand Down

0 comments on commit d6d21a2

Please sign in to comment.