summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2015-02-16 20:32:24 +0100
committerAndreas Rumpf <rumpf_a@web.de>2015-02-16 20:32:24 +0100
commita5f8f538a20aee0671ec6ec9edb6c650365e2222 (patch)
tree9230fde86a5673e056a520e08985b7dcad9e88d3
parent3fec9623d7487fff08c7ba100bae7fef0452a132 (diff)
parent657dca5c3b26a088ac291e06308d44d5e52c162f (diff)
downloadNim-a5f8f538a20aee0671ec6ec9edb6c650365e2222.tar.gz
Merge pull request #2140 from FedericoCeratto/devel
Fix some typos
-rw-r--r--compiler/ast.nim6
-rw-r--r--compiler/canonicalizer.nim4
-rw-r--r--compiler/ccgexprs.nim2
-rw-r--r--compiler/ccgmerge.nim2
-rw-r--r--compiler/ccgutils.nim2
-rw-r--r--compiler/cgen.nim2
-rw-r--r--compiler/docgen.nim6
-rw-r--r--compiler/jsgen.nim2
-rw-r--r--compiler/lambdalifting.nim6
-rw-r--r--compiler/lexer.nim4
-rw-r--r--compiler/msgs.nim10
-rw-r--r--compiler/nimblecmd.nim2
-rw-r--r--compiler/patterns.nim4
-rw-r--r--compiler/rodread.nim2
-rw-r--r--compiler/rodwrite.nim2
-rw-r--r--compiler/ropes.nim2
-rw-r--r--compiler/semasgn.nim2
-rw-r--r--compiler/semcall.nim2
-rw-r--r--compiler/semdestruct.nim2
-rw-r--r--compiler/semexprs.nim6
-rw-r--r--compiler/seminst.nim2
-rw-r--r--compiler/sempass2.nim2
-rw-r--r--compiler/semstmts.nim8
-rw-r--r--compiler/semtempl.nim6
-rw-r--r--compiler/semtypes.nim22
-rw-r--r--compiler/semtypinst.nim14
-rw-r--r--compiler/sigmatch.nim16
-rw-r--r--compiler/types.nim12
-rw-r--r--compiler/vmgen.nim2
-rw-r--r--config/nimdoc.cfg4
-rw-r--r--doc/advopt.txt2
-rw-r--r--doc/backends.txt4
-rw-r--r--doc/idetools.txt12
-rw-r--r--doc/intern.txt6
-rw-r--r--doc/lib.txt2
-rw-r--r--doc/manual/about.txt4
-rw-r--r--doc/manual/syntax.txt2
-rw-r--r--doc/manual/types.txt2
-rw-r--r--doc/nimc.txt2
-rw-r--r--doc/nimgrep.txt8
-rw-r--r--doc/tut2.txt6
-rw-r--r--examples/cross_calculator/android/readme.txt2
-rw-r--r--examples/cross_calculator/ios/src/NRViewController.m2
-rw-r--r--examples/cross_todo/nim_backend/backend.nim2
-rw-r--r--koch.nim4
-rw-r--r--lib/core/locks.nim2
-rw-r--r--lib/core/macros.nim2
-rw-r--r--lib/packages/docutils/rstgen.nim2
-rw-r--r--lib/pure/asyncdispatch.nim2
-rw-r--r--lib/pure/basic2d.nim6
-rw-r--r--lib/pure/basic3d.nim8
-rw-r--r--lib/pure/collections/LockFreeHash.nim2
-rw-r--r--lib/pure/collections/critbits.nim2
-rw-r--r--lib/pure/collections/sequtils.nim20
-rw-r--r--lib/pure/collections/tables.nim2
-rw-r--r--lib/pure/colors.nim4
-rw-r--r--lib/pure/encodings.nim2
-rw-r--r--lib/pure/events.nim2
-rw-r--r--lib/pure/htmlparser.nim4
-rw-r--r--lib/pure/httpclient.nim4
-rw-r--r--lib/pure/json.nim2
-rw-r--r--lib/pure/logging.nim2
-rw-r--r--lib/pure/net.nim4
-rw-r--r--lib/pure/os.nim10
-rw-r--r--lib/pure/osproc.nim2
-rw-r--r--lib/pure/parsecfg.nim2
-rw-r--r--lib/pure/parseopt2.nim2
-rw-r--r--lib/pure/parseutils.nim4
-rw-r--r--lib/pure/parsexml.nim2
-rw-r--r--lib/pure/ropes.nim2
-rw-r--r--lib/pure/selectors.nim2
-rw-r--r--lib/pure/sockets.nim6
-rw-r--r--lib/pure/streams.nim20
-rw-r--r--lib/pure/strutils.nim10
-rw-r--r--lib/pure/xmldom.nim2
-rw-r--r--lib/pure/xmlparser.nim4
-rw-r--r--lib/system.nim12
-rw-r--r--lib/system/arithm.nim2
-rw-r--r--lib/system/cgprocs.nim2
-rw-r--r--lib/system/dyncalls.nim2
-rw-r--r--lib/system/gc.nim2
-rw-r--r--lib/system/gc2.nim4
-rw-r--r--lib/system/gc_ms.nim2
-rw-r--r--lib/system/hti.nim2
-rw-r--r--lib/system/jssys.nim2
-rw-r--r--lib/system/sysio.nim2
-rw-r--r--lib/system/sysstr.nim4
-rw-r--r--lib/wrappers/libffi/msvc/win32.c2
-rw-r--r--lib/wrappers/mysql.nim10
-rw-r--r--lib/wrappers/readline/history.nim2
-rw-r--r--lib/wrappers/readline/tweaked/history.h2
-rw-r--r--lib/wrappers/sdl/sdl.nim10
-rw-r--r--lib/wrappers/sdl/sdl_mixer.nim2
-rw-r--r--tests/caas/issue_416_template_shift.txt2
-rw-r--r--tests/caas/its_full_of_procs.nim2
-rw-r--r--tests/manyloc/keineschweine/dependencies/chipmunk/chipmunk.nim2
-rw-r--r--tests/manyloc/keineschweine/lib/zlib_helpers.nim4
-rw-r--r--tests/types/tforwty2.nim2
-rw-r--r--tinyc/arm-gen.c2
-rw-r--r--tinyc/c67-gen.c2
-rw-r--r--tinyc/i386-asm.c2
-rw-r--r--tinyc/lib/bcheck.c2
-rw-r--r--tinyc/tcc-doc.html6
-rw-r--r--tinyc/tcc-doc.texi6
-rw-r--r--tinyc/tccasm.c2
-rw-r--r--tinyc/tccgen.c4
-rw-r--r--tinyc/tcctok.h2
-rw-r--r--tinyc/win32/include/fcntl.h2
-rw-r--r--tools/nimgrep.nim2
-rw-r--r--tools/nimrepl.nim2
-rw-r--r--web/news.txt6
111 files changed, 237 insertions, 237 deletions
diff --git a/compiler/ast.nim b/compiler/ast.nim
index 1a5ae8aab..18b6e6b37 100644
--- a/compiler/ast.nim
+++ b/compiler/ast.nim
@@ -314,7 +314,7 @@ type
                      # XXX put this into an include file to avoid this issue!
     tyNone, tyBool, tyChar,
     tyEmpty, tyArrayConstr, tyNil, tyExpr, tyStmt, tyTypeDesc,
-    tyGenericInvokation, # ``T[a, b]`` for types to invoke
+    tyGenericInvocation, # ``T[a, b]`` for types to invoke
     tyGenericBody,       # ``T[a, b, body]`` last parameter is the body
     tyGenericInst,       # ``T[a, b, realInstance]`` instantiated generic type
                          # realInstance will be a concrete type like tyObject
@@ -859,7 +859,7 @@ const
   OverloadableSyms* = {skProc, skMethod, skIterator, skClosureIterator,
     skConverter, skModule, skTemplate, skMacro}
 
