diff options
author | Gabor Greif <ggreif@gmail.com> | 2017-03-06 16:55:42 +0100 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2017-03-06 16:55:42 +0100 |
commit | 749740f9c3cb25ee95e04a21c1ef73e1bf96afb1 (patch) | |
tree | c014979cef6e5f54378df7715b50548a95ef5ece | |
parent | fb9ae288088a3eabc4e1bb4e86fa473a3881d2e2 (diff) | |
download | haskell-749740f9c3cb25ee95e04a21c1ef73e1bf96afb1.tar.gz |
Typos in comments and manual
-rw-r--r-- | compiler/coreSyn/CoreUnfold.hs | 2 | ||||
-rw-r--r-- | compiler/simplCore/SetLevels.hs | 2 | ||||
-rw-r--r-- | compiler/simplCore/Simplify.hs | 2 | ||||
-rw-r--r-- | compiler/specialise/Specialise.hs | 2 | ||||
-rw-r--r-- | compiler/typecheck/TcDerivInfer.hs | 2 | ||||
-rw-r--r-- | compiler/typecheck/TcHsType.hs | 2 | ||||
-rw-r--r-- | compiler/typecheck/TcValidity.hs | 4 | ||||
-rw-r--r-- | docs/users_guide/glasgow_exts.rst | 6 | ||||
-rw-r--r-- | libraries/base/Control/Monad.hs | 2 | ||||
-rw-r--r-- | libraries/base/GHC/Generics.hs | 2 | ||||
-rw-r--r-- | libraries/base/Text/Printf.hs | 2 | ||||
-rw-r--r-- | libraries/ghc-compact/GHC/Compact.hs | 4 | ||||
-rw-r--r-- | libraries/ghc-prim/GHC/CString.hs | 2 | ||||
-rw-r--r-- | testsuite/tests/perf/compiler/all.T | 4 | ||||
-rw-r--r-- | testsuite/tests/simplCore/should_compile/T13317.hs | 2 | ||||
-rw-r--r-- | utils/deriveConstants/Main.hs | 2 |
16 files changed, 21 insertions, 21 deletions
diff --git a/compiler/coreSyn/CoreUnfold.hs b/compiler/coreSyn/CoreUnfold.hs index 5844eb999a..3a46d58089 100644 --- a/compiler/coreSyn/CoreUnfold.hs +++ b/compiler/coreSyn/CoreUnfold.hs @@ -768,7 +768,7 @@ funSize dflags top_args fun n_val_args voids res_discount | idArity fun > n_val_args = ufFunAppDiscount dflags | otherwise = 0 -- If the function is partially applied, show a result discount --- XXX maybe behave like ConSize for eval'd varaible +-- XXX maybe behave like ConSize for eval'd variable conSize :: DataCon -> Int -> ExprSize conSize dc n_val_args diff --git a/compiler/simplCore/SetLevels.hs b/compiler/simplCore/SetLevels.hs index 25ee1b5ff5..2976895ced 100644 --- a/compiler/simplCore/SetLevels.hs +++ b/compiler/simplCore/SetLevels.hs @@ -799,7 +799,7 @@ to and float bx = I# (a /# 3), because the application of f no longer obeys the let/app invariant. But (a /# 3) is ok-for-spec due to a special hack that says division operators can't fail -when the denominator is definitely no-zero. And yet that +when the denominator is definitely non-zero. And yet that same expression says False to exprIsCheap. Simplest way to guarantee the let/app invariant is to use the same function! diff --git a/compiler/simplCore/Simplify.hs b/compiler/simplCore/Simplify.hs index df77742bc4..969fb3ee05 100644 --- a/compiler/simplCore/Simplify.hs +++ b/compiler/simplCore/Simplify.hs @@ -1869,7 +1869,7 @@ be huge. Here's an example (simplCore/should_compile/T7785) foldr (mapFB c1 f) n xs)) = -- Use mapFB rule: mapFB (mapFB c f) g = mapFB c (f.g) - -- We can do this becuase (mapFB c n) is a PAP and hence expandable + -- We can do this because (mapFB c n) is a PAP and hence expandable map f (build (\cn. let c1 = mapFB c n in foldr (mapFB c (f.f)) n x)) diff --git a/compiler/specialise/Specialise.hs b/compiler/specialise/Specialise.hs index 4419643221..bd1c7aecf0 100644 --- a/compiler/specialise/Specialise.hs +++ b/compiler/specialise/Specialise.hs @@ -214,7 +214,7 @@ Consider a function whose most general type is f :: forall a b. Ord a => [a] -> b -> b There is really no point in making a version of g at Int/Int and another -at Int/Bool, because it's only instancing the type variable "a" which +at Int/Bool, because it's only instantiating the type variable "a" which buys us any efficiency. Since g is completely polymorphic in b there ain't much point in making separate versions of g for the different b types. diff --git a/compiler/typecheck/TcDerivInfer.hs b/compiler/typecheck/TcDerivInfer.hs index e0d46ddc15..4ac074155f 100644 --- a/compiler/typecheck/TcDerivInfer.hs +++ b/compiler/typecheck/TcDerivInfer.hs @@ -737,7 +737,7 @@ GHC were typechecking the binding bar = $gdm bar it would * skolemise the expected type of bar - * instantiate the type of $dm_bar with meta-type varibles + * instantiate the type of $dm_bar with meta-type variables * build an implication constraint [STEP DAC BUILD] diff --git a/compiler/typecheck/TcHsType.hs b/compiler/typecheck/TcHsType.hs index ef8d84c5cd..5ccca77aa6 100644 --- a/compiler/typecheck/TcHsType.hs +++ b/compiler/typecheck/TcHsType.hs @@ -320,7 +320,7 @@ tcLHsType ty = addTypeCtxt ty (tc_infer_lhs_type typeLevelMode ty) --------------------------- -- | Should we generalise the kind of this type signature? --- We *should* generalise if the type is mentions no scoped type variables +-- We *should* generalise if the type mentions no scoped type variables -- or if NoMonoLocalBinds is set. Otherwise, nope. decideKindGeneralisationPlan :: Type -> TcM Bool decideKindGeneralisationPlan ty diff --git a/compiler/typecheck/TcValidity.hs b/compiler/typecheck/TcValidity.hs index 12d4158005..725f9dcd48 100644 --- a/compiler/typecheck/TcValidity.hs +++ b/compiler/typecheck/TcValidity.hs @@ -306,7 +306,7 @@ This might not necessarily show up in kind checking. checkValidType :: UserTypeCtxt -> Type -> TcM () -- Checks that a user-written type is valid for the given context --- Assumes arguemt is fully zonked +-- Assumes argument is fully zonked -- Not used for instance decls; checkValidInstance instead checkValidType ctxt ty = do { traceTc "checkValidType" (ppr ty <+> text "::" <+> ppr (typeKind ty)) @@ -365,7 +365,7 @@ checkValidType ctxt ty ; traceTc "checkValidType done" (ppr ty <+> text "::" <+> ppr (typeKind ty)) } checkValidMonoType :: Type -> TcM () --- Assumes arguemt is fully zonked +-- Assumes argument is fully zonked checkValidMonoType ty = do { env <- tcInitOpenTidyEnv (tyCoVarsOfTypeList ty) ; check_type env SigmaCtxt MustBeMonoType ty } diff --git a/docs/users_guide/glasgow_exts.rst b/docs/users_guide/glasgow_exts.rst index 3e6e50cb2e..3366705dd3 100644 --- a/docs/users_guide/glasgow_exts.rst +++ b/docs/users_guide/glasgow_exts.rst @@ -5104,8 +5104,8 @@ this case ``a``). More precisely, a constraint in a class method signature is r class C a where op3 :: Eq a => a -> a -- Rejected: constrains class variable only - op4 :: D b => a -> b -- Accepted: constrains a locally-quantified varible `b` - op5 :: D (a,b) => a -> b -- Accepted: constrains a locally-quantified varible `b` + op4 :: D b => a -> b -- Accepted: constrains a locally-quantified variable `b` + op5 :: D (a,b) => a -> b -- Accepted: constrains a locally-quantified variable `b` GHC lifts this restriction with language extension @@ -8866,7 +8866,7 @@ is ambiguous if and only if ``((undefined :: ty) :: ty)`` would fail to typecheck. We use a very similar test for *inferred* types, to ensure that they too are unambiguous. -*Switching off the ambiguity check.* Even if a function is has an +*Switching off the ambiguity check.* Even if a function has an ambiguous type according the "guiding principle", it is possible that the function is callable. For example: :: diff --git a/libraries/base/Control/Monad.hs b/libraries/base/Control/Monad.hs index 131cc2800f..6a474037c0 100644 --- a/libraries/base/Control/Monad.hs +++ b/libraries/base/Control/Monad.hs @@ -117,7 +117,7 @@ f >=> g = \x -> f x >>= g forever :: (Applicative f) => f a -> f b {-# INLINE forever #-} forever a = let a' = a *> a' in a' --- Use explicit sharing here, as it is prevents a space leak regardless of +-- Use explicit sharing here, as it prevents a space leak regardless of -- optimizations. -- ----------------------------------------------------------------------------- diff --git a/libraries/base/GHC/Generics.hs b/libraries/base/GHC/Generics.hs index 4282b7c83b..cc85a1dfba 100644 --- a/libraries/base/GHC/Generics.hs +++ b/libraries/base/GHC/Generics.hs @@ -1176,7 +1176,7 @@ class Generic1 (f :: k -> *) where -- * In @MetaCons n f s@, @n@ is the constructor's name, @f@ is its fixity, -- and @s@ is @'True@ if the constructor contains record selectors. -- --- * In @MetaSel mn su ss ds@, if the field is uses record syntax, then @mn@ is +-- * In @MetaSel mn su ss ds@, if the field uses record syntax, then @mn@ is -- 'Just' the record name. Otherwise, @mn@ is 'Nothing'. @su@ and @ss@ are -- the field's unpackedness and strictness annotations, and @ds@ is the -- strictness that GHC infers for the field. diff --git a/libraries/base/Text/Printf.hs b/libraries/base/Text/Printf.hs index 7902d5eedc..0914aa7b5c 100644 --- a/libraries/base/Text/Printf.hs +++ b/libraries/base/Text/Printf.hs @@ -27,7 +27,7 @@ module Text.Printf( -- -- | This 'printf' can be extended to format types -- other than those provided for by default. This --- is done by instancing 'PrintfArg' and providing +-- is done by instantiating 'PrintfArg' and providing -- a 'formatArg' for the type. It is possible to -- provide a 'parseFormat' to process type-specific -- modifiers, but the default instance is usually diff --git a/libraries/ghc-compact/GHC/Compact.hs b/libraries/ghc-compact/GHC/Compact.hs index e3efaf24bc..d9581a521e 100644 --- a/libraries/ghc-compact/GHC/Compact.hs +++ b/libraries/ghc-compact/GHC/Compact.hs @@ -30,7 +30,7 @@ -- dump the memory to disk and/or send it over the network. -- For applications that are not bandwidth bound (GHC's heap -- representation can be as much of a x4 expansion over a --- binary serialization), this can lead to substantial speed ups. +-- binary serialization), this can lead to substantial speedups. -- -- For example, suppose you have a function @loadBigStruct :: IO BigStruct@, -- which loads a large data structure from the file system. You can "compact" @@ -106,7 +106,7 @@ import GHC.Types -- data, but it is perfomed only once. However, because -- "Data.Compact.compact" does not stop-the-world, retaining internal -- sharing during the compaction process is very costly. The user --- can choose wether to 'compact' or 'compactWithSharing'. +-- can choose whether to 'compact' or 'compactWithSharing'. -- -- When you have a @'Compact' a@, you can get a pointer to the actual object -- in the region using "Data.Compact.getCompact". The 'Compact' type diff --git a/libraries/ghc-prim/GHC/CString.hs b/libraries/ghc-prim/GHC/CString.hs index 2adb13d8a0..cdda2db3ab 100644 --- a/libraries/ghc-prim/GHC/CString.hs +++ b/libraries/ghc-prim/GHC/CString.hs @@ -63,7 +63,7 @@ Moreover, we want to make it CONLIKE, so that: E.g. the eqString rule in PrelRules eqString (unpackCString# (Lit s1)) (unpackCString# (Lit s2) = s1==s2 -* exprIsConApp_maybe will see the string when we ahve +* exprIsConApp_maybe will see the string when we have let x = unpackCString# "foo"# ...(case x of algs)... diff --git a/testsuite/tests/perf/compiler/all.T b/testsuite/tests/perf/compiler/all.T index 5a87bd5632..5a7614b16a 100644 --- a/testsuite/tests/perf/compiler/all.T +++ b/testsuite/tests/perf/compiler/all.T @@ -909,7 +909,7 @@ test('T10370', # were identical, so I think it's just GC noise. # 2016-10-20 38221184 Allow top-level string literals. # See the comment 16 on #8472. - # 2017-02-17 51126304 Type-indexed Typeawble + # 2017-02-17 51126304 Type-indexed Typeable # 2017-02-27 43455848 Likely drift from recent simplifier improvements # 2017-02-25 41291976 Early inline patch @@ -922,7 +922,7 @@ test('T10370', # 2016-04-14 101 final demand analyzer run # 2016-08-08 121 see above # 2017-01-18 146 Allow top-level string literals in Core - # 2017-02-17 187 Type-indexed Typeawble + # 2017-02-17 187 Type-indexed Typeable # 2017-02-25 154 Early inline patch (wordsize(32), 39, 15), # 2015-10-22 39 diff --git a/testsuite/tests/simplCore/should_compile/T13317.hs b/testsuite/tests/simplCore/should_compile/T13317.hs index 510d0d4c73..e2d89b92da 100644 --- a/testsuite/tests/simplCore/should_compile/T13317.hs +++ b/testsuite/tests/simplCore/should_compile/T13317.hs @@ -13,4 +13,4 @@ f x = let x = "foo"# _ -> False ) -- This case-expression should simplify --- yeilding a KnownBranch simplifier tick +-- yielding a KnownBranch simplifier tick diff --git a/utils/deriveConstants/Main.hs b/utils/deriveConstants/Main.hs index c03af4f958..e5f14e1eab 100644 --- a/utils/deriveConstants/Main.hs +++ b/utils/deriveConstants/Main.hs @@ -653,7 +653,7 @@ wanteds os = concat ,constantWord Haskell "MAX_Real_Long_REG" "MAX_REAL_LONG_REG" -- This tells the native code generator the size of the spill - -- area is has available. + -- area it has available. ,constantWord Haskell "RESERVED_C_STACK_BYTES" "RESERVED_C_STACK_BYTES" -- The amount of (Haskell) stack to leave free for saving -- registers when returning to the scheduler. |