diff options
author | Gabor Greif <ggreif@gmail.com> | 2018-06-18 14:22:54 +0200 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2018-06-18 14:41:54 +0200 |
commit | 6ac8a72f7a044f44734a0270487c3bb6fb186d53 (patch) | |
tree | 615d72e490c418f79f4fb18d1453412394247af2 | |
parent | 30b029bea9abe1f5f2855d9e7f0ae26a18cf049b (diff) | |
download | haskell-6ac8a72f7a044f44734a0270487c3bb6fb186d53.tar.gz |
Typofixes in docs and comments [ci skip]
24 files changed, 31 insertions, 31 deletions
diff --git a/compiler/basicTypes/MkId.hs b/compiler/basicTypes/MkId.hs index f68a28d510..772bce47cc 100644 --- a/compiler/basicTypes/MkId.hs +++ b/compiler/basicTypes/MkId.hs @@ -124,7 +124,7 @@ Note [magicIds] ~~~~~~~~~~~~~~~ The magicIds - * Are expotted from GHC.Maic + * Are exported from GHC.Maic * Can be defined in Haskell (and are, in ghc-prim:GHC/Magic.hs). This definition at least generates Haddock documentation for them. diff --git a/compiler/coreSyn/CoreLint.hs b/compiler/coreSyn/CoreLint.hs index 90095ad7b3..fb421a10cc 100644 --- a/compiler/coreSyn/CoreLint.hs +++ b/compiler/coreSyn/CoreLint.hs @@ -1384,7 +1384,7 @@ Consider (Trac #14939) f :: forall (cls :: * -> Constraint) (b :: Alg cls *). b Here 'cls' appears free in b's kind, which would usually be illegal -(becuase in (forall a. ty), ty's kind should not mention 'a'). But +(because in (forall a. ty), ty's kind should not mention 'a'). But #in this case (Alg cls *) = *, so all is well. Currently we allow this, and make Lint expand synonyms where necessary to make it so. diff --git a/compiler/coreSyn/CoreSyn.hs b/compiler/coreSyn/CoreSyn.hs index 50e40d1531..678c5e1619 100644 --- a/compiler/coreSyn/CoreSyn.hs +++ b/compiler/coreSyn/CoreSyn.hs @@ -757,7 +757,7 @@ transformation universally. This transformation would do: but that is ill-typed, as `x` is type `a`, not `Bool`. -This is also justifies why we do not consider the `e` in `e |> co` to be in +This also justifies why we do not consider the `e` in `e |> co` to be in tail position: A cast changes the type, but the type must be the same. But operationally, casts are vacuous, so this is a bit unfortunate! See #14610 for ideas how to fix this. diff --git a/compiler/iface/BinIface.hs b/compiler/iface/BinIface.hs index b8b4bb0370..4e226854d6 100644 --- a/compiler/iface/BinIface.hs +++ b/compiler/iface/BinIface.hs @@ -208,7 +208,7 @@ putWithUserData log_action bh payload = do -- Remember where the symbol table pointer will go symtab_p_p <- tellBin bh put_ bh symtab_p_p - -- Make some intial state + -- Make some initial state symtab_next <- newFastMutInt writeFastMutInt symtab_next 0 symtab_map <- newIORef emptyUFM diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index fa210dcce9..77a6185e4c 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -880,7 +880,7 @@ data DynFlags = DynFlags { floatLamArgs :: Maybe Int, -- ^ Arg count for lambda floating -- See CoreMonad.FloatOutSwitches - cmmProcAlignment :: Maybe Int, -- ^ Align Cmm functions at this boundry or use default. + cmmProcAlignment :: Maybe Int, -- ^ Align Cmm functions at this boundary or use default. historySize :: Int, -- ^ Simplification history size diff --git a/compiler/main/TidyPgm.hs b/compiler/main/TidyPgm.hs index f98e65e471..b67ade25dc 100644 --- a/compiler/main/TidyPgm.hs +++ b/compiler/main/TidyPgm.hs @@ -612,7 +612,7 @@ chooseExternalIds hsc_env mod omit_prags expose_all binds implicit_binds imp_id_ where nc_var = hsc_NC hsc_env - -- init_ext_ids is the intial list of Ids that should be + -- init_ext_ids is the initial list of Ids that should be -- externalised. It serves as the starting point for finding a -- deterministic, tidy, renaming for all external Ids in this -- module. diff --git a/compiler/rename/RnSource.hs b/compiler/rename/RnSource.hs index 50841af818..98f8005381 100644 --- a/compiler/rename/RnSource.hs +++ b/compiler/rename/RnSource.hs @@ -392,7 +392,7 @@ rnHsForeignDecl (XForeignDecl _) = panic "rnHsForeignDecl" -- | For Windows DLLs we need to know what packages imported symbols are from -- to generate correct calls. Imported symbols are tagged with the current --- package, so if they get inlined across a package boundry we'll still +-- package, so if they get inlined across a package boundary we'll still -- know where they're from. -- patchForeignImport :: UnitId -> ForeignImport -> ForeignImport diff --git a/compiler/simplCore/SimplUtils.hs b/compiler/simplCore/SimplUtils.hs index 3b16628732..e5d9d33899 100644 --- a/compiler/simplCore/SimplUtils.hs +++ b/compiler/simplCore/SimplUtils.hs @@ -1088,7 +1088,7 @@ spectral/mandel/Mandel.hs, where the mandelset function gets a useful let-float if you inline windowToViewport However, as usual for Gentle mode, do not inline things that are -inactive in the intial stages. See Note [Gentle mode]. +inactive in the initial stages. See Note [Gentle mode]. Note [Stable unfoldings and preInlineUnconditionally] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -2231,7 +2231,7 @@ mkCase3 _dflags scrut bndr alts_ty alts = return (Case scrut bndr alts_ty alts) -- See Note [Exitification] and Note [Do not inline exit join points] in Exitify.hs --- This lives here (and not in Id) becuase occurrence info is only valid on +-- This lives here (and not in Id) because occurrence info is only valid on -- InIds, so it's crucial that isExitJoinId is only called on freshly -- occ-analysed code. It's not a generic function you can call anywhere. isExitJoinId :: Var -> Bool diff --git a/compiler/specialise/Rules.hs b/compiler/specialise/Rules.hs index 8b15c819b6..3380d02f99 100644 --- a/compiler/specialise/Rules.hs +++ b/compiler/specialise/Rules.hs @@ -678,7 +678,7 @@ obscure way in Trac #14777. Problem was that during matching we look up target-term variables in the in-scope set (see Note [Lookup in-scope]). If a target-term variable happens to name-clash with a template variable, that lookup will find the template variable, which -is /uttterly/ bogus. In Trac #14777, this transformed a term variable +is /utterly/ bogus. In Trac #14777, this transformed a term variable into a type variable, and then crashed when we wanted its idInfo. ------ End of historical note ------- diff --git a/compiler/typecheck/TcDerivInfer.hs b/compiler/typecheck/TcDerivInfer.hs index d6c379ad74..4489d4547b 100644 --- a/compiler/typecheck/TcDerivInfer.hs +++ b/compiler/typecheck/TcDerivInfer.hs @@ -398,7 +398,7 @@ We have some special hacks to support things like data T = MkT Int# deriving ( Show ) Specifically, we use TcGenDeriv.box to box the Int# into an Int -(which we know how to show), and append a '#'. Parenthesis are not required +(which we know how to show), and append a '#'. Parentheses are not required for unboxed values (`MkT -3#` is a valid expression). Note [Superclasses of derived instance] diff --git a/compiler/typecheck/TcExpr.hs b/compiler/typecheck/TcExpr.hs index 5d08389ec8..a4a005c561 100644 --- a/compiler/typecheck/TcExpr.hs +++ b/compiler/typecheck/TcExpr.hs @@ -1103,7 +1103,7 @@ data HsArg tm ty {- Note [HsArgPar] A HsArgPar indicates that everything to the left of this in the argument list is -enclosed in parenthesis together with the function itself. It is necessary so +enclosed in parentheses together with the function itself. It is necessary so that we can recreate the parenthesis structure in the original source after typechecking the arguments. diff --git a/compiler/typecheck/TcHsType.hs b/compiler/typecheck/TcHsType.hs index 90fa869f1c..c590f0ab44 100644 --- a/compiler/typecheck/TcHsType.hs +++ b/compiler/typecheck/TcHsType.hs @@ -588,7 +588,7 @@ tc_infer_hs_type mode (HsOpTy _ lhs lhs_op@(L _ hs_op) rhs) tc_infer_hs_type mode (HsKindSig _ ty sig) = do { sig' <- tcLHsKindSig KindSigCtxt sig - -- We must typeckeck the kind signature, and solve all + -- We must typecheck the kind signature, and solve all -- its equalities etc; from this point on we may do -- things like instantiate its foralls, so it needs -- to be fully determined (Trac #149904) diff --git a/compiler/typecheck/TcRnTypes.hs b/compiler/typecheck/TcRnTypes.hs index d91b5e9e78..d54d71f07f 100644 --- a/compiler/typecheck/TcRnTypes.hs +++ b/compiler/typecheck/TcRnTypes.hs @@ -1763,7 +1763,7 @@ Example 1: (c Int), where c :: * -> Constraint. We can't do anything Example 2: a ~ b, where a :: *, b :: k, where k is a kind variable We don't want to use this to substitute 'b' for 'a', in case - 'k' is subequently unifed with (say) *->*, because then + 'k' is subsequently unifed with (say) *->*, because then we'd have ill-kinded types floating about. Rather we want to defer using the equality altogether until 'k' get resolved. diff --git a/compiler/typecheck/TcSimplify.hs b/compiler/typecheck/TcSimplify.hs index 6e44471a21..0514acd78e 100644 --- a/compiler/typecheck/TcSimplify.hs +++ b/compiler/typecheck/TcSimplify.hs @@ -893,7 +893,7 @@ decideQuantification infer_mode rhs_tclvl name_taus psigs candidates ; psig_theta <- TcM.zonkTcTypes (concatMap sig_inst_theta psigs) ; let quantifiable_candidates = pickQuantifiablePreds (mkVarSet qtvs) candidates - -- NB: do /not/ run pickQuantifieablePreds over psig_theta, + -- NB: do /not/ run pickQuantifiablePreds over psig_theta, -- because we always want to quantify over psig_theta, and not -- drop any of them; e.g. CallStack constraints. c.f Trac #14658 diff --git a/compiler/typecheck/TcTyClsDecls.hs b/compiler/typecheck/TcTyClsDecls.hs index b90f1be1f9..d747fb1960 100644 --- a/compiler/typecheck/TcTyClsDecls.hs +++ b/compiler/typecheck/TcTyClsDecls.hs @@ -421,7 +421,7 @@ We do the following steps: error if B is used in any of the kinds needed to initialse B's kind (e.g. (a :: Type)) here - - Extend the type env with these intial kinds (monomorphic for + - Extend the type env with these initial kinds (monomorphic for decls that lack a CUSK) B :-> TcTyCon <initial kind> (thereby overriding the B :-> TyConPE binding) diff --git a/compiler/types/TyCon.hs b/compiler/types/TyCon.hs index 2d9e53060f..3f91e77065 100644 --- a/compiler/types/TyCon.hs +++ b/compiler/types/TyCon.hs @@ -2552,7 +2552,7 @@ data RecTcChecker = RC !Int (NameEnv Int) -- we have encountered each TyCon initRecTc :: RecTcChecker --- Intialise with a fixed max bound of 100 +-- Initialise with a fixed max bound of 100 -- We should probably have a flag for this initRecTc = RC 100 emptyNameEnv diff --git a/compiler/types/Unify.hs b/compiler/types/Unify.hs index 8f69172d04..94ee3f8657 100644 --- a/compiler/types/Unify.hs +++ b/compiler/types/Unify.hs @@ -595,7 +595,7 @@ So, we work as follows: [ b :: *, z :: a, rest :: G a z ] 6. Apply the substitution left-to-right to the kinds of these - tyvars, extendinng it each time with a new binding, so we + tyvars, extending it each time with a new binding, so we finish up with [ xs :-> ..as before.. , a :-> ..as before.. @@ -604,10 +604,10 @@ So, we work as follows: , rest :-> rest :: G a (z :: b) ] Note that rest now has the right kind - 7. Apply this extended substution (once) to the range of - the /original/ substituion. (Note that we do the + 7. Apply this extended substitution (once) to the range of + the /original/ substitution. (Note that we do the extended substitution would go on forever if you tried - to find its fixpoint, becuase it maps z to z.) + to find its fixpoint, because it maps z to z.) 8. And go back to step 1 diff --git a/docs/users_guide/debug-info.rst b/docs/users_guide/debug-info.rst index 9a3a67131f..ecda4afc6c 100644 --- a/docs/users_guide/debug-info.rst +++ b/docs/users_guide/debug-info.rst @@ -9,7 +9,7 @@ useable by most UNIX debugging tools. -g⟨n⟩ :shortdesc: Produce DWARF debug information in compiled object files. ⟨n⟩ can be 0, 1, or 2, with higher numbers producing richer - output. If ⟨n⟩ is omitted level 2 is assumed. + output. If ⟨n⟩ is omitted, level 2 is assumed. :type: dynamic :category: debugging @@ -18,7 +18,7 @@ useable by most UNIX debugging tools. Emit debug information in object code. Currently only DWARF debug information is supported on x86-64 and i386. Currently debug levels 0 through 3 are accepted, with 0 disabling debug information production - and higher numbers producing richer output. If ⟨n⟩ is omitted level 2 + and higher numbers producing richer output. If ⟨n⟩ is omitted, level 2 is assumed. diff --git a/docs/users_guide/debugging.rst b/docs/users_guide/debugging.rst index de69db8128..8cd7fd9840 100644 --- a/docs/users_guide/debugging.rst +++ b/docs/users_guide/debugging.rst @@ -384,7 +384,7 @@ These flags dump various phases of GHC's C-\\- pipeline. file parsing. Cmm dumps don't include unreachable blocks since we print - blocks in reverse post order. + blocks in reverse post-order. .. ghc-flag:: -ddump-cmm-from-stg :shortdesc: Dump STG-to-C-\\- output @@ -763,7 +763,7 @@ Checking for consistency useful when finding pointer tagging issues. .. ghc-flag:: -fproc-alignment - :shortdesc: Align functions at given boundry. + :shortdesc: Align functions at given boundary. :type: dynamic Align functions to multiples of the given value. Only valid values are powers diff --git a/docs/users_guide/extending_ghc.rst b/docs/users_guide/extending_ghc.rst index 91034e60e4..3cceead1f4 100644 --- a/docs/users_guide/extending_ghc.rst +++ b/docs/users_guide/extending_ghc.rst @@ -605,7 +605,7 @@ to segfaults or other runtime misbehaviour. Source plugins ~~~~~~~~~~~~~~ -In additional to core and type checker plugins, you can install plugins that can +In addition to core and type checker plugins, you can install plugins that can access different representations of the source code. The main purpose of these plugins is to make it easier to implement development tools. diff --git a/libraries/base/Data/Monoid.hs b/libraries/base/Data/Monoid.hs index f613a06c54..29b5ddb1a1 100644 --- a/libraries/base/Data/Monoid.hs +++ b/libraries/base/Data/Monoid.hs @@ -99,7 +99,7 @@ import Data.Semigroup.Internal -- -- > Data.Monoid.First x === Maybe (Data.Semigroup.First x) -- --- In additional to being equivalent in the structural sense, the two +-- In addition to being equivalent in the structural sense, the two -- also have 'Monoid' instances that behave the same. This type will -- be marked deprecated in GHC 8.8, and removed in GHC 8.10. -- Users are advised to use the variant from "Data.Semigroup" and wrap @@ -138,7 +138,7 @@ instance Monoid (First a) where -- -- > Data.Monoid.Last x === Maybe (Data.Semigroup.Last x) -- --- In additional to being equivalent in the structural sense, the two +-- In addition to being equivalent in the structural sense, the two -- also have 'Monoid' instances that behave the same. This type will -- be marked deprecated in GHC 8.8, and removed in GHC 8.10. -- Users are advised to use the variant from "Data.Semigroup" and wrap diff --git a/testsuite/tests/simplCore/should_run/T13429a.hs b/testsuite/tests/simplCore/should_run/T13429a.hs index 718f26520a..1c394888d6 100644 --- a/testsuite/tests/simplCore/should_run/T13429a.hs +++ b/testsuite/tests/simplCore/should_run/T13429a.hs @@ -3,7 +3,7 @@ {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE UndecidableInstances #-} -module T13429a where -- Orignally FingerTree.hs from the ticket +module T13429a where -- Originally FingerTree.hs from the ticket import Data.Semigroup (Semigroup(..)) diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T index d14e416e0d..10295f5edc 100644 --- a/testsuite/tests/typecheck/should_compile/all.T +++ b/testsuite/tests/typecheck/should_compile/all.T @@ -627,7 +627,7 @@ test('T13833', normal, compile, ['']) def onlyHsParLocs(x): """ - We only want to check that all the parenthesis are present with the correct location, + We only want to check that all the parentheses are present with the correct location, not compare the entire typechecked AST. Located (HsPar GhcTc) are pretty printed with the form ({ <location info> diff --git a/utils/llvm-targets/gen-data-layout.sh b/utils/llvm-targets/gen-data-layout.sh index 7b5f9e354b..ab036a98c4 100755 --- a/utils/llvm-targets/gen-data-layout.sh +++ b/utils/llvm-targets/gen-data-layout.sh @@ -78,7 +78,7 @@ FILE=_____dummy.c touch $FILE for target in "${TARGETS[@]}"; do - # find the cpu and attributes emitte by clang for the given $target + # find the cpu and attributes emitted by clang for the given $target CPU="" ATTR=() args=$(clang --target=$target -S $FILE -o /dev/null -v 2>&1 |grep $FILE) |