-  GenericTypes*: TTypeKinds = {tyGenericInvokation, tyGenericBody, 
+  GenericTypes*: TTypeKinds = {tyGenericInvocation, tyGenericBody, 
     tyGenericParam}
   
   StructuralEquivTypes*: TTypeKinds = {tyArrayConstr, tyNil, tyTuple, tyArray, 
@@ -1350,7 +1350,7 @@ proc propagateToOwner*(owner, elem: PType) =
   const HaveTheirOwnEmpty = {tySequence, tySet}
   owner.flags = owner.flags + (elem.flags * {tfHasMeta})
   if tfNotNil in elem.flags:
-    if owner.kind in {tyGenericInst, tyGenericBody, tyGenericInvokation}:
+    if owner.kind in {tyGenericInst, tyGenericBody, tyGenericInvocation}:
       owner.flags.incl tfNotNil
     elif owner.kind notin HaveTheirOwnEmpty:
       owner.flags.incl tfNeedsInit
diff --git a/compiler/canonicalizer.nim b/compiler/canonicalizer.nim
index 02010961d..50d3fd017 100644
--- a/compiler/canonicalizer.nim
+++ b/compiler/canonicalizer.nim
@@ -119,8 +119,8 @@ proc hashType(c: var MD5Context, t: PType) =
     c.hashSym(t.sym)
     
   case t.kind
-  of tyGenericBody, tyGenericInst, tyGenericInvokation:
-    for i in countup(0, sonsLen(t) -1 -ord(t.kind != tyGenericInvokation)):
+  of tyGenericBody, tyGenericInst, tyGenericInvocation:
+    for i in countup(0, sonsLen(t) -1 -ord(t.kind != tyGenericInvocation)):
       c.hashType t.sons[i]
   of tyUserTypeClass:
     internalAssert t.sym != nil and t.sym.owner != nil
diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim
index 6ed4d361c..3bc0d8afb 100644
--- a/compiler/ccgexprs.nim
+++ b/compiler/ccgexprs.nim
@@ -1390,7 +1390,7 @@ proc genSwap(p: BProc, e: PNode, d: var TLoc) =
   genAssignment(p, b, tmp, {})
 
 proc rdSetElemLoc(a: TLoc, setType: PType): PRope =
-  # read a location of an set element; it may need a substraction operation
+  # read a location of an set element; it may need a subtraction operation
   # before the set operation
   result = rdCharLoc(a)
   assert(setType.kind == tySet)
diff --git a/compiler/ccgmerge.nim b/compiler/ccgmerge.nim
index 36da68d23..f4f837834 100644
--- a/compiler/ccgmerge.nim
+++ b/compiler/ccgmerge.nim
@@ -223,7 +223,7 @@ proc processMergeInfo(L: var TBaseLexer, m: BModule) =
     of "typeInfo":  readIntSet(L, m.typeInfoMarker)
     of "labels":    m.labels = decodeVInt(L.buf, L.bufpos)
     of "hasframe":  m.frameDeclared = decodeVInt(L.buf, L.bufpos) != 0
-    else: internalError("ccgmerge: unkown key: " & k)
+    else: internalError("ccgmerge: unknown key: " & k)
 
 when not defined(nimhygiene):
   {.pragma: inject.}
diff --git a/compiler/ccgutils.nim b/compiler/ccgutils.nim
index 1e1fcd6fb..e4ce0aa6c 100644
--- a/compiler/ccgutils.nim
+++ b/compiler/ccgutils.nim
@@ -96,7 +96,7 @@ proc getUniqueType*(key: PType): PType =
     #if obj.sym != nil and obj.sym.name.s == "TOption":
     #  echo "for ", typeToString(key), " I returned "
     #  debug result
-  of tyArrayConstr, tyGenericInvokation, tyGenericBody,
+  of tyArrayConstr, tyGenericInvocation, tyGenericBody,
      tyOpenArray, tyArray, tySet, tyRange, tyTuple,
      tyPtr, tyRef, tySequence, tyForward, tyVarargs, tyProxy, tyVar:
     # tuples are quite horrible as C does not support them directly and
diff --git a/compiler/cgen.nim b/compiler/cgen.nim
index a606cb5b9..cc376d87a 100644
--- a/compiler/cgen.nim
+++ b/compiler/cgen.nim
@@ -395,7 +395,7 @@ proc localVarDecl(p: BProc; s: PSym): PRope =
 
 proc assignLocalVar(p: BProc, s: PSym) =
   #assert(s.loc.k == locNone) # not yet assigned
-  # this need not be fullfilled for inline procs; they are regenerated
+  # this need not be fulfilled for inline procs; they are regenerated
   # for each module that uses them!
   let decl = localVarDecl(p, s).con(";" & tnl)
   line(p, cpsLocals, decl)
diff --git a/compiler/docgen.nim b/compiler/docgen.nim
index 3f4f39c27..5439922af 100644
--- a/compiler/docgen.nim
+++ b/compiler/docgen.nim
@@ -126,7 +126,7 @@ proc ropeFormatNamedVars(frmt: TFormatStr, varnames: openArray[string],
           if not (frmt[i] in {'A'..'Z', '_', 'a'..'z', '\x80'..'\xFF'}): break
         var idx = getVarIdx(varnames, id)
         if idx >= 0: app(result, varvalues[idx])
-        else: rawMessage(errUnkownSubstitionVar, id)
+        else: rawMessage(errUnknownSubstitionVar, id)
       of '{':
         var id = ""
         inc(i)
@@ -138,7 +138,7 @@ proc ropeFormatNamedVars(frmt: TFormatStr, varnames: openArray[string],
                               # search for the variable:
         var idx = getVarIdx(varnames, id)
         if idx >= 0: app(result, varvalues[idx])
-        else: rawMessage(errUnkownSubstitionVar, id)
+        else: rawMessage(errUnknownSubstitionVar, id)
       else: internalError("ropeFormatNamedVars")
     var start = i
     while i < L:
@@ -272,7 +272,7 @@ proc complexName(k: TSymKind, n: PNode, baseName: string): string =
   ## type)?(,param type)*``. The callable type part will be added only if the
   ## node is not a proc, as those are the common ones. The suffix will be a dot
   ## and a single letter representing the type of the callable. The parameter
-  ## types will be added with a preceeding dash. Return types won't be added.
+  ## types will be added with a preceding dash. Return types won't be added.
   ##
   ## If you modify the output of this proc, please update the anchor generation
   ## section of ``doc/docgen.txt``.
diff --git a/compiler/jsgen.nim b/compiler/jsgen.nim
index beb84b00a..34f842d4a 100644
--- a/compiler/jsgen.nim
+++ b/compiler/jsgen.nim
@@ -148,7 +148,7 @@ proc mapType(typ: PType): TJSTypeKind =
      tyVarargs:
     result = etyObject
   of tyNil: result = etyNull
-  of tyGenericInst, tyGenericParam, tyGenericBody, tyGenericInvokation,
+  of tyGenericInst, tyGenericParam, tyGenericBody, tyGenericInvocation,
      tyNone, tyFromExpr, tyForward, tyEmpty, tyFieldAccessor,
      tyExpr, tyStmt, tyStatic, tyTypeDesc, tyTypeClasses:
     result = etyNone
diff --git a/compiler/lambdalifting.nim b/compiler/lambdalifting.nim
index b7dc277a4..123445e1f 100644
--- a/compiler/lambdalifting.nim
+++ b/compiler/lambdalifting.nim
@@ -15,7 +15,7 @@ import
 
 discard """
   The basic approach is that captured vars need to be put on the heap and
-  that the calling chain needs to be explicitely modelled. Things to consider:
+  that the calling chain needs to be explicitly modelled. Things to consider:
   
   proc a =
     var v = 0
@@ -583,7 +583,7 @@ proc searchForInnerProcs(o: POuterContext, n: PNode, env: PEnv) =
       elif it.kind == nkIdentDefs:
         var L = sonsLen(it)
         if it.sons[0].kind == nkSym:
-          # this can be false for recursive invokations that already
+          # this can be false for recursive invocations that already
           # transformed it into 'env.varName':
           env.vars.incl(it.sons[0].sym.id)
         searchForInnerProcs(o, it.sons[L-1], env)
@@ -999,7 +999,7 @@ proc liftForLoop*(body: PNode): PNode =
   # proc invoke(iter: iterator(): int) =
   #   for x in iter(): echo x
   #
-  # --> When to create the closure? --> for the (count) occurence!
+  # --> When to create the closure? --> for the (count) occurrence!
   discard """
       for i in foo(): ...
 
diff --git a/compiler/lexer.nim b/compiler/lexer.nim
index 4fbac2d5c..fc40192b8 100644
--- a/compiler/lexer.nim
+++ b/compiler/lexer.nim
@@ -107,7 +107,7 @@ type
   TToken* = object            # a Nim token
     tokType*: TTokType        # the type of the token
     indent*: int              # the indentation; != -1 if the token has been
-                              # preceeded with indentation
+                              # preceded with indentation
     ident*: PIdent            # the parsed identifier
     iNumber*: BiggestInt      # the parsed integer literal
     fNumber*: BiggestFloat    # the parsed floating point literal
@@ -679,7 +679,7 @@ proc getOperator(L: var TLexer, tok: var TToken) =
     inc(pos)
   endOperator(L, tok, pos, h)
   # advance pos but don't store it in L.bufpos so the next token (which might
-  # be an operator too) gets the preceeding spaces:
+  # be an operator too) gets the preceding spaces:
   tok.strongSpaceB = 0
   while buf[pos] == ' ':
     inc pos
diff --git a/compiler/msgs.nim b/compiler/msgs.nim
index 47c730925..ed28fea69 100644
--- a/compiler/msgs.nim
+++ b/compiler/msgs.nim
@@ -69,7 +69,7 @@ type
     errInvalidOrderInArrayConstructor,
     errInvalidOrderInEnumX, errEnumXHasHoles, errExceptExpected, errInvalidTry, 
     errOptionExpected, errXisNoLabel, errNotAllCasesCovered, 
-    errUnkownSubstitionVar, errComplexStmtRequiresInd, errXisNotCallable, 
+    errUnknownSubstitionVar, errComplexStmtRequiresInd, errXisNotCallable, 
     errNoPragmasAllowedForX, errNoGenericParamsAllowedForX, 
     errInvalidParamKindX, errDefaultArgumentInvalid, errNamedParamHasToBeIdent, 
     errNoReturnTypeForX, errConvNeedsOneArg, errInvalidPragmaX, 
@@ -89,7 +89,7 @@ type
     errTIsNotAConcreteType,
     errInvalidSectionStart, errGridTableNotImplemented, errGeneralParseError, 
     errNewSectionExpected, errWhitespaceExpected, errXisNoValidIndexFile, 
-    errCannotRenderX, errVarVarTypeNotAllowed, errInstantiateXExplicitely,
+    errCannotRenderX, errVarVarTypeNotAllowed, errInstantiateXExplicitly,
     errOnlyACallOpCanBeDelegator, errUsingNoSymbol,
     errMacroBodyDependsOnGenericTypes,
     errDestructorNotGenericEnough,
@@ -279,7 +279,7 @@ const
     errOptionExpected: "option expected, but found \'$1\'",
     errXisNoLabel: "\'$1\' is not a label", 
     errNotAllCasesCovered: "not all cases are covered", 
-    errUnkownSubstitionVar: "unknown substitution variable: \'$1\'", 
+    errUnknownSubstitionVar: "unknown substitution variable: \'$1\'", 
     errComplexStmtRequiresInd: "complex statement requires indentation",
     errXisNotCallable: "\'$1\' is not callable", 
     errNoPragmasAllowedForX: "no pragmas allowed for $1", 
@@ -325,7 +325,7 @@ const
     errXisNoValidIndexFile: "\'$1\' is no valid index file", 
     errCannotRenderX: "cannot render reStructuredText element \'$1\'", 
     errVarVarTypeNotAllowed: "type \'var var\' is not allowed",
-    errInstantiateXExplicitely: "instantiate '$1' explicitely",
+    errInstantiateXExplicitly: "instantiate '$1' explicitly",
     errOnlyACallOpCanBeDelegator: "only a call operator can be a delegator",
     errUsingNoSymbol: "'$1' is not a variable, constant or a proc name",
     errMacroBodyDependsOnGenericTypes: "the macro body cannot be compiled, " &
@@ -359,7 +359,7 @@ const
     errCannotInferReturnType: "cannot infer the return type of the proc",
     errGenericLambdaNotAllowed: "A nested proc can have generic parameters only when " &
                                 "it is used as an operand to another routine and the types " &
-                                "of the generic paramers can be infered from the expected signature.",
+                                "of the generic paramers can be inferred from the expected signature.",
     errCompilerDoesntSupportTarget: "The current compiler \'$1\' doesn't support the requested compilation target",
     errUser: "$1", 
     warnCannotOpenFile: "cannot open \'$1\' [CannotOpenFile]",
diff --git a/compiler/nimblecmd.nim b/compiler/nimblecmd.nim
index 049b94aa9..23f3331a2 100644
--- a/compiler/nimblecmd.nim
+++ b/compiler/nimblecmd.nim
@@ -33,7 +33,7 @@ proc `<.`(a, b: string): bool =
   while true:
     let ii = parseInt(a, verA, i)
     let jj = parseInt(b, verB, j)
-    # if A has no number left, but B has, B is prefered:  0.8 vs 0.8.3
+    # if A has no number left, but B has, B is preferred:  0.8 vs 0.8.3
     if ii <= 0 or jj <= 0: return jj > 0
     if verA < verB: return true
     elif verA > verB: return false
diff --git a/compiler/patterns.nim b/compiler/patterns.nim
index 9ac0988c5..368b0b37b 100644
--- a/compiler/patterns.nim
+++ b/compiler/patterns.nim
@@ -275,7 +275,7 @@ proc applyRule*(c: PContext, s: PSym, n: PNode): PNode =
           if arg != rs and aliases.isPartOf(rs, arg) == arYes:
             ok = true
             break
-        # constraint not fullfilled:
+        # constraint not fulfilled:
         if not ok: return nil
       of aqNoAlias:
         # it MUST not alias with any other param:
@@ -284,7 +284,7 @@ proc applyRule*(c: PContext, s: PSym, n: PNode): PNode =
           if arg != rs and aliases.isPartOf(rs, arg) != arNo:
             ok = false
             break
-        # constraint not fullfilled:
+        # constraint not fulfilled:
         if not ok: return nil
 
   markUsed(n.info, s)
diff --git a/compiler/rodread.nim b/compiler/rodread.nim
index 3b3538e5d..545a8dda9 100644
--- a/compiler/rodread.nim
+++ b/compiler/rodread.nim
@@ -666,7 +666,7 @@ proc newRodReader(modfilename: string, crc: TCrc32,
   r.readerIndex = readerIndex
   r.filename = modfilename
   initIdTable(r.syms)
-  # we terminate the file explicitely with ``\0``, so the cast to `cstring`
+  # we terminate the file explicitly with ``\0``, so the cast to `cstring`
   # is safe:
   r.s = cast[cstring](r.memfile.mem)
   if startsWith(r.s, "NIM:"): 
diff --git a/compiler/rodwrite.nim b/compiler/rodwrite.nim
index 9fed7ac52..0f211b4ba 100644
--- a/compiler/rodwrite.nim
+++ b/compiler/rodwrite.nim
@@ -200,7 +200,7 @@ proc encodeType(w: PRodWriter, t: PType, result: var string) =
     return
   # we need no surrounding [] here because the type is in a line of its own
   if t.kind == tyForward: internalError("encodeType: tyForward")
-  # for the new rodfile viewer we use a preceeding [ so that the data section
+  # for the new rodfile viewer we use a preceding [ so that the data section
   # can easily be disambiguated:
   add(result, '[')
   encodeVInt(ord(t.kind), result)
diff --git a/compiler/ropes.nim b/compiler/ropes.nim
index b14081694..ad6801d18 100644
--- a/compiler/ropes.nim
+++ b/compiler/ropes.nim
@@ -52,7 +52,7 @@
 #  Note that the left and right pointers are not needed for leaves.
 #  Leaves have relatively high memory overhead (~30 bytes on a 32
 #  bit machines) and we produce many of them. This is why we cache and
-#  share leaves accross different rope trees.
+#  share leaves across different rope trees.
 #  To cache them they are inserted in a `cache` array.
 
 import 
diff --git a/compiler/semasgn.nim b/compiler/semasgn.nim
index 71ebbbafd..61e39877a 100644
--- a/compiler/semasgn.nim
+++ b/compiler/semasgn.nim
@@ -184,7 +184,7 @@ proc liftBodyAux(c: TLiftCtx; t: PType; x, y: PNode) =
   of tyFromExpr, tyIter, tyProxy, tyBuiltInTypeClass, tyUserTypeClass,
      tyUserTypeClassInst, tyCompositeTypeClass, tyAnd, tyOr, tyNot, tyAnything,
      tyMutable, tyGenericParam, tyGenericBody, tyNil, tyExpr, tyStmt,
-     tyTypeDesc, tyGenericInvokation, tyBigNum, tyConst, tyForward:
+     tyTypeDesc, tyGenericInvocation, tyBigNum, tyConst, tyForward:
     internalError(c.info, "assignment requested for type: " & typeToString(t))
   of tyDistinct, tyOrdinal, tyRange,
      tyGenericInst, tyFieldAccessor, tyStatic, tyVar:
diff --git a/compiler/semcall.nim b/compiler/semcall.nim
index 5cb713030..43fd5fb86 100644
--- a/compiler/semcall.nim
+++ b/compiler/semcall.nim
@@ -264,7 +264,7 @@ proc inferWithMetatype(c: PContext, formal: PType,
     instGenericConvertersArg(c, result, m)
   if result != nil:
     # This almost exactly replicates the steps taken by the compiler during
-    # param matching. It performs an embarassing ammount of back-and-forth
+    # param matching. It performs an embarrassing amount of back-and-forth
     # type jugling, but it's the price to pay for consistency and correctness
     result.typ = generateTypeInstance(c, m.bindings, arg.info,
                                       formal.skipTypes({tyCompositeTypeClass}))
diff --git a/compiler/semdestruct.nim b/compiler/semdestruct.nim
index 4ce610bf9..bbc68ee87 100644
--- a/compiler/semdestruct.nim
+++ b/compiler/semdestruct.nim
@@ -30,7 +30,7 @@ proc instantiateDestructor(c: PContext, typ: PType): PType
 
 proc doDestructorStuff(c: PContext, s: PSym, n: PNode) =
   var t = s.typ.sons[1].skipTypes({tyVar})
-  if t.kind == tyGenericInvokation:
+  if t.kind == tyGenericInvocation:
     for i in 1 .. <t.sonsLen:
       if t.sons[i].kind != tyGenericParam:
         localError(n.info, errDestructorNotGenericEnough)
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim
index 10e17d59a..bce766626 100644
--- a/compiler/semexprs.nim
+++ b/compiler/semexprs.nim
@@ -1637,7 +1637,7 @@ proc semShallowCopy(c: PContext, n: PNode, flags: TExprFlags): PNode =
     result = semDirectOp(c, n, flags)
 
 proc createFlowVar(c: PContext; t: PType; info: TLineInfo): PType =
-  result = newType(tyGenericInvokation, c.module)
+  result = newType(tyGenericInvocation, c.module)
   addSonSkipIntLit(result, magicsys.getCompilerProc("FlowVar").typ)
   addSonSkipIntLit(result, t)
   result = instGenericContainer(c, info, result, allowMetaTypes = false)
@@ -1917,7 +1917,7 @@ proc semObjConstr(c: PContext, n: PNode, flags: TExprFlags): PNode =
       it.sons[0] = newSymNode(f)
       e = fitNode(c, f.typ, e)
       # small hack here in a nkObjConstr the ``nkExprColonExpr`` node can have
-      # 3 childen the last being the field check
+      # 3 children the last being the field check
       if check != nil:
         check.sons[0] = it.sons[0]
         it.add(check)
@@ -2001,7 +2001,7 @@ proc semExpr(c: PContext, n: PNode, flags: TExprFlags = {}): PNode =
       if result.kind == nkSym:
         markIndirect(c, result.sym)
         # if isGenericRoutine(result.sym):
-        #   localError(n.info, errInstantiateXExplicitely, s.name.s)
+        #   localError(n.info, errInstantiateXExplicitly, s.name.s)
   of nkSym:
     # because of the changed symbol binding, this does not mean that we
     # don't have to check the symbol for semantics here again!
diff --git a/compiler/seminst.nim b/compiler/seminst.nim
index e02d6d1e5..3d2427a89 100644
--- a/compiler/seminst.nim
+++ b/compiler/seminst.nim
@@ -36,7 +36,7 @@ proc instantiateGenericParamList(c: PContext, n: PNode, pt: TIdTable,
     elif t.kind == tyGenericParam: 
       localError(a.info, errCannotInstantiateX, q.name.s)
       t = errorType(c)
-    elif t.kind == tyGenericInvokation:
+    elif t.kind == tyGenericInvocation:
       #t = instGenericContainer(c, a, t)
       t = generateTypeInstance(c, pt, a, t)
       #t = ReplaceTypeVarsT(cl, t)
diff --git a/compiler/sempass2.nim b/compiler/sempass2.nim
index 3f78629c8..60153e052 100644
--- a/compiler/sempass2.nim
+++ b/compiler/sempass2.nim
@@ -23,7 +23,7 @@ import
 # Predefined effects:
 #   io, time (time dependent), gc (performs GC'ed allocation), exceptions,
 #   side effect (accesses global), store (stores into *type*),
-#   store_unkown (performs some store) --> store(any)|store(x) 
+#   store_unknown (performs some store) --> store(any)|store(x) 
 #   load (loads from *type*), recursive (recursive call), unsafe,
 #   endless (has endless loops), --> user effects are defined over *patterns*
 #   --> a TR macro can annotate the proc with user defined annotations
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim
index 07cae5d04..42471bae7 100644
--- a/compiler/semstmts.nim
+++ b/compiler/semstmts.nim
@@ -369,7 +369,7 @@ proc semVarOrLet(c: PContext, n: PNode, symkind: TSymKind): PNode =
           typ = def.typ
         else:
           # BUGFIX: ``fitNode`` is needed here!
-          # check type compability between def.typ and typ        
+          # check type compatibility between def.typ and typ        
           def = fitNode(c, typ, def)
           #changeType(def.skipConv, typ, check=true)
       else:
@@ -667,8 +667,8 @@ proc checkForMetaFields(n: PNode) =
     let t = n.sym.typ
     case t.kind
     of tySequence, tySet, tyArray, tyOpenArray, tyVar, tyPtr, tyRef,
-       tyProc, tyGenericInvokation, tyGenericInst:
-      let start = ord(t.kind in {tyGenericInvokation, tyGenericInst})
+       tyProc, tyGenericInvocation, tyGenericInst:
+      let start = ord(t.kind in {tyGenericInvocation, tyGenericInst})
       for i in start .. <t.sons.len:
         checkMeta(t.sons[i])
     else:
@@ -912,7 +912,7 @@ proc semOverride(c: PContext, s: PSym, n: PNode) =
       var t = s.typ.sons[1].skipTypes(abstractInst).lastSon.skipTypes(abstractInst)
       while true:
         if t.kind == tyGenericBody: t = t.lastSon
-        elif t.kind == tyGenericInvokation: t = t.sons[0]
+        elif t.kind == tyGenericInvocation: t = t.sons[0]
         else: break
       if t.kind in {tyObject, tyDistinct, tyEnum}:
         if t.deepCopy.isNil: t.deepCopy = s
diff --git a/compiler/semtempl.nim b/compiler/semtempl.nim
index 3477d3d6f..47602368a 100644
--- a/compiler/semtempl.nim
+++ b/compiler/semtempl.nim
@@ -436,7 +436,7 @@ proc semTemplBodyDirty(c: var TemplCtx, n: PNode): PNode =
   of nkEmpty, nkSym..nkNilLit:
     discard
   else:
-    # dotExpr is ambiguous: note that we explicitely allow 'x.TemplateParam',
+    # dotExpr is ambiguous: note that we explicitly allow 'x.TemplateParam',
     # so we use the generic code for nkDotExpr too
     if n.kind == nkDotExpr or n.kind == nkAccQuoted:
       let s = qualifiedLookUp(c.c, n, {})
@@ -494,7 +494,7 @@ proc semTemplateDef(c: PContext, n: PNode): PNode =
     semParamList(c, n.sons[paramsPos], gp, s)
     # a template's parameters are not gensym'ed even if that was originally the
     # case as we determine whether it's a template parameter in the template
-    # body by the absense of the skGenSym flag:
+    # body by the absence of the skGenSym flag:
     for i in 1 .. s.typ.n.len-1:
       s.typ.n.sons[i].sym.flags.excl sfGenSym
     if sonsLen(gp) > 0:
@@ -640,7 +640,7 @@ proc semPatternBody(c: var TemplCtx, n: PNode): PNode =
     for i in countup(0, sonsLen(n) - 1):
       result.sons[i] = semPatternBody(c, n.sons[i])
   else:
-    # dotExpr is ambiguous: note that we explicitely allow 'x.TemplateParam',
+    # dotExpr is ambiguous: note that we explicitly allow 'x.TemplateParam',
     # so we use the generic code for nkDotExpr too
     case n.kind 
     of nkDotExpr, nkAccQuoted:
diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim
index 048154f12..808653d55 100644
--- a/compiler/semtypes.nim
+++ b/compiler/semtypes.nim
@@ -609,9 +609,9 @@ proc addInheritedFieldsAux(c: PContext, check: var IntSet, pos: var int,
     inc(pos)
   else: internalError(n.info, "addInheritedFieldsAux()")
 
-proc skipGenericInvokation(t: PType): PType {.inline.} = 
+proc skipGenericInvocation(t: PType): PType {.inline.} = 
   result = t
-  if result.kind == tyGenericInvokation:
+  if result.kind == tyGenericInvocation:
     result = result.sons[0]
   if result.kind == tyGenericBody:
     result = lastSon(result)
@@ -620,7 +620,7 @@ proc addInheritedFields(c: PContext, check: var IntSet, pos: var int,
                         obj: PType) =
   assert obj.kind == tyObject
   if (sonsLen(obj) > 0) and (obj.sons[0] != nil): 
-    addInheritedFields(c, check, pos, obj.sons[0].skipGenericInvokation)
+    addInheritedFields(c, check, pos, obj.sons[0].skipGenericInvocation)
   addInheritedFieldsAux(c, check, pos, obj.n)
 
 proc semObjectNode(c: PContext, n: PNode, prev: PType): PType =
@@ -632,7 +632,7 @@ proc semObjectNode(c: PContext, n: PNode, prev: PType): PType =
   checkSonsLen(n, 3)
   if n.sons[1].kind != nkEmpty: 
     base = skipTypes(semTypeNode(c, n.sons[1].sons[0], nil), skipPtrs)
-    var concreteBase = skipGenericInvokation(base).skipTypes(skipPtrs)
+    var concreteBase = skipGenericInvocation(base).skipTypes(skipPtrs)
     if concreteBase.kind == tyObject and tfFinal notin concreteBase.flags: 
       addInheritedFields(c, check, pos, concreteBase)
     else:
@@ -777,12 +777,12 @@ proc liftParamType(c: PContext, procKind: TSymKind, genericParams: PNode,
           result = paramType
   
   of tyGenericBody:
-    result = newTypeS(tyGenericInvokation, c)
+    result = newTypeS(tyGenericInvocation, c)
     result.rawAddSon(paramType)
       
     for i in 0 .. paramType.sonsLen - 2:
       if paramType.sons[i].kind == tyStatic:
-        result.rawAddSon makeTypeFromExpr(c, ast.emptyNode) # aka 'tyUnkown'
+        result.rawAddSon makeTypeFromExpr(c, ast.emptyNode) # aka 'tyUnknown'
       else:
         result.rawAddSon newTypeS(tyAnything, c)
       
@@ -823,7 +823,7 @@ proc liftParamType(c: PContext, procKind: TSymKind, genericParams: PNode,
       result = liftBody
       result.shouldHaveMeta
  
-  of tyGenericInvokation:
+  of tyGenericInvocation:
     for i in 1 .. <paramType.sonsLen:
       let lifted = liftingWalk(paramType.sons[i])
       if lifted != nil: paramType.sons[i] = lifted
@@ -900,7 +900,7 @@ proc semProcTypeNode(c: PContext, n, genericParams: PNode,
 
     if hasDefault:
       def = semExprWithType(c, a.sons[length-1]) 
-      # check type compability between def.typ and typ:
+      # check type compatibility between def.typ and typ:
       if typ == nil:
         typ = def.typ
       elif def != nil:
@@ -991,7 +991,7 @@ proc semBlockType(c: PContext, n: PNode, prev: PType): PType =
   closeScope(c)
   dec(c.p.nestedBlockCounter)
 
-proc semGenericParamInInvokation(c: PContext, n: PNode): PType =
+proc semGenericParamInInvocation(c: PContext, n: PNode): PType =
   result = semTypeNode(c, n, nil)
 
 proc semGeneric(c: PContext, n: PNode, s: PSym, prev: PType): PType =
@@ -1004,7 +1004,7 @@ proc semGeneric(c: PContext, n: PNode, s: PSym, prev: PType): PType =
   if t.kind == tyCompositeTypeClass and t.base.kind == tyGenericBody:
     t = t.base
 
-  result = newOrPrevType(tyGenericInvokation, prev, c)
+  result = newOrPrevType(tyGenericInvocation, prev, c)
   addSonSkipIntLit(result, t)
 
   template addToResult(typ) =
@@ -1015,7 +1015,7 @@ proc semGeneric(c: PContext, n: PNode, s: PSym, prev: PType): PType =
 
   if t.kind == tyForward:
     for i in countup(1, sonsLen(n)-1):
-      var elem = semGenericParamInInvokation(c, n.sons[i])
+      var elem = semGenericParamInInvocation(c, n.sons[i])
       addToResult(elem)
     return
   elif t.kind != tyGenericBody:
diff --git a/compiler/semtypinst.nim b/compiler/semtypinst.nim
index 7b8f478ec..9688520f3 100644
--- a/compiler/semtypinst.nim
+++ b/compiler/semtypinst.nim
@@ -61,7 +61,7 @@ proc searchInstTypes*(key: PType): PType =
     if inst.sons.len < key.sons.len:
       # XXX: This happens for prematurely cached
       # types such as TChannel[empty]. Why?
-      # See the notes for PActor in handleGenericInvokation
+      # See the notes for PActor in handleGenericInvocation
       return
     block matchType:
       for j in 1 .. high(key.sons):
@@ -234,8 +234,8 @@ proc instCopyType*(cl: var TReplTypeVars, t: PType): PType =
   result.flags.incl tfFromGeneric
   result.flags.excl tfInstClearedFlags
 
-proc handleGenericInvokation(cl: var TReplTypeVars, t: PType): PType = 
-  # tyGenericInvokation[A, tyGenericInvokation[A, B]]
+proc handleGenericInvocation(cl: var TReplTypeVars, t: PType): PType = 
+  # tyGenericInvocation[A, tyGenericInvocation[A, B]]
   # is difficult to handle: 
   var body = t.sons[0]
   if body.kind != tyGenericBody: internalError(cl.info, "no generic body")
@@ -278,7 +278,7 @@ proc handleGenericInvokation(cl: var TReplTypeVars, t: PType): PType =
 
   for i in countup(1, sonsLen(t) - 1):
     var x = replaceTypeVarsT(cl, t.sons[i])
-    assert x.kind != tyGenericInvokation
+    assert x.kind != tyGenericInvocation
     header.sons[i] = x
     propagateToOwner(header, x)
     idTablePut(cl.typeMap, body.sons[i-1], x)
@@ -295,7 +295,7 @@ proc handleGenericInvokation(cl: var TReplTypeVars, t: PType): PType =
   #newbody.callConv = body.callConv
   # This type may be a generic alias and we want to resolve it here.
   # One step is enough, because the recursive nature of
-  # handleGenericInvokation will handle the alias-to-alias-to-alias case
+  # handleGenericInvocation will handle the alias-to-alias-to-alias case
   if newbody.isGenericAlias: newbody = newbody.skipGenericAlias
   rawAddSon(result, newbody)
   checkPartialConstructedType(cl.info, newbody)
@@ -359,8 +359,8 @@ proc replaceTypeVarsTAux(cl: var TReplTypeVars, t: PType): PType =
     if lookup != nil: return lookup
   
   case t.kind
-  of tyGenericInvokation:
-    result = handleGenericInvokation(cl, t)
+  of tyGenericInvocation:
+    result = handleGenericInvocation(cl, t)
 
   of tyGenericBody:
     localError(cl.info, errCannotInstantiateX, typeToString(t))
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim
index 7fbf0f165..c9ceecc3c 100644
--- a/compiler/sigmatch.nim
+++ b/compiler/sigmatch.nim
@@ -153,8 +153,8 @@ proc sumGeneric(t: PType): int =
     of tyVar:
       # but do not make 'var T' more specific than 'T'!
       t = t.sons[0]
-    of tyGenericInvokation, tyTuple:
-      result = ord(t.kind == tyGenericInvokation)
+    of tyGenericInvocation, tyTuple:
+      result = ord(t.kind == tyGenericInvocation)
       for i in 0 .. <t.len: result += t.sons[i].sumGeneric
       break
     of tyProc:
@@ -262,7 +262,7 @@ proc concreteType(c: TCandidate, t: PType): PType =
         # example code that triggers it:
         # proc sort[T](cmp: proc(a, b: T): int = cmp)
       if result.kind != tyGenericParam: break
-  of tyGenericInvokation:
+  of tyGenericInvocation:
     internalError("cannot resolve type: " & typeToString(t))
     result = t
   else:
@@ -585,7 +585,7 @@ proc typeRel(c: var TCandidate, f, aOrig: PType, doBind = true): TTypeRelation =
   
   if a.kind == tyGenericInst and
       skipTypes(f, {tyVar}).kind notin {
-        tyGenericBody, tyGenericInvokation,
+        tyGenericBody, tyGenericInvocation,
         tyGenericInst, tyGenericParam} + tyTypeClasses:
     return typeRel(c, f, lastSon(a))
 
@@ -877,10 +877,10 @@ proc typeRel(c: var TCandidate, f, aOrig: PType, doBind = true): TTypeRelation =
       let ff = lastSon(f)
       if ff != nil: result = typeRel(c, ff, a)
 
-  of tyGenericInvokation:
+  of tyGenericInvocation:
     var x = a.skipGenericAlias
-    if x.kind == tyGenericInvokation or f.sons[0].kind != tyGenericBody:
-      #InternalError("typeRel: tyGenericInvokation -> tyGenericInvokation")
+    if x.kind == tyGenericInvocation or f.sons[0].kind != tyGenericBody:
+      #InternalError("typeRel: tyGenericInvocation -> tyGenericInvocation")
       # simply no match for now:
       discard
     elif x.kind == tyGenericInst and 
@@ -897,7 +897,7 @@ proc typeRel(c: var TCandidate, f, aOrig: PType, doBind = true): TTypeRelation =
         # we steal the generic parameters from the tyGenericBody:
         for i in countup(1, sonsLen(f) - 1):
           var x = PType(idTableGet(c.bindings, f.sons[0].sons[i - 1]))
-          if x == nil or x.kind in {tyGenericInvokation, tyGenericParam}:
+          if x == nil or x.kind in {tyGenericInvocation, tyGenericParam}:
             internalError("wrong instantiated type!")
           put(c.bindings, f.sons[i], x)
   
diff --git a/compiler/types.nim b/compiler/types.nim
index 3711a9668..85b0f9ed0 100644
--- a/compiler/types.nim
+++ b/compiler/types.nim
@@ -396,7 +396,7 @@ proc rangeToStr(n: PNode): string =
 const 
   typeToStr: array[TTypeKind, string] = ["None", "bool", "Char", "empty",
     "Array Constructor [$1]", "nil", "expr", "stmt", "typeDesc",
-    "GenericInvokation", "GenericBody", "GenericInst", "GenericParam",
+    "GenericInvocation", "GenericBody", "GenericInst", "GenericParam",
     "distinct $1", "enum", "ordinal[$1]", "array[$1, $2]", "object", "tuple",
     "set[$1]", "range[$1]", "ptr ", "ref ", "var ", "seq[$1]", "proc",
     "pointer", "OpenArray[$1]", "string", "CString", "Forward",
@@ -432,9 +432,9 @@ proc typeToString(typ: PType, prefer: TPreferedDesc = preferName): string =
         result = $t.n.intVal
       else:
         result = "int literal(" & $t.n.intVal & ")"
-  of tyGenericBody, tyGenericInst, tyGenericInvokation:
+  of tyGenericBody, tyGenericInst, tyGenericInvocation:
     result = typeToString(t.sons[0]) & '['
-    for i in countup(1, sonsLen(t) -1 -ord(t.kind != tyGenericInvokation)):
+    for i in countup(1, sonsLen(t) -1 -ord(t.kind != tyGenericInvocation)):
       if i > 1: add(result, ", ")
       add(result, typeToString(t.sons[i], preferGenericArg))
     add(result, ']')
@@ -649,7 +649,7 @@ proc lengthOrd(t: PType): BiggestInt =
 type
   TDistinctCompare* = enum ## how distinct types are to be compared
     dcEq,                  ## a and b should be the same type
-    dcEqIgnoreDistinct,    ## compare symetrically: (distinct a) == b, a == b
+    dcEqIgnoreDistinct,    ## compare symmetrically: (distinct a) == b, a == b
                            ## or a == (distinct b)
     dcEqOrDistinctOf       ## a equals b or a is distinct of b
 
@@ -941,7 +941,7 @@ proc sameTypeAux(x, y: PType, c: var TSameTypeClosure): bool =
     result = sameChildrenAux(a, b, c) and sameFlags(a, b)
     if result and ExactGenericParams in c.flags:
       result = a.sym.position == b.sym.position
-  of tyGenericInvokation, tyGenericBody, tySequence,
+  of tyGenericInvocation, tyGenericBody, tySequence,
      tyOpenArray, tySet, tyRef, tyPtr, tyVar, tyArrayConstr,
      tyArray, tyProc, tyConst, tyMutable, tyVarargs, tyIter,
      tyOrdinal, tyTypeClasses, tyFieldAccessor:
@@ -1087,7 +1087,7 @@ proc typeAllowedAux(marker: var IntSet, typ: PType, kind: TSymKind,
     if taField notin flags: result = t
   of tyTypeClasses:
     if not (tfGenericTypeParam in t.flags or taField notin flags): result = t
-  of tyGenericBody, tyGenericParam, tyGenericInvokation,
+  of tyGenericBody, tyGenericParam, tyGenericInvocation,
      tyNone, tyForward, tyFromExpr, tyFieldAccessor:
     result = t
   of tyNil:
diff --git a/compiler/vmgen.nim b/compiler/vmgen.nim
index 70f81bc72..c69957032 100644
--- a/compiler/vmgen.nim
+++ b/compiler/vmgen.nim
@@ -1246,7 +1246,7 @@ proc genGlobalInit(c: PCtx; n: PNode; s: PSym) =
   c.globals.add(getNullValue(s.typ, n.info))
   s.position = c.globals.len
   # This is rather hard to support, due to the laziness of the VM code
-  # generator. See tests/compile/tmacro2 for why this is necesary:
+  # generator. See tests/compile/tmacro2 for why this is necessary:
   #   var decls{.compileTime.}: seq[PNimrodNode] = @[]
   let dest = c.getTemp(s.typ)
   c.gABx(n, opcLdGlobal, dest, s.position)
diff --git a/config/nimdoc.cfg b/config/nimdoc.cfg
index 2e0bf62a0..e036c3b9a 100644
--- a/config/nimdoc.cfg
+++ b/config/nimdoc.cfg
@@ -24,7 +24,7 @@ doc.section.toc = """
 </li>
 """
 
-# Chunk of HTML emmited for each entry in the HTML table of contents.
+# Chunk of HTML emitted for each entry in the HTML table of contents.
 # Available variables are:
 # * $desc: the actual docstring of the item.
 # * $header: the full version of name, including types, pragmas, tags, etc.
@@ -45,7 +45,7 @@ $seeSrc
 </dd>
 """
 
-# Chunk of HTML emmited for each entry in the HTML table of contents.
+# Chunk of HTML emitted for each entry in the HTML table of contents.
 # See doc.item for available substitution variables.
 doc.item.toc = """
   <li><a class="reference" href="#$itemSymOrID"
diff --git a/doc/advopt.txt b/doc/advopt.txt
index ae474afc6..197c0d7da 100644
--- a/doc/advopt.txt
+++ b/doc/advopt.txt
@@ -18,7 +18,7 @@ Advanced commands:
                             track a file, currently not saved to disk
     --suggest               suggest all possible symbols at position
     --def                   list all possible definitions at position
-    --context               list possible invokation context
+    --context               list possible invocation context
     --usages                list all usages of the symbol at position
     --eval                  evaluates an expression
   //serve                   start the compiler as a service mode (CAAS)
diff --git a/doc/backends.txt b/doc/backends.txt
index c7b60da26..c7939baec 100644
--- a/doc/backends.txt
+++ b/doc/backends.txt
@@ -225,7 +225,7 @@ The JavaScript target doesn't have any further interfacing considerations
 since it also has garbage collection, but the C targets require you to
 initialize Nim's internals, which is done calling a ``NimMain`` function.
 Also, C code requires you to specify a forward declaration for functions or
-the compiler will asume certain types for the return value and parameters
+the compiler will assume certain types for the return value and parameters
 which will likely make your program crash at runtime.
 
 The Nim compiler can generate a C interface header through the ``--header``
@@ -427,7 +427,7 @@ Custom data types
 -----------------
 
 Just like strings, custom data types that are to be shared between Nim and
-the backend will need careful consideration of who controlls who. If you want
+the backend will need careful consideration of who controls who. If you want
 to hand a Nim reference to C code, you will need to use `GC_ref
 <system.html#GC_ref>`_ to mark the reference as used, so it does not get
 freed. And for the C backend you will need to expose the `GC_unref
diff --git a/doc/idetools.txt b/doc/idetools.txt
index 48197f8bf..2ffe46d4b 100644
--- a/doc/idetools.txt
+++ b/doc/idetools.txt
@@ -27,7 +27,7 @@ integrations <https://github.com/Araq/Nim/wiki/Editor-Support>`_
 already available.
 
 
-Idetools invokation
+Idetools invocation
 ===================
 
 Specifying the location of the query
@@ -35,7 +35,7 @@ Specifying the location of the query
 
 All of the available idetools commands require you to specify a
 query location through the ``--track`` or ``--trackDirty`` switches.
-The general idetools invokations are::
+The general idetools invocations are::
 
     nim idetools --track:FILE,LINE,COL <switches> proj.nim
 
@@ -129,7 +129,7 @@ the suggestions sorted first by scope (from innermost to outermost)
 and then by item name.
 
 
-Invokation context
+Invocation context
 ------------------
 
 The ``--context`` idetools switch is very similar to the suggestions
@@ -163,7 +163,7 @@ running/debugged user project.
 Compiler as a service (CAAS)
 ============================
 
-The ocasional use of idetools is acceptable for things like
+The occasional use of idetools is acceptable for things like
 definitions, where the user puts the cursor on a symbol or double
 clicks it and after a second or two the IDE displays where that
 symbol is defined. Such latencies would be terrible for features
@@ -533,10 +533,10 @@ run it manually. First you have to compile the tester::
 Running the ``caasdriver`` without parameters will attempt to process
 all the test cases in all three operation modes. If a test succeeds
 nothing will be printed and the process will exit with zero. If any
-test fails, the specific line of the test preceeding the failure
+test fails, the specific line of the test preceding the failure
 and the failure itself will be dumped to stdout, along with a final
 indicator of the success state and operation mode. You can pass the
-parameter ``verbose`` to force all output even on successfull tests.
+parameter ``verbose`` to force all output even on successful tests.
 
 The normal operation mode is called ``ProcRun`` and it involves
 starting a process for each command or query, similar to running
diff --git a/doc/intern.txt b/doc/intern.txt
index a103703d7..9582fc96f 100644
--- a/doc/intern.txt
+++ b/doc/intern.txt
@@ -236,7 +236,7 @@ too. Type converters fall into this category:
 
 If in the above example module ``B`` is re-compiled, but ``A`` is not then
 ``B`` needs to be aware of ``toBool`` even though  ``toBool`` is not referenced
-in ``B`` *explicitely*. 
+in ``B`` *explicitly*. 
 
 Both the multi method and the type converter problems are solved by storing 
 them in special sections in the ROD file that are loaded *unconditionally*
@@ -370,7 +370,7 @@ needed as the data structures needs to be rebuilt periodically anyway.
 
 Complete traversal is done in this way::
 
-  for each page decriptor d:
+  for each page descriptor d:
     for each bit in d:
       if bit == 1:
         traverse the pointer belonging to this bit
@@ -406,7 +406,7 @@ The generated code looks roughly like this:
     setRef(&r->left)
   }
 
-Note that for systems with a continous stack (which most systems have)
+Note that for systems with a continuous stack (which most systems have)
 the check whether the ref is on the stack is very cheap (only two
 comparisons).
 
diff --git a/doc/lib.txt b/doc/lib.txt
index 4185e6f74..1f972179d 100644
--- a/doc/lib.txt
+++ b/doc/lib.txt
@@ -370,7 +370,7 @@ Miscellaneous
 -------------
 
 * `events <events.html>`_
-  This module implements an event system that is not dependant on external
+  This module implements an event system that is not dependent on external
   graphical toolkits.
 
 * `oids <oids.html>`_
diff --git a/doc/manual/about.txt b/doc/manual/about.txt
index 13307279b..78167efe3 100644
--- a/doc/manual/about.txt
+++ b/doc/manual/about.txt
@@ -25,9 +25,9 @@ with ``'``. An example::
 
   ifStmt = 'if' expr ':' stmts ('elif' expr ':' stmts)* ('else' stmts)?
   
-The binary ``^*`` operator is used as a shorthand for 0 or more occurances
+The binary ``^*`` operator is used as a shorthand for 0 or more occurrences
 separated by its second argument; likewise ``^+`` means 1 or more 
-occurances: ``a ^+ b`` is short for ``a (b a)*`` 
+occurrences: ``a ^+ b`` is short for ``a (b a)*`` 
 and ``a ^* b`` is short for ``(a (b a)*)?``. Example::
 
   arrayConstructor = '[' expr ^* ',' ']'
diff --git a/doc/manual/syntax.txt b/doc/manual/syntax.txt
index b40a8ce91..cf44eb588 100644
--- a/doc/manual/syntax.txt
+++ b/doc/manual/syntax.txt
@@ -59,7 +59,7 @@ Precedence level    Operators                                      First charact
 Strong spaces
 -------------
 
-The number of spaces preceeding a non-keyword operator affects precedence
+The number of spaces preceding a non-keyword operator affects precedence
 if the experimental parser directive ``#!strongSpaces`` is used. Indentation
 is not used to determine the number of spaces. If 2 or more operators have the
 same number of preceding spaces the precedence table applies, so ``1 + 3 * 4``
diff --git a/doc/manual/types.txt b/doc/manual/types.txt
index 32ff19f75..a20701121 100644
--- a/doc/manual/types.txt
+++ b/doc/manual/types.txt
@@ -1142,7 +1142,7 @@ modules like `db_sqlite <db_sqlite.html>`_.
 Void type
 ---------
 
-The ``void`` type denotes the absense of any type. Parameters of
+The ``void`` type denotes the absence of any type. Parameters of
 type ``void`` are treated as non-existent, ``void`` as a return type means that
 the procedure does not return a value:
 
diff --git a/doc/nimc.txt b/doc/nimc.txt
index c5d5dea5a..c6b0b5255 100644
--- a/doc/nimc.txt
+++ b/doc/nimc.txt
@@ -134,7 +134,7 @@ found an ambiguity error is produced.
 ``nim dump`` shows the contents of the PATH.
 
 However before the PATH is used the current directory is checked for the
-file's existance. So if PATH contains ``$lib`` and ``$lib/bar`` and the
+file's existence. So if PATH contains ``$lib`` and ``$lib/bar`` and the
 directory structure looks like this::
 
   $lib/x.nim
diff --git a/doc/nimgrep.txt b/doc/nimgrep.txt
index e2f7b228f..2d429e8b5 100644
--- a/doc/nimgrep.txt
+++ b/doc/nimgrep.txt
@@ -25,9 +25,9 @@ Compile nimgrep with the command::
 And copy the executable somewhere in your ``$PATH``.
 
 
-Command line switches

-=====================

-

+Command line switches
+=====================
+
 Usage:
   nimgrep [options] [pattern] [replacement] (file/directory)*
 Options:
@@ -37,7 +37,7 @@ Options:
   --re                pattern is a regular expression (default); extended 
                       syntax for the regular expression is always turned on
   --recursive         process directories recursively
-  --confirm           confirm each occurence/replacement; there is a chance 
+  --confirm           confirm each occurrence/replacement; there is a chance 
                       to abort any time without touching the file
   --stdin             read pattern from stdin (to avoid the shell's confusing
                       quoting rules)
diff --git a/doc/tut2.txt b/doc/tut2.txt
index dbf50894b..e92c7d2ad 100644
--- a/doc/tut2.txt
+++ b/doc/tut2.txt
@@ -37,7 +37,7 @@ Object Oriented Programming
 While Nim's support for object oriented programming (OOP) is minimalistic,
 powerful OOP techniques can be used. OOP is seen as *one* way to design a
 program, not *the only* way. Often a procedural approach leads to simpler
-and more efficient code. In particular, prefering composition over inheritance
+and more efficient code. In particular, preferring composition over inheritance
 is often the better design.
 
 
@@ -142,7 +142,7 @@ An example:
 
 .. code-block:: nim
 
-  # This is an example how an abstract syntax tree could be modeled in Nim
+  # This is an example how an abstract syntax tree could be modelled in Nim
   type
     NodeKind = enum  # the different node types
       nkInt,          # a leaf with an integer value
@@ -335,7 +335,7 @@ As the example demonstrates, invocation of a multi-method cannot be ambiguous:
 Collide 2 is preferred over collide 1 because the resolution works from left to
 right. Thus ``Unit, Thing`` is preferred over ``Thing, Unit``.
 
-**Perfomance note**: Nim does not produce a virtual method table, but
+**Performance note**: Nim does not produce a virtual method table, but
 generates dispatch trees. This avoids the expensive indirect branch for method
 calls and enables inlining. However, other optimizations like compile time
 evaluation or dead code elimination do not work with methods.
diff --git a/examples/cross_calculator/android/readme.txt b/examples/cross_calculator/android/readme.txt
index c04d1d304..51fa9c6fd 100644
--- a/examples/cross_calculator/android/readme.txt
+++ b/examples/cross_calculator/android/readme.txt
@@ -10,7 +10,7 @@ just declared as a native method which will be resolved at runtime. The scripts
 nimbuild.sh and jnibuild.sh are in charge of building the Nim code and
 generating the jni bridge from the java code respectively. Finally, the
 ndk-build command from the android ndk tools has to be run to build the binary
-libary which will be installed along the final apk.
+library which will be installed along the final apk.
 
 All these steps are wrapped in the ant build script through the customization
 of the -post-compile rule. If you have the android ndk tools installed and you
diff --git a/examples/cross_calculator/ios/src/NRViewController.m b/examples/cross_calculator/ios/src/NRViewController.m
index 1f92f2d38..f629bfc09 100644
--- a/examples/cross_calculator/ios/src/NRViewController.m
+++ b/examples/cross_calculator/ios/src/NRViewController.m
@@ -55,7 +55,7 @@
 	[self.bText resignFirstResponder];
 }
 
-/** Custom loadView method for backwards compatiblity.
+/** Custom loadView method for backwards compatibility.
  * Unfortunately I've been unable to coerce Xcode 4.4 to generate nib files
  * which are compatible with my trusty iOS 3.0 ipod touch so in order to be
  * fully compatible for all devices we have to build the interface manually in
diff --git a/examples/cross_todo/nim_backend/backend.nim b/examples/cross_todo/nim_backend/backend.nim
index 9c7d2bafa..5b49bc4a9 100644
--- a/examples/cross_todo/nim_backend/backend.nim
+++ b/examples/cross_todo/nim_backend/backend.nim
@@ -91,7 +91,7 @@ proc update*(todo: var TTodo; conn: TDbConn): bool =
   ##
   ## Use this method if you (or another entity) have modified the database and
   ## want to update the object you have with whatever the database has stored.
-  ## Returns true if the update suceeded, or false if the object was not found
+  ## Returns true if the update succeeded, or false if the object was not found
   ## in the database any more, in which case you should probably get rid of the
   ## TTodo object.
   assert(todo.id >= 0, "The identifier of the todo entry can't be negative")
diff --git a/koch.nim b/koch.nim
index b0b4a79da..9a7afae3d 100644
--- a/koch.nim
+++ b/koch.nim
@@ -270,13 +270,13 @@ when defined(withUpdate):
           echo("Fetching updates from repo...")
           var pullout = execCmdEx(git & " pull origin master")
           if pullout[1] != 0:
-            quit("An error has occured.")
+            quit("An error has occurred.")
           else:
             if pullout[0].startsWith("Already up-to-date."):
               quit("No new changes fetched from the repo. " &
                    "Local branch must be ahead of it. Exiting...")
       else:
-        quit("An error has occured.")
+        quit("An error has occurred.")
       
     else:
       echo("No repo or executable found!")
diff --git a/lib/core/locks.nim b/lib/core/locks.nim
index 766b7b536..8a809fc84 100644
--- a/lib/core/locks.nim
+++ b/lib/core/locks.nim
@@ -21,7 +21,7 @@ type
     ## is performed. Deprecated, do not use anymore!
   AquireEffect* {.deprecated.} = object of LockEffect  ## \
     ## effect that denotes that some lock is
-    ## aquired. Deprecated, do not use anymore!
+    ## acquired. Deprecated, do not use anymore!
   ReleaseEffect* {.deprecated.} = object of LockEffect ## \
     ## effect that denotes that some lock is
     ## released. Deprecated, do not use anymore!
diff --git a/lib/core/macros.nim b/lib/core/macros.nim
index 4c561df70..ddbd7a76f 100644
--- a/lib/core/macros.nim
+++ b/lib/core/macros.nim
@@ -76,7 +76,7 @@ type
   TNimrodTypeKind* = enum
     ntyNone, ntyBool, ntyChar, ntyEmpty,
     ntyArrayConstr, ntyNil, ntyExpr, ntyStmt,
-    ntyTypeDesc, ntyGenericInvokation, ntyGenericBody, ntyGenericInst,
+    ntyTypeDesc, ntyGenericInvocation, ntyGenericBody, ntyGenericInst,
     ntyGenericParam, ntyDistinct, ntyEnum, ntyOrdinal,
     ntyArray, ntyObject, ntyTuple, ntySet,
     ntyRange, ntyPtr, ntyRef, ntyVar,
diff --git a/lib/packages/docutils/rstgen.nim b/lib/packages/docutils/rstgen.nim
index 14614b2ed..e1e590877 100644
--- a/lib/packages/docutils/rstgen.nim
+++ b/lib/packages/docutils/rstgen.nim
@@ -1145,7 +1145,7 @@ proc formatNamedVars*(frmt: string, varnames: openArray[string],
 proc defaultConfig*(): StringTableRef =
   ## Returns a default configuration for embedded HTML generation.
   ##
-  ## The returned ``StringTableRef`` contains the paramters used by the HTML
+  ## The returned ``StringTableRef`` contains the parameters used by the HTML
   ## engine to build the final output. For information on what these parameters
   ## are and their purpose, please look up the file ``config/nimdoc.cfg``
   ## bundled with the compiler.
diff --git a/lib/pure/asyncdispatch.nim b/lib/pure/asyncdispatch.nim
index 34c4b5f70..d6ed66030 100644
--- a/lib/pure/asyncdispatch.nim
+++ b/lib/pure/asyncdispatch.nim
@@ -606,7 +606,7 @@ when defined(windows) or defined(nimdoc):
           retFuture.fail(newException(OSError, osErrorMsg(err)))
     elif ret == 0 and bytesReceived == 0 and dataBuf.buf[0] == '\0':
       # We have to ensure that the buffer is empty because WSARecv will tell
-      # us immediatelly when it was disconnected, even when there is still
+      # us immediately when it was disconnected, even when there is still
       # data in the buffer.
       # We want to give the user as much data as we can. So we only return
       # the empty string (which signals a disconnection) when there is
diff --git a/lib/pure/basic2d.nim b/lib/pure/basic2d.nim
index f2fc1566b..a344cd053 100644
--- a/lib/pure/basic2d.nim
+++ b/lib/pure/basic2d.nim
@@ -18,7 +18,7 @@ import strutils
 ##
 ## Quick start example:
 ##   
-##   # Create a matrix wich first rotates, then scales and at last translates
+##   # Create a matrix which first rotates, then scales and at last translates
 ##   
 ##   var m:TMatrix2d=rotate(DEG90) & scale(2.0) & move(100.0,200.0)
 ##   
@@ -256,7 +256,7 @@ proc `$`* (t:TMatrix2d):string {.noInit.} =
 
 proc isUniform*(t:TMatrix2d,tol=1.0e-6):bool=
   ## Checks if the transform is uniform, that is 
-  ## perpendicular axes of equal lenght, which means (for example)
+  ## perpendicular axes of equal length, which means (for example)
   ## it cannot transform a circle into an ellipse.
   ## `tol` is used as tolerance for both equal length comparison 
   ## and perp. comparison.
@@ -305,7 +305,7 @@ proc equals*(m1:TMatrix2d,m2:TMatrix2d,tol=1.0e-6):bool=
     abs(m1.ty-m2.ty)<=tol
     
 proc `=~`*(m1,m2:TMatrix2d):bool=
-  ## Checks if `m1`and `m2` is aproximately equal, using a
+  ## Checks if `m1`and `m2` is approximately equal, using a
   ## tolerance of 1e-6.
   equals(m1,m2)
 
diff --git a/lib/pure/basic3d.nim b/lib/pure/basic3d.nim
index 9a8e006ec..18ebed67b 100644
--- a/lib/pure/basic3d.nim
+++ b/lib/pure/basic3d.nim
@@ -23,7 +23,7 @@ import times
 ##
 ## Quick start example:
 ##   
-##   # Create a matrix wich first rotates, then scales and at last translates
+##   # Create a matrix which first rotates, then scales and at last translates
 ##   
 ##   var m:TMatrix3d=rotate(PI,vector3d(1,1,2.5)) & scale(2.0) & move(100.0,200.0,300.0)
 ##   
@@ -320,7 +320,7 @@ proc rotateZ*(angle:float):TMatrix3d {.noInit.}=
     
 proc isUniform*(m:TMatrix3d,tol=1.0e-6):bool=
   ## Checks if the transform is uniform, that is 
-  ## perpendicular axes of equal lenght, which means (for example)
+  ## perpendicular axes of equal length, which means (for example)
   ## it cannot transform a sphere into an ellipsoid.
   ## `tol` is used as tolerance for both equal length comparison 
   ## and perpendicular comparison.
@@ -483,7 +483,7 @@ proc equals*(m1:TMatrix3d,m2:TMatrix3d,tol=1.0e-6):bool=
     abs(m1.tw-m2.tw)<=tol
 
 proc `=~`*(m1,m2:TMatrix3d):bool=
-  ## Checks if `m1` and `m2` is aproximately equal, using a
+  ## Checks if `m1` and `m2` is approximately equal, using a
   ## tolerance of 1e-6.
   equals(m1,m2)
   
@@ -788,7 +788,7 @@ proc angleTo*(v1,v2:TVector3d):float=
 proc arbitraryAxis*(norm:TVector3d):TMatrix3d {.noInit.}=
   ## Computes the rotation matrix that would transform
   ## world z vector into `norm`. The inverse of this matrix
-  ## is useful to tranform a planar 3d object to 2d space.
+  ## is useful to transform a planar 3d object to 2d space.
   ## This is the same algorithm used to interpret DXF and DWG files.
   const lim=1.0/64.0
   var ax,ay,az:TVector3d
diff --git a/lib/pure/collections/LockFreeHash.nim b/lib/pure/collections/LockFreeHash.nim
index 5640838b1..c3954468a 100644
--- a/lib/pure/collections/LockFreeHash.nim
+++ b/lib/pure/collections/LockFreeHash.nim
@@ -404,7 +404,7 @@ proc setVal[K,V](table: var PConcTable[K,V], key: int, val: int,
     #echo("tomb old slot then set in new table") 
     nextTable = copySlotAndCheck(table,idx)
     return setVal(nextTable, key, val, expVal, match)
-  # Finaly ready to add new val to table
+  # Finally ready to add new val to table
   while true:
     if match and oldVal != expVal:
       #echo("set failed, no match  oldVal= " & $oldVal & " expVal= " & $expVal)
diff --git a/lib/pure/collections/critbits.nim b/lib/pure/collections/critbits.nim
index 06babc6bb..3d10e39aa 100644
--- a/lib/pure/collections/critbits.nim
+++ b/lib/pure/collections/critbits.nim
@@ -174,7 +174,7 @@ proc excl*[T](c: var CritBitTree[T], key: string) =
 iterator leaves[T](n: Node[T]): Node[T] =
   if n != nil:
     # XXX actually we could compute the necessary stack size in advance:
-    # it's rougly log2(c.count).
+    # it's roughly log2(c.count).
     var stack = @[n]
     while stack.len > 0: 
       var it = stack.pop
diff --git a/lib/pure/collections/sequtils.nim b/lib/pure/collections/sequtils.nim
index b527b9368..e690e8eba 100644
--- a/lib/pure/collections/sequtils.nim
+++ b/lib/pure/collections/sequtils.nim
@@ -320,7 +320,7 @@ template foldl*(sequence, operation: expr): expr =
   ##
   ## The ``operation`` parameter should be an expression which uses the
   ## variables ``a`` and ``b`` for each step of the fold. Since this is a left
-  ## fold, for non associative binary operations like substraction think that
+  ## fold, for non associative binary operations like subtraction think that
   ## the sequence of numbers 1, 2 and 3 will be parenthesized as (((1) - 2) -
   ## 3).  Example:
   ##
@@ -328,12 +328,12 @@ template foldl*(sequence, operation: expr): expr =
   ##   let
   ##     numbers = @[5, 9, 11]
   ##     addition = foldl(numbers, a + b)
-  ##     substraction = foldl(numbers, a - b)
+  ##     subtraction = foldl(numbers, a - b)
   ##     multiplication = foldl(numbers, a * b)
   ##     words = @["nim", "is", "cool"]
   ##     concatenation = foldl(words, a & b)
   ##   assert addition == 25, "Addition is (((5)+9)+11)"
-  ##   assert substraction == -15, "Substraction is (((5)-9)-11)"
+  ##   assert subtraction == -15, "Subtraction is (((5)-9)-11)"
   ##   assert multiplication == 495, "Multiplication is (((5)*9)*11)"
   ##   assert concatenation == "nimiscool"
   assert sequence.len > 0, "Can't fold empty sequences"
@@ -356,7 +356,7 @@ template foldr*(sequence, operation: expr): expr =
   ##
   ## The ``operation`` parameter should be an expression which uses the
   ## variables ``a`` and ``b`` for each step of the fold. Since this is a right
-  ## fold, for non associative binary operations like substraction think that
+  ## fold, for non associative binary operations like subtraction think that
   ## the sequence of numbers 1, 2 and 3 will be parenthesized as (1 - (2 -
   ## (3))). Example:
   ##
@@ -364,12 +364,12 @@ template foldr*(sequence, operation: expr): expr =
   ##   let
   ##     numbers = @[5, 9, 11]
   ##     addition = foldr(numbers, a + b)
-  ##     substraction = foldr(numbers, a - b)
+  ##     subtraction = foldr(numbers, a - b)
   ##     multiplication = foldr(numbers, a * b)
   ##     words = @["nim", "is", "cool"]
   ##     concatenation = foldr(words, a & b)
   ##   assert addition == 25, "Addition is (5+(9+(11)))"
-  ##   assert substraction == 7, "Substraction is (5-(9-(11)))"
+  ##   assert subtraction == 7, "Subtraction is (5-(9-(11)))"
   ##   assert multiplication == 495, "Multiplication is (5*(9*(11)))"
   ##   assert concatenation == "nimiscool"
   assert sequence.len > 0, "Can't fold empty sequences"
@@ -507,12 +507,12 @@ when isMainModule:
     let
       numbers = @[5, 9, 11]
       addition = foldl(numbers, a + b)
-      substraction = foldl(numbers, a - b)
+      subtraction = foldl(numbers, a - b)
       multiplication = foldl(numbers, a * b)
       words = @["nim", "is", "cool"]
       concatenation = foldl(words, a & b)
     assert addition == 25, "Addition is (((5)+9)+11)"
-    assert substraction == -15, "Substraction is (((5)-9)-11)"
+    assert subtraction == -15, "Subtraction is (((5)-9)-11)"
     assert multiplication == 495, "Multiplication is (((5)*9)*11)"
     assert concatenation == "nimiscool"
 
@@ -520,12 +520,12 @@ when isMainModule:
     let
       numbers = @[5, 9, 11]
       addition = foldr(numbers, a + b)
-      substraction = foldr(numbers, a - b)
+      subtraction = foldr(numbers, a - b)
       multiplication = foldr(numbers, a * b)
       words = @["nim", "is", "cool"]
       concatenation = foldr(words, a & b)
     assert addition == 25, "Addition is (5+(9+(11)))"
-    assert substraction == 7, "Substraction is (5-(9-(11)))"
+    assert subtraction == 7, "Subtraction is (5-(9-(11)))"
     assert multiplication == 495, "Multiplication is (5*(9*(11)))"
     assert concatenation == "nimiscool"
 
diff --git a/lib/pure/collections/tables.nim b/lib/pure/collections/tables.nim
index 25fe306c0..c82f1230a 100644
--- a/lib/pure/collections/tables.nim
+++ b/lib/pure/collections/tables.nim
@@ -11,7 +11,7 @@
 ## (also often named `dictionary`:idx: in other programming languages) that is
 ## a mapping from keys to values. ``Table`` is the usual hash table,
 ## ``OrderedTable`` is like ``Table`` but remembers insertion order
-## and ``CountTable`` is a mapping from a key to its number of occurances.
+## and ``CountTable`` is a mapping from a key to its number of occurrences.
 ## For consistency with every other data type in Nim these have **value**
 ## semantics, this means that ``=`` performs a copy of the hash table.
 ## For **reference** semantics use the ``Ref`` variant: ``TableRef``,
diff --git a/lib/pure/colors.nim b/lib/pure/colors.nim
index 7942255cb..f24cc0072 100644
--- a/lib/pure/colors.nim
+++ b/lib/pure/colors.nim
@@ -46,7 +46,7 @@ proc `+`*(a, b: Color): Color =
   colorOp(satPlus)
   
 proc `-`*(a, b: Color): Color =
-  ## substracts two colors: This uses saturated artithmetic, so that each color
+  ## subtracts two colors: This uses saturated artithmetic, so that each color
   ## component cannot overflow (255 is used as a maximum).
   colorOp(satMinus)
   
@@ -392,7 +392,7 @@ proc parseColor*(name: string): Color =
     result = Color(parseHexInt(name))
   else:
     var idx = binaryStrSearch(colorNames, name)
-    if idx < 0: raise newException(ValueError, "unkown color: " & name)
+    if idx < 0: raise newException(ValueError, "unknown color: " & name)
     result = colorNames[idx][1]
 
 proc isColor*(name: string): bool =
diff --git a/lib/pure/encodings.nim b/lib/pure/encodings.nim
index 298a6072d..25c7ad9ef 100644
--- a/lib/pure/encodings.nim
+++ b/lib/pure/encodings.nim
@@ -301,7 +301,7 @@ proc getCurrentEncoding*(): string =
   
 proc open*(destEncoding = "UTF-8", srcEncoding = "CP1252"): EncodingConverter =
   ## opens a converter that can convert from `srcEncoding` to `destEncoding`.
-  ## Raises `EIO` if it cannot fullfill the request.
+  ## Raises `EIO` if it cannot fulfill the request.
   when not defined(windows):
     result = iconvOpen(destEncoding, srcEncoding)
     if result == nil:
diff --git a/lib/pure/events.nim b/lib/pure/events.nim
index 77faa6a66..44e9ed286 100644
--- a/lib/pure/events.nim
+++ b/lib/pure/events.nim
@@ -9,7 +9,7 @@
 
 ## :Author: Alex Mitchell
 ##
-## This module implements an event system that is not dependant on external
+## This module implements an event system that is not dependent on external
 ## graphical toolkits. It was originally called ``NimEE`` because 
 ## it was inspired by Python's PyEE module. There are two ways you can use
 ## events: one is a python-inspired way; the other is more of a C-style way.
diff --git a/lib/pure/htmlparser.nim b/lib/pure/htmlparser.nim
index e2cbb4949..5e4eba4e5 100644
--- a/lib/pure/htmlparser.nim
+++ b/lib/pure/htmlparser.nim
@@ -552,7 +552,7 @@ proc parse(x: var XmlParser, errors: var seq[string]): XmlNode =
 proc parseHtml*(s: Stream, filename: string, 
                 errors: var seq[string]): XmlNode = 
   ## parses the XML from stream `s` and returns a ``PXmlNode``. Every
-  ## occured parsing error is added to the `errors` sequence.
+  ## occurred parsing error is added to the `errors` sequence.
   var x: XmlParser
   open(x, s, filename, {reportComments, reportWhitespace})
   next(x)
@@ -581,7 +581,7 @@ proc parseHtml*(s: Stream): XmlNode =
 
 proc loadHtml*(path: string, errors: var seq[string]): XmlNode = 
   ## Loads and parses HTML from file specified by ``path``, and returns 
-  ## a ``PXmlNode``.  Every occured parsing error is added to
+  ## a ``PXmlNode``.  Every occurred parsing error is added to
   ## the `errors` sequence.
   var s = newFileStream(path, fmRead)
   if s == nil: raise newException(IOError, "Unable to read file: " & path)
diff --git a/lib/pure/httpclient.nim b/lib/pure/httpclient.nim
index 3c1401887..37af14df3 100644
--- a/lib/pure/httpclient.nim
+++ b/lib/pure/httpclient.nim
@@ -385,7 +385,7 @@ proc request*(url: string, httpMethod: string, extraHeaders = "",
               userAgent = defUserAgent, proxy: Proxy = nil): Response =
   ## | Requests ``url`` with the custom method string specified by the
   ## | ``httpMethod`` parameter.
-  ## | Extra headers can be specified and must be seperated by ``\c\L``
+  ## | Extra headers can be specified and must be separated by ``\c\L``
   ## | An optional timeout can be specified in miliseconds, if reading from the
   ## server takes longer than specified an ETimeout exception will be raised.
   var r = if proxy == nil: parseUri(url) else: proxy.url
@@ -436,7 +436,7 @@ proc request*(url: string, httpMethod = httpGET, extraHeaders = "",
               body = "", sslContext = defaultSSLContext, timeout = -1,
               userAgent = defUserAgent, proxy: Proxy = nil): Response =
   ## | Requests ``url`` with the specified ``httpMethod``.
-  ## | Extra headers can be specified and must be seperated by ``\c\L``
+  ## | Extra headers can be specified and must be separated by ``\c\L``
   ## | An optional timeout can be specified in miliseconds, if reading from the
   ## server takes longer than specified an ETimeout exception will be raised.
   result = request(url, $httpMethod, extraHeaders, body, sslContext, timeout, 
diff --git a/lib/pure/json.nim b/lib/pure/json.nim
index 2a40b4f1f..2038b246d 100644
--- a/lib/pure/json.nim
+++ b/lib/pure/json.nim
@@ -55,7 +55,7 @@ import
 
 type 
   JsonEventKind* = enum  ## enumeration of all events that may occur when parsing
-    jsonError,           ## an error ocurred during parsing
+    jsonError,           ## an error occurred during parsing
     jsonEof,             ## end of file reached
     jsonString,          ## a string literal
     jsonInt,             ## an integer literal
diff --git a/lib/pure/logging.nim b/lib/pure/logging.nim
index de733b75c..b64437c89 100644
--- a/lib/pure/logging.nim
+++ b/lib/pure/logging.nim
@@ -8,7 +8,7 @@
 #
 
 ## This module implements a simple logger. It has been designed to be as simple
-## as possible to avoid bloat, if this library does not fullfill your needs,
+## as possible to avoid bloat, if this library does not fulfill your needs,
 ## write your own.
 ## 
 ## Format strings support the following variables which must be prefixed with
diff --git a/lib/pure/net.nim b/lib/pure/net.nim
index 2b81b6fb0..2bd4a76d4 100644
--- a/lib/pure/net.nim
+++ b/lib/pure/net.nim
@@ -258,7 +258,7 @@ proc socketError*(socket: Socket, err: int = -1, async = false,
         of SSL_ERROR_WANT_X509_LOOKUP:
           raiseSSLError("Function for x509 lookup has been called.")
         of SSL_ERROR_SYSCALL:
-          var errStr = "IO error has occured "
+          var errStr = "IO error has occurred "
           let sslErr = ErrPeekLastError()
           if sslErr == 0 and err == 0:
             errStr.add "because an EOF was observed that violates the protocol"
@@ -887,7 +887,7 @@ proc connectAsync(socket: Socket, name: string, port = Port(0),
                   af: Domain = AF_INET) {.tags: [ReadIOEffect].} =
   ## A variant of ``connect`` for non-blocking sockets.
   ##
-  ## This procedure will immediatelly return, it will not block until a connection
+  ## This procedure will immediately return, it will not block until a connection
   ## is made. It is up to the caller to make sure the connection has been established
   ## by checking (using ``select``) whether the socket is writeable.
   ##
diff --git a/lib/pure/os.nim b/lib/pure/os.nim
index 820800a1a..ceeba182f 100644
--- a/lib/pure/os.nim
+++ b/lib/pure/os.nim
@@ -185,7 +185,7 @@ const
 proc osErrorMsg*(): string {.rtl, extern: "nos$1", deprecated.} =
   ## Retrieves the operating system's error flag, ``errno``.
   ## On Windows ``GetLastError`` is checked before ``errno``.
-  ## Returns "" if no error occured.
+  ## Returns "" if no error occurred.
   ##
   ## **Deprecated since version 0.9.4**: use the other ``osErrorMsg`` proc.
 
@@ -1099,7 +1099,7 @@ when defined(windows):
         var
           env = getEnvironmentStringsW()
           e = env
-        if e == nil: return # an error occured
+        if e == nil: return # an error occurred
         while true:
           var eend = strEnd(e)
           add(environment, $e)
@@ -1110,7 +1110,7 @@ when defined(windows):
         var
           env = getEnvironmentStringsA()
           e = env
-        if e == nil: return # an error occured
+        if e == nil: return # an error occurred
         while true:
           var eend = strEnd(e)
           add(environment, $e)
@@ -1182,7 +1182,7 @@ proc putEnv*(key, val: string) {.tags: [WriteEnvEffect].} =
   ## If an error occurs, `EInvalidEnvVar` is raised.
 
   # Note: by storing the string in the environment sequence,
-  # we gurantee that we don't free the memory before the program
+  # we guarantee that we don't free the memory before the program
   # ends (this is needed for POSIX compliance). It is also needed so that
   # the process itself may access its modified environment variables!
   var indx = findEnvVar(key)
@@ -1454,7 +1454,7 @@ proc createHardlink*(src, dest: string) =
 proc parseCmdLine*(c: string): seq[string] {.
   noSideEffect, rtl, extern: "nos$1".} =
   ## Splits a command line into several components;
-  ## This proc is only occassionally useful, better use the `parseopt` module.
+  ## This proc is only occasionally useful, better use the `parseopt` module.
   ##
   ## On Windows, it uses the following parsing rules
   ## (see http://msdn.microsoft.com/en-us/library/17w5ykft.aspx ):
diff --git a/lib/pure/osproc.nim b/lib/pure/osproc.nim
index 6361dfb09..cddedf48a 100644
--- a/lib/pure/osproc.nim
+++ b/lib/pure/osproc.nim
@@ -146,7 +146,7 @@ proc startProcess*(command: string,
   ## of `args` to `command` carefully escaping/quoting any special characters,
   ## since it will be passed *as is* to the system shell. Each system/shell may
   ## feature different escaping rules, so try to avoid this kind of shell
-  ## invokation if possible as it leads to non portable software.
+  ## invocation if possible as it leads to non portable software.
   ##
   ## Return value: The newly created process object. Nil is never returned,
   ## but ``EOS`` is raised in case of an error.
diff --git a/lib/pure/parsecfg.nim b/lib/pure/parsecfg.nim
index bb9d2aed2..bb64c8134 100644
--- a/lib/pure/parsecfg.nim
+++ b/lib/pure/parsecfg.nim
@@ -35,7 +35,7 @@ type
     cfgSectionStart,    ## a ``[section]`` has been parsed
     cfgKeyValuePair,    ## a ``key=value`` pair has been detected
     cfgOption,          ## a ``--key=value`` command line option
-    cfgError            ## an error ocurred during parsing
+    cfgError            ## an error occurred during parsing
     
   CfgEvent* = object of RootObj ## describes a parsing event
     case kind*: CfgEventKind    ## the kind of the event
diff --git a/lib/pure/parseopt2.nim b/lib/pure/parseopt2.nim
index 8ed519fa4..73b498fe0 100644
--- a/lib/pure/parseopt2.nim
+++ b/lib/pure/parseopt2.nim
@@ -60,7 +60,7 @@ proc initOptParser*(cmdline: string): OptParser {.rtl, deprecated.} =
   ## Initalizes option parses with cmdline. Splits cmdline in on spaces
   ## and calls initOptParser(openarray[string])
   ## Do not use.
-  if cmdline == "": # backward compatibilty
+  if cmdline == "": # backward compatibility
     return initOptParser(seq[string](nil))
   else:
     return initOptParser(cmdline.split)
diff --git a/lib/pure/parseutils.nim b/lib/pure/parseutils.nim
index 2c677fdc2..eb649a878 100644
--- a/lib/pure/parseutils.nim
+++ b/lib/pure/parseutils.nim
@@ -181,7 +181,7 @@ proc parseWhile*(s: string, token: var string, validChars: set[char],
   token = substr(s, start, i-1)
 
 proc captureBetween*(s: string, first: char, second = '\0', start = 0): string =
-  ## Finds the first occurence of ``first``, then returns everything from there
+  ## Finds the first occurrence of ``first``, then returns everything from there
   ## up to ``second``(if ``second`` is '\0', then ``first`` is used).
   var i = skipUntil(s, first, start)+1+start
   result = ""
@@ -240,7 +240,7 @@ proc parseBiggestFloat*(s: string, number: var BiggestFloat, start = 0): int {.
 proc parseFloat*(s: string, number: var float, start = 0): int {.
   rtl, extern: "npuParseFloat", noSideEffect.} =
   ## parses a float starting at `start` and stores the value into `number`.
-  ## Result is the number of processed chars or 0 if there occured a parsing
+  ## Result is the number of processed chars or 0 if there occurred a parsing
   ## error.
   var bf: BiggestFloat
   result = parseBiggestFloat(s, bf, start)
diff --git a/lib/pure/parsexml.nim b/lib/pure/parsexml.nim
index 39dead3c0..b957c0cf7 100644
--- a/lib/pure/parsexml.nim
+++ b/lib/pure/parsexml.nim
@@ -57,7 +57,7 @@ import
 
 type 
   XmlEventKind* = enum ## enumation of all events that may occur when parsing
-    xmlError,           ## an error ocurred during parsing
+    xmlError,           ## an error occurred during parsing
     xmlEof,             ## end of file reached
     xmlCharData,        ## character data
     xmlWhitespace,      ## whitespace has been parsed
diff --git a/lib/pure/ropes.nim b/lib/pure/ropes.nim
index 995dff2aa..4cc64a154 100644
--- a/lib/pure/ropes.nim
+++ b/lib/pure/ropes.nim
@@ -43,7 +43,7 @@ proc isConc(r: Rope): bool {.inline.} = return isNil(r.data)
 # Note that the left and right pointers are not needed for leafs.
 # Leaves have relatively high memory overhead (~30 bytes on a 32
 # bit machine) and we produce many of them. This is why we cache and
-# share leafs accross different rope trees.
+# share leafs across different rope trees.
 # To cache them they are inserted in another tree, a splay tree for best
 # performance. But for the caching tree we use the leaf's left and right
 # pointers.
diff --git a/lib/pure/selectors.nim b/lib/pure/selectors.nim
index 593eec15a..2ed53ef3f 100644
--- a/lib/pure/selectors.nim
+++ b/lib/pure/selectors.nim
@@ -35,7 +35,7 @@ type
 when defined(nimdoc):
   type
     Selector* = ref object
-      ## An object which holds file descripters to be checked for read/write
+      ## An object which holds file descriptors to be checked for read/write
       ## status.
       fds: Table[SocketHandle, SelectorKey]
 
diff --git a/lib/pure/sockets.nim b/lib/pure/sockets.nim
index 11eeefcb9..8ac5d4f09 100644
--- a/lib/pure/sockets.nim
+++ b/lib/pure/sockets.nim
@@ -851,7 +851,7 @@ proc connectAsync*(socket: Socket, name: string, port = Port(0),
                      af: Domain = AF_INET) {.tags: [ReadIOEffect].} =
   ## A variant of ``connect`` for non-blocking sockets.
   ##
-  ## This procedure will immediatelly return, it will not block until a connection
+  ## This procedure will immediately return, it will not block until a connection
   ## is made. It is up to the caller to make sure the connection has been established
   ## by checking (using ``select``) whether the socket is writeable.
   ##
@@ -1467,7 +1467,7 @@ proc recvAsync*(socket: Socket, s: var TaintedString): bool {.
           of SSL_ERROR_ZERO_RETURN:
             raiseSslError("TLS/SSL connection failed to initiate, socket closed prematurely.")
           of SSL_ERROR_WANT_CONNECT, SSL_ERROR_WANT_ACCEPT:
-            raiseSslError("Unexpected error occured.") # This should just not happen.
+            raiseSslError("Unexpected error occurred.") # This should just not happen.
           of SSL_ERROR_WANT_WRITE, SSL_ERROR_WANT_READ:
             return false
           of SSL_ERROR_WANT_X509_LOOKUP:
@@ -1610,7 +1610,7 @@ proc sendAsync*(socket: Socket, data: string): int {.tags: [WriteIOEffect].} =
           of SSL_ERROR_ZERO_RETURN:
             raiseSslError("TLS/SSL connection failed to initiate, socket closed prematurely.")
           of SSL_ERROR_WANT_CONNECT, SSL_ERROR_WANT_ACCEPT:
-            raiseSslError("Unexpected error occured.") # This should just not happen.
+            raiseSslError("Unexpected error occurred.") # This should just not happen.
           of SSL_ERROR_WANT_WRITE, SSL_ERROR_WANT_READ:
             return 0
           of SSL_ERROR_WANT_X509_LOOKUP:
diff --git a/lib/pure/streams.nim b/lib/pure/streams.nim
index 55351ffd4..67c80e592 100644
--- a/lib/pure/streams.nim
+++ b/lib/pure/streams.nim
@@ -122,41 +122,41 @@ proc read[T](s: Stream, result: var T) =
     raise newEIO("cannot read from stream")
 
 proc readChar*(s: Stream): char =
-  ## reads a char from the stream `s`. Raises `EIO` if an error occured.
+  ## reads a char from the stream `s`. Raises `EIO` if an error occurred.
   ## Returns '\0' as an EOF marker.
   if readData(s, addr(result), sizeof(result)) != 1: result = '\0'
 
 proc readBool*(s: Stream): bool = 
-  ## reads a bool from the stream `s`. Raises `EIO` if an error occured.
+  ## reads a bool from the stream `s`. Raises `EIO` if an error occurred.
   read(s, result)
 
 proc readInt8*(s: Stream): int8 = 
-  ## reads an int8 from the stream `s`. Raises `EIO` if an error occured.
+  ## reads an int8 from the stream `s`. Raises `EIO` if an error occurred.
   read(s, result)
 
 proc readInt16*(s: Stream): int16 = 
-  ## reads an int16 from the stream `s`. Raises `EIO` if an error occured.
+  ## reads an int16 from the stream `s`. Raises `EIO` if an error occurred.
   read(s, result)
 
 proc readInt32*(s: Stream): int32 = 
-  ## reads an int32 from the stream `s`. Raises `EIO` if an error occured.
+  ## reads an int32 from the stream `s`. Raises `EIO` if an error occurred.
   read(s, result)
 
 proc readInt64*(s: Stream): int64 = 
-  ## reads an int64 from the stream `s`. Raises `EIO` if an error occured.
+  ## reads an int64 from the stream `s`. Raises `EIO` if an error occurred.
   read(s, result)
 
 proc readFloat32*(s: Stream): float32 = 
-  ## reads a float32 from the stream `s`. Raises `EIO` if an error occured.
+  ## reads a float32 from the stream `s`. Raises `EIO` if an error occurred.
   read(s, result)
 
 proc readFloat64*(s: Stream): float64 = 
-  ## reads a float64 from the stream `s`. Raises `EIO` if an error occured.
+  ## reads a float64 from the stream `s`. Raises `EIO` if an error occurred.
   read(s, result)
 
 proc readStr*(s: Stream, length: int): TaintedString = 
   ## reads a string of length `length` from the stream `s`. Raises `EIO` if 
-  ## an error occured.
+  ## an error occurred.
   result = newString(length).TaintedString
   var L = readData(s, addr(string(result)[0]), length)
   if L != length: setLen(result.string, L)
@@ -183,7 +183,7 @@ proc readLine*(s: Stream, line: var TaintedString): bool =
 
 proc readLine*(s: Stream): TaintedString =
   ## Reads a line from a stream `s`. Note: This is not very efficient. Raises 
-  ## `EIO` if an error occured.
+  ## `EIO` if an error occurred.
   result = TaintedString""
   while true:
     var c = readChar(s)
diff --git a/lib/pure/strutils.nim b/lib/pure/strutils.nim
index e17d99dc2..17e0b9e63 100644
--- a/lib/pure/strutils.nim
+++ b/lib/pure/strutils.nim
@@ -815,8 +815,8 @@ proc rfind*(s: string, sub: char, start: int = -1): int {.noSideEffect,
 
 proc count*(s: string, sub: string, overlapping: bool = false): int {.noSideEffect,
   rtl, extern: "nsuCountString".} =
-  ## Count the occurences of a substring `sub` in the string `s`.
-  ## Overlapping occurences of `sub` only count when `overlapping`
+  ## Count the occurrences of a substring `sub` in the string `s`.
+  ## Overlapping occurrences of `sub` only count when `overlapping`
   ## is set to true.
   var i = 0
   while true:
@@ -831,14 +831,14 @@ proc count*(s: string, sub: string, overlapping: bool = false): int {.noSideEffe
 
 proc count*(s: string, sub: char): int {.noSideEffect,
   rtl, extern: "nsuCountChar".} =
-  ## Count the occurences of the character `sub` in the string `s`.
+  ## Count the occurrences of the character `sub` in the string `s`.
   for c in s:
     if c == sub:
       inc result
 
 proc count*(s: string, subs: set[char]): int {.noSideEffect,
   rtl, extern: "nsuCountCharSet".} =
-  ## Count the occurences of the group of character `subs` in the string `s`.
+  ## Count the occurrences of the group of character `subs` in the string `s`.
   for c in s:
     if c in subs:
       inc result
@@ -898,7 +898,7 @@ proc replaceWord*(s, sub: string, by = ""): string {.noSideEffect,
   rtl, extern: "nsuReplaceWord".} =
   ## Replaces `sub` in `s` by the string `by`.
   ##
-  ## Each occurance of `sub` has to be surrounded by word boundaries
+  ## Each occurrence of `sub` has to be surrounded by word boundaries
   ## (comparable to ``\\w`` in regular expressions), otherwise it is not
   ## replaced.
   const wordChars = {'a'..'z', 'A'..'Z', '0'..'9', '_', '\128'..'\255'}
diff --git a/lib/pure/xmldom.nim b/lib/pure/xmldom.nim
index 660932d92..2e55ff182 100644
--- a/lib/pure/xmldom.nim
+++ b/lib/pure/xmldom.nim
@@ -642,7 +642,7 @@ proc isEmpty(s: string): bool =
   return true
 
 proc normalize*(n: PNode) =
-  ## Merges all seperated TextNodes together, and removes any empty TextNodes
+  ## Merges all separated TextNodes together, and removes any empty TextNodes
   var curTextNode: PNode = nil
   var i: int = 0
 
diff --git a/lib/pure/xmlparser.nim b/lib/pure/xmlparser.nim
index 8591e894c..755bfcdbc 100644
--- a/lib/pure/xmlparser.nim
+++ b/lib/pure/xmlparser.nim
@@ -103,7 +103,7 @@ proc parse(x: var XmlParser, errors: var seq[string]): XmlNode =
 proc parseXml*(s: Stream, filename: string, 
                errors: var seq[string]): XmlNode = 
   ## parses the XML from stream `s` and returns a ``PXmlNode``. Every
-  ## occured parsing error is added to the `errors` sequence.
+  ## occurred parsing error is added to the `errors` sequence.
   var x: XmlParser
   open(x, s, filename, {reportComments})
   while true:
@@ -129,7 +129,7 @@ proc parseXml*(s: Stream): XmlNode =
 
 proc loadXml*(path: string, errors: var seq[string]): XmlNode =
   ## Loads and parses XML from file specified by ``path``, and returns 
-  ## a ``PXmlNode``. Every occured parsing error is added to the `errors`
+  ## a ``PXmlNode``. Every occurred parsing error is added to the `errors`
   ## sequence.
   var s = newFileStream(path, fmRead)
   if s == nil: raise newException(IOError, "Unable to read file: " & path)
diff --git a/lib/system.nim b/lib/system.nim
index 9dc233cb7..b86ab7080 100644
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -73,7 +73,7 @@ type
   expr* {.magic: Expr.} ## meta type to denote an expression (for templates)
   stmt* {.magic: Stmt.} ## meta type to denote a statement (for templates)
   typedesc* {.magic: TypeDesc.} ## meta type to denote a type description
-  void* {.magic: "VoidType".}   ## meta type to denote the absense of any type
+  void* {.magic: "VoidType".}   ## meta type to denote the absence of any type
   auto* = expr
   any* = distinct auto
 
@@ -357,7 +357,7 @@ type
     ##
     ## See the full `exception hierarchy`_.
   IOError* = object of SystemError ## \
-    ## Raised if an IO error occured.
+    ## Raised if an IO error occurred.
     ##
     ## See the full `exception hierarchy`_.
   OSError* = object of SystemError ## \
@@ -370,11 +370,11 @@ type
     ##
     ## See the full `exception hierarchy`_.
   ResourceExhaustedError* = object of SystemError ## \
-    ## Raised if a resource request could not be fullfilled.
+    ## Raised if a resource request could not be fulfilled.
     ##
     ## See the full `exception hierarchy`_.
   ArithmeticError* = object of Exception ## \
-    ## Raised if any kind of arithmetic error occured.
+    ## Raised if any kind of arithmetic error occurred.
     ##
     ## See the full `exception hierarchy`_.
   DivByZeroError* = object of ArithmeticError ## \
@@ -578,7 +578,7 @@ proc len*(x: cstring): int {.magic: "LengthStr", noSideEffect.}
 proc len*[I, T](x: array[I, T]): int {.magic: "LengthArray", noSideEffect.}
 proc len*[T](x: seq[T]): int {.magic: "LengthSeq", noSideEffect.}
   ## returns the length of an array, an openarray, a sequence or a string.
-  ## This is rougly the same as ``high(T)-low(T)+1``, but its resulting type is
+  ## This is roughly the same as ``high(T)-low(T)+1``, but its resulting type is
   ## always an int.
 
 # set routines:
@@ -865,7 +865,7 @@ proc contains*[T](x: set[T], y: T): bool {.magic: "InSet", noSideEffect.}
   ## passes its arguments in reverse order.
 
 proc contains*[T](s: Slice[T], value: T): bool {.noSideEffect, inline.} =
-  ## Checks if `value` is withing the range of `s`; returns true iff
+  ## Checks if `value` is within the range of `s`; returns true iff
   ## `value >= s.a and value <= s.b`
   ##
   ## .. code-block:: Nim
diff --git a/lib/system/arithm.nim b/lib/system/arithm.nim
index c4df287cf..f68e2dcd9 100644
--- a/lib/system/arithm.nim
+++ b/lib/system/arithm.nim
@@ -15,7 +15,7 @@ proc raiseOverflow {.compilerproc, noinline, noreturn.} =
   sysFatal(OverflowError, "over- or underflow")
 
 proc raiseDivByZero {.compilerproc, noinline, noreturn.} =
-  sysFatal(DivByZeroError, "divison by zero")
+  sysFatal(DivByZeroError, "division by zero")
 
 proc addInt64(a, b: int64): int64 {.compilerProc, inline.} =
   result = a +% b
diff --git a/lib/system/cgprocs.nim b/lib/system/cgprocs.nim
index 089846578..f3acc81f2 100644
--- a/lib/system/cgprocs.nim
+++ b/lib/system/cgprocs.nim
@@ -13,7 +13,7 @@ proc addChar(s: NimString, c: char): NimString {.compilerProc, benign.}
 
 type
   TLibHandle = pointer       # private type
-  TProcAddr = pointer        # libary loading and loading of procs:
+  TProcAddr = pointer        # library loading and loading of procs:
 
 proc nimLoadLibrary(path: string): TLibHandle {.compilerproc.}
 proc nimUnloadLibrary(lib: TLibHandle) {.compilerproc.}
diff --git a/lib/system/dyncalls.nim b/lib/system/dyncalls.nim
index 539e37aaf..44f7b67c3 100644
--- a/lib/system/dyncalls.nim
+++ b/lib/system/dyncalls.nim
@@ -8,7 +8,7 @@
 #
 
 # This file implements the ability to call native procs from libraries.
-# It is not possible to do this in a platform independant way, unfortunately.
+# It is not possible to do this in a platform independent way, unfortunately.
 # However, the interface has been designed to take platform differences into
 # account and been ported to all major platforms.
 
diff --git a/lib/system/gc.nim b/lib/system/gc.nim
index 9459ee6b9..1f4279c8f 100644
--- a/lib/system/gc.nim
+++ b/lib/system/gc.nim
@@ -884,7 +884,7 @@ elif stackIncreases:
   var
     jmpbufSize {.importc: "sizeof(jmp_buf)", nodecl.}: int
       # a little hack to get the size of a TJmpBuf in the generated C code
-      # in a platform independant way
+      # in a platform independent way
 
   template forEachStackSlot(gch, gcMark: expr) {.immediate, dirty.} =
     var registers: C_JmpBuf
diff --git a/lib/system/gc2.nim b/lib/system/gc2.nim
index b0173b78f..f6833e19a 100644
--- a/lib/system/gc2.nim
+++ b/lib/system/gc2.nim
@@ -1067,7 +1067,7 @@ proc stackSize(): int {.noinline.} =
 var
   jmpbufSize {.importc: "sizeof(jmp_buf)", nodecl.}: int
     # a little hack to get the size of a TJmpBuf in the generated C code
-    # in a platform independant way
+    # in a platform independent way
 
 when defined(sparc): # For SPARC architecture.
   proc isOnStack(p: pointer): bool =
@@ -1263,7 +1263,7 @@ proc unmarkStackAndRegisters(gch: var TGcHeap) =
     # XXX no need for an atomic dec here:
     if c.refcount--(LocalHeap):
       # the object survived only because of a stack reference
-      # it still doesn't have heap refernces
+      # it still doesn't have heap references
       addZCT(gch.zct, c)
     
     if canbeCycleRoot(c):
diff --git a/lib/system/gc_ms.nim b/lib/system/gc_ms.nim
index 014b7c278..6fbe94239 100644
--- a/lib/system/gc_ms.nim
+++ b/lib/system/gc_ms.nim
@@ -476,7 +476,7 @@ elif stackIncreases:
   var
     jmpbufSize {.importc: "sizeof(jmp_buf)", nodecl.}: int
       # a little hack to get the size of a TJmpBuf in the generated C code
-      # in a platform independant way
+      # in a platform independent way
 
   proc markStackAndRegisters(gch: var TGcHeap) {.noinline, cdecl.} =
     var registers: C_JmpBuf
diff --git a/lib/system/hti.nim b/lib/system/hti.nim
index e599668a7..7dee054ac 100644
--- a/lib/system/hti.nim
+++ b/lib/system/hti.nim
@@ -26,7 +26,7 @@ type
     tyExpr,
     tyStmt,
     tyTypeDesc,
-    tyGenericInvokation, # ``T[a, b]`` for types to invoke
+    tyGenericInvocation, # ``T[a, b]`` for types to invoke
     tyGenericBody,       # ``T[a, b, body]`` last parameter is the body
     tyGenericInst,       # ``T[a, b, realInstance]`` instantiated generic type
     tyGenericParam,      # ``a`` in the example
diff --git a/lib/system/jssys.nim b/lib/system/jssys.nim
index 9b4a7d556..15b00f8f1 100644
--- a/lib/system/jssys.nim
+++ b/lib/system/jssys.nim
@@ -128,7 +128,7 @@ proc raiseOverflow {.exportc: "raiseOverflow", noreturn.} =
   raise newException(OverflowError, "over- or underflow")
 
 proc raiseDivByZero {.exportc: "raiseDivByZero", noreturn.} =
-  raise newException(DivByZeroError, "divison by zero")
+  raise newException(DivByZeroError, "division by zero")
 
 proc raiseRangeError() {.compilerproc, noreturn.} =
   raise newException(RangeError, "value out of range")
diff --git a/lib/system/sysio.nim b/lib/system/sysio.nim
index 2e254c87b..aed17de80 100644
--- a/lib/system/sysio.nim
+++ b/lib/system/sysio.nim
@@ -132,7 +132,7 @@ proc rawFileSize(file: File): int =
   discard fseek(file, clong(oldPos), 0)
 
 proc readAllFile(file: File, len: int): string =
-  # We aquire the filesize beforehand and hope it doesn't change.
+  # We acquire the filesize beforehand and hope it doesn't change.
   # Speeds things up.
   result = newString(int(len))
   if readBuffer(file, addr(result[0]), int(len)) != len:
diff --git a/lib/system/sysstr.nim b/lib/system/sysstr.nim
index 440d040a5..f7e1773be 100644
--- a/lib/system/sysstr.nim
+++ b/lib/system/sysstr.nim
@@ -222,9 +222,9 @@ proc setLengthSeq(seq: PGenericSeq, elemSize, newLen: int): PGenericSeq {.
                             extGetCellType(result).base, waZctDecRef)
       
     # XXX: zeroing out the memory can still result in crashes if a wiped-out
-    # cell is aliased by another pointer (ie proc paramter or a let variable).
+    # cell is aliased by another pointer (ie proc parameter or a let variable).
     # This is a tought problem, because even if we don't zeroMem here, in the
-    # presense of user defined destructors, the user will expect the cell to be
+    # presence of user defined destructors, the user will expect the cell to be
     # "destroyed" thus creating the same problem. We can destoy the cell in the
     # finalizer of the sequence, but this makes destruction non-deterministic.
     zeroMem(cast[pointer](cast[ByteAddress](result) +% GenericSeqSize +%
diff --git a/lib/wrappers/libffi/msvc/win32.c b/lib/wrappers/libffi/msvc/win32.c
index d1149a85e..2754fd35d 100644
--- a/lib/wrappers/libffi/msvc/win32.c
+++ b/lib/wrappers/libffi/msvc/win32.c
@@ -90,7 +90,7 @@ noclean:
 
 // If the return value pointer is NULL, assume no return value.
 /*
-  Intel asm is weird. We have to explicitely specify 'DWORD PTR' in the nexr instruction,
+  Intel asm is weird. We have to explicitly specify 'DWORD PTR' in the nexr instruction,
   otherwise only one BYTE will be compared (instead of a DWORD)!
  */
 		cmp DWORD PTR [ebp + 24], 0
diff --git a/lib/wrappers/mysql.nim b/lib/wrappers/mysql.nim
index 3857744ae..937a8952a 100644
--- a/lib/wrappers/mysql.nim
+++ b/lib/wrappers/mysql.nim
@@ -63,9 +63,9 @@ type
 const 
   SCRAMBLE_LENGTH* = 20 # Length of random string sent by server on handshake; 
                         # this is also length of obfuscated password, 
-                        # recieved from client
+                        # received from client
   SCRAMBLE_LENGTH_323* = 8    # length of password stored in the db: 
-                              # new passwords are preceeded with '*'  
+                              # new passwords are preceded with '*'  
   SCRAMBLED_PASSWORD_CHAR_LENGTH* = SCRAMBLE_LENGTH * 2 + 1
   SCRAMBLED_PASSWORD_CHAR_LENGTH_323* = SCRAMBLE_LENGTH_323 * 2
   NOT_NULL_FLAG* = 1          #  Field can't be NULL
@@ -146,7 +146,7 @@ const
   MAX_MEDIUMINT_WIDTH* = 8    # Max width for a INT24 w.o. sign
   MAX_INT_WIDTH* = 10         # Max width for a LONG w.o. sign
   MAX_BIGINT_WIDTH* = 20      # Max width for a LONGLONG
-  MAX_CHAR_WIDTH* = 255       # Max length for a CHAR colum
+  MAX_CHAR_WIDTH* = 255       # Max length for a CHAR column
   MAX_BLOB_WIDTH* = 8192      # Default width for blob
 
 type 
@@ -558,7 +558,7 @@ type
   Tstatus* = enum 
     STATUS_READY, STATUS_GET_RESULT, STATUS_USE_RESULT
   Tprotocol_type* = enum  # There are three types of queries - the ones that have to go to
-                          # the master, the ones that go to a slave, and the adminstrative
+                          # the master, the ones that go to a slave, and the administrative
                           # type which must happen on the pivot connectioin 
     PROTOCOL_DEFAULT, PROTOCOL_TCP, PROTOCOL_SOCKET, PROTOCOL_PIPE, 
     PROTOCOL_MEMORY
@@ -790,7 +790,7 @@ proc server_init*(argc: cint, argv: cstringArray, groups: cstringArray): cint{.
 proc server_end*(){.cdecl, dynlib: lib, importc: "mysql_server_end".}
   # mysql_server_init/end need to be called when using libmysqld or
   #      libmysqlclient (exactly, mysql_server_init() is called by mysql_init() so
-  #      you don't need to call it explicitely; but you need to call
+  #      you don't need to call it explicitly; but you need to call
   #      mysql_server_end() to free memory). The names are a bit misleading
   #      (mysql_SERVER* to be used when using libmysqlCLIENT). So we add more general
   #      names which suit well whether you're using libmysqld or libmysqlclient. We
diff --git a/lib/wrappers/readline/history.nim b/lib/wrappers/readline/history.nim
index caa857ceb..495bc15e4 100644
--- a/lib/wrappers/readline/history.nim
+++ b/lib/wrappers/readline/history.nim
@@ -231,7 +231,7 @@ proc history_truncate_file*(a2: cstring, a3: cint): cint{.cdecl,
 #  -1) If there was an error in expansion.
 #   2) If the returned line should just be printed.
 #
-#  If an error ocurred in expansion, then OUTPUT contains a descriptive
+#  If an error occurred in expansion, then OUTPUT contains a descriptive
 #  error message. 
 
 proc history_expand*(a2: cstring, a3: cstringArray): cint{.cdecl, 
diff --git a/lib/wrappers/readline/tweaked/history.h b/lib/wrappers/readline/tweaked/history.h
index 53bd642b1..b79123790 100644
--- a/lib/wrappers/readline/tweaked/history.h
+++ b/lib/wrappers/readline/tweaked/history.h
@@ -217,7 +217,7 @@ extern int history_truncate_file PARAMS((const char *, int));
   -1) If there was an error in expansion.
    2) If the returned line should just be printed.
 
-  If an error ocurred in expansion, then OUTPUT contains a descriptive
+  If an error occurred in expansion, then OUTPUT contains a descriptive
   error message. */
 extern int history_expand PARAMS((char *, char **));
 
diff --git a/lib/wrappers/sdl/sdl.nim b/lib/wrappers/sdl/sdl.nim
index 449b651f9..5bb5b7ec2 100644
--- a/lib/wrappers/sdl/sdl.nim
+++ b/lib/wrappers/sdl/sdl.nim
@@ -89,7 +89,7 @@
 #                           As most games will need it.
 #
 #   April    02 2001 - DL : Added SDL_getenv.h definitions and tested version
-#                           1.2.0 compatability.
+#                           1.2.0 compatibility.
 #
 #   March    13 2001 - MT : Added Linux compatibility.
 #
@@ -118,7 +118,7 @@
 #
 #  November  30 2001 - DL : SDL_NOFRAME added as pointed out by Simon Rushton.
 #
-#  December  11 2001 - DL : Added $WEAKPACKAGEUNIT ON to facilitate useage in
+#  December  11 2001 - DL : Added $WEAKPACKAGEUNIT ON to facilitate usage in
 #                           Components
 #
 #  January   05 2002 - DL : Added SDL_Swap32 function as suggested by Matthias
@@ -209,7 +209,7 @@
 #  forgot to apply Michalis Kamburelis' patch to the implementation section. now fixed
 #
 #  Revision 1.14  2004/12/23 23:42:18  savage
-#  Applied Patches supplied by Michalis Kamburelis ( THANKS! ), for greater FreePascal compatability.
+#  Applied Patches supplied by Michalis Kamburelis ( THANKS! ), for greater FreePascal compatibility.
 #
 #  Revision 1.13  2004/09/30 22:31:59  savage
 #  Updated with slightly different header comments
@@ -221,7 +221,7 @@
 #  Updated so that Library name defines are correctly defined for MacOS X.
 #
 #  Revision 1.10  2004/07/20 23:57:33  savage
-#  Thanks to Paul Toth for spotting an error in the SDL Audio Convertion structures.
+#  Thanks to Paul Toth for spotting an error in the SDL Audio Conversion structures.
 #  In TSDL_AudioCVT the filters variable should point to and array of pointers and not what I had there previously.
 #
 #  Revision 1.9  2004/07/03 22:07:22  savage
@@ -243,7 +243,7 @@
 #  SDL_GetEnv Fix so that it is not define twice for FPC. Thanks to Rene Hugentobler for pointing out this bug,
 #
 #  Revision 1.3  2004/02/18 22:35:51  savage
-#  Brought sdl.pas up to 1.2.7 compatability
+#  Brought sdl.pas up to 1.2.7 compatibility
 #  Thus...
 #  Added SDL_GL_STEREO,
 #      SDL_GL_MULTISAMPLEBUFFERS,
diff --git a/lib/wrappers/sdl/sdl_mixer.nim b/lib/wrappers/sdl/sdl_mixer.nim
index 33a71508a..2f8664635 100644
--- a/lib/wrappers/sdl/sdl_mixer.nim
+++ b/lib/wrappers/sdl/sdl_mixer.nim
@@ -136,7 +136,7 @@
 #  Windows unit not used in this file, so it was removed to keep the code tidy.
 #
 #  Revision 1.3  2004/03/31 10:05:08  savage
-#  Better defines for Endianess under FreePascal and Borland compilers.
+#  Better defines for Endianness under FreePascal and Borland compilers.
 #
 #  Revision 1.2  2004/03/30 20:23:28  savage
 #  Tidied up use of UNIX compiler directive.
diff --git a/tests/caas/issue_416_template_shift.txt b/tests/caas/issue_416_template_shift.txt
index b1f47c1ac..e911c1360 100644
--- a/tests/caas/issue_416_template_shift.txt
+++ b/tests/caas/issue_416_template_shift.txt
@@ -6,7 +6,7 @@ def\tskType\tsystem.string\tstring
 > idetools --track:$TESTNIM,12,35 --def $SILENT
 def\tskLet\t$MODULE.failtest.input\tTaintedString
 
-# The following fail because they seem shifted one colum to the right.
+# The following fail because they seem shifted one column to the right.
 > idetools --track:$TESTNIM,12,16 --def $SILENT
 def\tskTemplate\tsequtils.toSeq\tproc \(expr\): expr
 > idetools --track:$TESTNIM,12,22 --def $SILENT
diff --git a/tests/caas/its_full_of_procs.nim b/tests/caas/its_full_of_procs.nim
index 45347490c..8f8b66764 100644
--- a/tests/caas/its_full_of_procs.nim
+++ b/tests/caas/its_full_of_procs.nim
@@ -2,7 +2,7 @@ import unicode, sequtils
 
 # This example shows that idetools returns proc as signature for everything
 # which can be called. While a clever person would use the second column to
-# differentiate betwen procs, methods and others, why does the output contain
+# differentiate between procs, methods and others, why does the output contain
 # incorrect information?
 
 type
diff --git a/tests/manyloc/keineschweine/dependencies/chipmunk/chipmunk.nim b/tests/manyloc/keineschweine/dependencies/chipmunk/chipmunk.nim
index 08f1dad50..493a2106c 100644
--- a/tests/manyloc/keineschweine/dependencies/chipmunk/chipmunk.nim
+++ b/tests/manyloc/keineschweine/dependencies/chipmunk/chipmunk.nim
@@ -279,7 +279,7 @@ type
   PSegmentQueryInfo* = ptr TSegmentQueryInfo
   #/ Segment query info struct.
   TSegmentQueryInfo*{.pf.} = object 
-    shape*: PShape         #/ The shape that was hit, NULL if no collision occured.
+    shape*: PShape         #/ The shape that was hit, NULL if no collision occurred.
     t*: CpFloat            #/ The normalized distance along the query segment in the range [0, 1].
     n*: TVector            #/ The normal of the surface hit.
   TShapeType*{.size: sizeof(cint).} = enum 
diff --git a/tests/manyloc/keineschweine/lib/zlib_helpers.nim b/tests/manyloc/keineschweine/lib/zlib_helpers.nim
index ef977afb0..9a6542d75 100644
--- a/tests/manyloc/keineschweine/lib/zlib_helpers.nim
+++ b/tests/manyloc/keineschweine/lib/zlib_helpers.nim
@@ -8,7 +8,7 @@ proc compress*(source: string): string =
   result.setLen destLen
   var res = zlib.compress(cstring(result), addr destLen, cstring(source), sourceLen)
   if res != Z_OK:
-    echo "Error occured: ", res
+    echo "Error occurred: ", res
   elif destLen < result.len:
     result.setLen(destLen)
 
@@ -17,7 +17,7 @@ proc uncompress*(source: string, destLen: var int): string =
   result.setLen destLen
   var res = zlib.uncompress(cstring(result), addr destLen, cstring(source), source.len)
   if res != Z_OK:
-    echo "Error occured: ", res
+    echo "Error occurred: ", res
     
 
 when isMainModule:
diff --git a/tests/types/tforwty2.nim b/tests/types/tforwty2.nim
index d103314c5..52af1c7dd 100644
--- a/tests/types/tforwty2.nim
+++ b/tests/types/tforwty2.nim
@@ -1,5 +1,5 @@
 # Test for a hard to fix internal error

-# occured in the SDL library

+# occurred in the SDL library

 

 {.push dynlib: "SDL.dll", callconv: cdecl.}

 

diff --git a/tinyc/arm-gen.c b/tinyc/arm-gen.c
index 42feecf73..050a8ad88 100644
--- a/tinyc/arm-gen.c
+++ b/tinyc/arm-gen.c
@@ -1506,7 +1506,7 @@ void gen_opf(int op)
 	  case TOK_UGE:
 	  case TOK_ULE:
 	  case TOK_UGT:
-            error("unsigned comparision on floats?");
+            error("unsigned comparison on floats?");
 	    break;
 	  case TOK_LT:
             op=TOK_Nset;
diff --git a/tinyc/c67-gen.c b/tinyc/c67-gen.c
index 04f8a12b7..77c68a279 100644
--- a/tinyc/c67-gen.c
+++ b/tinyc/c67-gen.c
@@ -235,7 +235,7 @@ void gsym(int t)
 }
 
 // these are regs that tcc doesn't really know about, 
-// but asign them unique values so the mapping routines
+// but assign them unique values so the mapping routines
 // can distinquish them
 
 #define C67_A0 105
diff --git a/tinyc/i386-asm.c b/tinyc/i386-asm.c
index 21b28d7a0..12ff8f2ba 100644
--- a/tinyc/i386-asm.c
+++ b/tinyc/i386-asm.c
@@ -1105,7 +1105,7 @@ static void subst_asm_operand(CString *add_str,
     }
 }
 
-/* generate prolog and epilog code for asm statment */
+/* generate prolog and epilog code for asm statement */
 static void asm_gen_code(ASMOperand *operands, int nb_operands, 
                          int nb_outputs, int is_output,
                          uint8_t *clobber_regs,
diff --git a/tinyc/lib/bcheck.c b/tinyc/lib/bcheck.c
index 0ec2a4b47..c59d04eb8 100644
--- a/tinyc/lib/bcheck.c
+++ b/tinyc/lib/bcheck.c
@@ -628,7 +628,7 @@ int __bound_delete_region(void *p)
 }
 
 /* return the size of the region starting at p, or EMPTY_SIZE if non
-   existant region. */
+   existent region. */
 static unsigned long get_region_size(void *p)
 {
     unsigned long addr = (unsigned long)p;
diff --git a/tinyc/tcc-doc.html b/tinyc/tcc-doc.html
index e40532ed0..bd856d256 100644
--- a/tinyc/tcc-doc.html
+++ b/tinyc/tcc-doc.html
@@ -927,7 +927,7 @@ They can be defined several times in the same source. Use 'b'
 </tr></table>
 <h2 class="section"> 4.4 Directives </h2>
 
-<p>All directives are preceeded by a '.'. The following directives are
+<p>All directives are preceded by a '.'. The following directives are
 supported:
 </p>
 <ul class="toc">
@@ -1365,7 +1365,7 @@ reverse order, a first pass is done to reverse the argument order.
 </tr></table>
 <h2 class="section"> 8.4 Types </h2>
 
-<p>The types are stored in a single 'int' variable. It was choosen in the
+<p>The types are stored in a single 'int' variable. It was chosen in the
 first stages of development when tcc was much simpler. Now, it may not
 be the best solution.
 </p>
@@ -1531,7 +1531,7 @@ current position in the code section.
 </dd>
 <dt> <code>stab_section</code></dt>
 <dt> <code>stabstr_section</code></dt>
-<dd><p>are used when debugging is actived to store debug information
+<dd><p>are used when debugging is activated to store debug information
 </p>
 </dd>
 <dt> <code>symtab_section</code></dt>
diff --git a/tinyc/tcc-doc.texi b/tinyc/tcc-doc.texi
index 7cc61bbdb..47a8c8b00 100644
--- a/tinyc/tcc-doc.texi
+++ b/tinyc/tcc-doc.texi
@@ -673,7 +673,7 @@ They can be defined several times in the same source. Use 'b'
 @cindex asciz directive
 @cindex ascii directive
 
-All directives are preceeded by a '.'. The following directives are
+All directives are preceded by a '.'. The following directives are
 supported:
 
 @itemize
@@ -892,7 +892,7 @@ reverse order, a first pass is done to reverse the argument order.
 
 @section Types
 
-The types are stored in a single 'int' variable. It was choosen in the
+The types are stored in a single 'int' variable. It was chosen in the
 first stages of development when tcc was much simpler. Now, it may not
 be the best solution.
 
@@ -1017,7 +1017,7 @@ are used when bound checking is activated
 
 @item stab_section
 @itemx stabstr_section
-are used when debugging is actived to store debug information
+are used when debugging is activated to store debug information
 
 @item symtab_section
 @itemx strtab_section
diff --git a/tinyc/tccasm.c b/tinyc/tccasm.c
index 8834b53fb..9b5289f77 100644
--- a/tinyc/tccasm.c
+++ b/tinyc/tccasm.c
@@ -229,7 +229,7 @@ static inline void asm_expr_sum(TCCState *s1, ExprValue *pe)
                 } else {
                     goto cannot_relocate;
                 }
-                pe->sym = NULL; /* same symbols can be substracted to NULL */
+                pe->sym = NULL; /* same symbols can be subtracted to NULL */
             } else {
             cannot_relocate:
                 error("invalid operation with label");
diff --git a/tinyc/tccgen.c b/tinyc/tccgen.c
index 3135e7b37..a88f32819 100644
--- a/tinyc/tccgen.c
+++ b/tinyc/tccgen.c
@@ -1203,7 +1203,7 @@ static inline int is_integer_btype(int bt)
             bt == VT_INT || bt == VT_LLONG);
 }
 
-/* check types for comparison or substraction of pointers */
+/* check types for comparison or subtraction of pointers */
 static void check_comparison_pointer_types(SValue *p1, SValue *p2, int op)
 {
     CType *type1, *type2, tmp_type1, tmp_type2;
@@ -4686,7 +4686,7 @@ static void decl_initializer_alloc(CType *type, AttributeDef *ad, int r,
                 if (sym->type.t & VT_EXTERN) {
                     /* if the variable is extern, it was not allocated */
                     sym->type.t &= ~VT_EXTERN;
-                    /* set array size if it was ommited in extern
+                    /* set array size if it was omitted in extern
                        declaration */
                     if ((sym->type.t & VT_ARRAY) && 
                         sym->type.ref->c < 0 &&
diff --git a/tinyc/tcctok.h b/tinyc/tcctok.h
index 6dc477821..2be032fa4 100644
--- a/tinyc/tcctok.h
+++ b/tinyc/tcctok.h
@@ -422,7 +422,7 @@
  DEF_FP(mul)
 
  DEF_ASM(fcom)
- DEF_ASM(fcom_1) /* non existant op, just to have a regular table */
+ DEF_ASM(fcom_1) /* non existent op, just to have a regular table */
  DEF_FP1(com)
 
  DEF_FP(comp)
diff --git a/tinyc/win32/include/fcntl.h b/tinyc/win32/include/fcntl.h
index 32f4a90e8..d31bc84d5 100644
--- a/tinyc/win32/include/fcntl.h
+++ b/tinyc/win32/include/fcntl.h
@@ -50,7 +50,7 @@
 
 #define	_O_RANDOM	0x0010
 #define	_O_SEQUENTIAL	0x0020
-#define	_O_TEMPORARY	0x0040	/* Make the file dissappear after closing.
+#define	_O_TEMPORARY	0x0040	/* Make the file disappear after closing.
 				 * WARNING: Even if not created by _open! */
 #define	_O_NOINHERIT	0x0080
 
diff --git a/tools/nimgrep.nim b/tools/nimgrep.nim
index a38f2a88f..aeae86300 100644
--- a/tools/nimgrep.nim
+++ b/tools/nimgrep.nim
@@ -24,7 +24,7 @@ Options:
   --re                pattern is a regular expression (default); extended 
                       syntax for the regular expression is always turned on
   --recursive         process directories recursively
-  --confirm           confirm each occurence/replacement; there is a chance 
+  --confirm           confirm each occurrence/replacement; there is a chance 
                       to abort any time without touching the file
   --stdin             read pattern from stdin (to avoid the shell's confusing
                       quoting rules)
diff --git a/tools/nimrepl.nim b/tools/nimrepl.nim
index 0c9f94616..3d818a556 100644
--- a/tools/nimrepl.nim
+++ b/tools/nimrepl.nim
@@ -130,7 +130,7 @@ proc initControls() =
   
   pack_start(MainBox, TopMenu, False, False, 0)
 
-  # VPaned - Seperates the InputTextView and the OutputTextView
+  # VPaned - Separates the InputTextView and the OutputTextView
   var paned = vpaned_new()
   set_position(paned, 450)
   pack_start(MainBox, paned, True, True, 0)
diff --git a/web/news.txt b/web/news.txt
index 7ead5a70e..aa093be46 100644
--- a/web/news.txt
+++ b/web/news.txt
@@ -331,7 +331,7 @@ Library Additions
 The Nimrod development community is proud to announce the release of version
 0.9.4 of the Nimrod compiler and tools. **Note: This release has to be
 considered beta quality! Lots of new features have been implemented but
-unfortunately some do not fullfill our quality standards yet.**
+unfortunately some do not fulfill our quality standards yet.**
 
 Prebuilt binaries and instructions for building from source are available
 on the `download page <download.html>`_.
@@ -756,7 +756,7 @@ Changes affecting backwards compatibility
 - The default calling convention for a procedural **type** is now ``closure``,
   for procs it remains ``nimcall`` (which is compatible to ``closure``).
   Activate the warning ``ImplicitClosure`` to make the compiler list the 
-  occurances of proc types which are affected.
+  occurrences of proc types which are affected.
 - The Nimrod type system now distinguishes ``openarray`` from ``varargs``.
 - Templates are now ``hygienic``. Use the ``dirty`` pragma to get the old
   behaviour.
@@ -884,7 +884,7 @@ Language Additions
 ------------------
 
 - Added new ``is`` and ``of`` operators.
-- The built-in type ``void`` can be used to denote the absense of any type.
+- The built-in type ``void`` can be used to denote the absence of any type.
   This is useful in generic code.
 - Return types may be of the type ``var T`` to return an l-value.
 - The error pragma can now be used to mark symbols whose *usage* should trigger