Skip to content

Commit

Permalink
Merge pull request #925 from GaloisInc/fix-typos
Browse files Browse the repository at this point in the history
Fix typos. Fixes #924.
  • Loading branch information
brianhuffman authored Oct 2, 2020
2 parents eeadea1 + a0734ca commit 72611f7
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion cry
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function setup_external_tools() {

function show_usage() {
cat << EOM
Usage: $0 COMMAND COMANND_OPTIONS
Usage: $0 COMMAND COMMAND_OPTIONS
Available commands:
run Run Cryptol
build Build Cryptol
Expand Down
2 changes: 1 addition & 1 deletion src/Cryptol/Eval.hs
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ fillHole sym env (nm, sch, _, fill) = do

-- | 'Value' types are non-polymorphic types recursive constructed from
-- bits, finite sequences, tuples and records. Types of this form can
-- be implemented rather more efficently than general types because we can
-- be implemented rather more efficiently than general types because we can
-- rely on the 'delayFill' operation to build a thunk that falls back on performing
-- eta-expansion rather than doing it eagerly.
isValueType :: GenEvalEnv sym -> Schema -> Bool
Expand Down
2 changes: 1 addition & 1 deletion src/Cryptol/ModuleSystem/Name.hs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ cmpNameDisplay disp l r =

-- | Figure out how the name should be displayed, by referencing the display
-- function in the environment. NOTE: this function doesn't take into account
-- the need for parenthesis.
-- the need for parentheses.
ppName :: Name -> Doc
ppName Name { .. } =
case nInfo of
Expand Down
4 changes: 2 additions & 2 deletions src/Cryptol/PrimeEC.hs
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ ec_mult p d s

-- | Compute the sum and difference of the given points,
-- and normalize all four values. This can be done jointly
-- in a more efficent way than computing the necessary
-- in a more efficient way than computing the necessary
-- field inverses separately.
normalizeForTwinMult ::
PrimeModulus -> ProjectivePoint -> ProjectivePoint ->
Expand Down Expand Up @@ -435,7 +435,7 @@ normalizeForTwinMult p s t = (s',t',spt',smt')
-- another integer @k@ and point @T@ compute the "twin" scalar
-- the scalar multiplication @jS + kT@. This computation can be done
-- essentially the same number of modular arithmetic operations
-- as a single scalar multiplication by doing some additional bookeeping
-- as a single scalar multiplication by doing some additional bookkeeping
-- and setup.
ec_twin_mult :: PrimeModulus ->
Integer -> ProjectivePoint ->
Expand Down
10 changes: 5 additions & 5 deletions src/Cryptol/TypeCheck/Error.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import Cryptol.Utils.RecordMap
cleanupErrors :: [(Range,Error)] -> [(Range,Error)]
cleanupErrors = dropErrorsFromSameLoc
. sortBy (compare `on` (cmpR . fst)) -- order errors
. dropSumbsumed []
. dropSubsumed []
where

-- pick shortest error from each location.
Expand All @@ -37,16 +37,16 @@ cleanupErrors = dropErrorsFromSameLoc
. map addErrorRating


cmpR r = ( source r -- Frist by file
cmpR r = ( source r -- First by file
, from r -- Then starting position
, to r -- Finally end position
)

dropSumbsumed survived xs =
dropSubsumed survived xs =
case xs of
err : rest ->
let keep e = not (subsumes err e)
in dropSumbsumed (err : filter keep survived) (filter keep rest)
in dropSubsumed (err : filter keep survived) (filter keep rest)
[] -> survived

-- | Should the first error suppress the next one.
Expand Down Expand Up @@ -129,7 +129,7 @@ data Error = ErrorMsg Doc
deriving (Show, Generic, NFData)

-- | When we have multiple errors on the same location, we show only the
-- ones with the has highest rating accorign to this function
-- ones with the has highest rating according to this function.
errorImportance :: Error -> Int
errorImportance err =
case err of
Expand Down
2 changes: 1 addition & 1 deletion src/Cryptol/TypeCheck/Infer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ inferCArm armNum (m : ms) =
-- | @inferBinds isTopLevel isRec binds@ performs inference for a
-- strongly-connected component of 'P.Bind's.
-- If any of the members of the recursive group are already marked
-- as monomorphic, then we don't do generalzation.
-- as monomorphic, then we don't do generalization.
-- If @isTopLevel@ is true,
-- any bindings without type signatures will be generalized. If it is
-- false, and the mono-binds flag is enabled, no bindings without type
Expand Down
4 changes: 2 additions & 2 deletions src/Cryptol/TypeCheck/Monad.hs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ bumpCounter = do RO { .. } <- IM ask

runInferM :: TVars a => InferInput -> InferM a -> IO (InferOutput a)
runInferM info (IM m) = SMT.withSolver (inpSolverConfig info) $ \solver ->
do coutner <- newIORef 0
do counter <- newIORef 0
rec ro <- return RO { iRange = inpRange info
, iVars = Map.map ExtVar (inpVars info)
, iTVars = []
Expand All @@ -128,7 +128,7 @@ runInferM info (IM m) = SMT.withSolver (inpSolverConfig info) $ \solver ->
, iMonoBinds = inpMonoBinds info
, iSolver = solver
, iPrimNames = inpPrimNames info
, iSolveCounter = coutner
, iSolveCounter = counter
}

(result, finalRW) <- runStateT rw
Expand Down
4 changes: 2 additions & 2 deletions src/Cryptol/TypeCheck/Type.hs
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ data Type = TCon !TCon ![Type]

-- | Type variables.
data TVar = TVFree !Int Kind (Set TParam) TVarInfo
-- ^ Unique, kind, ids of bound type variables that are in scope
-- The last field gives us some infor for nicer warnings/errors.
-- ^ Unique, kind, ids of bound type variables that are in scope.
-- The last field gives us some info for nicer warnings/errors.


| TVBound {-# UNPACK #-} !TParam
Expand Down

0 comments on commit 72611f7

Please sign in to comment.