Commit 749740f9 authored by Gabor Greif's avatar Gabor Greif

Typos in comments and manual

parent fb9ae288
...@@ -768,7 +768,7 @@ funSize dflags top_args fun n_val_args voids ...@@ -768,7 +768,7 @@ funSize dflags top_args fun n_val_args voids
res_discount | idArity fun > n_val_args = ufFunAppDiscount dflags res_discount | idArity fun > n_val_args = ufFunAppDiscount dflags
| otherwise = 0 | otherwise = 0
-- If the function is partially applied, show a result discount -- 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 :: DataCon -> Int -> ExprSize
conSize dc n_val_args conSize dc n_val_args
......
...@@ -799,7 +799,7 @@ to ...@@ -799,7 +799,7 @@ to
and float bx = I# (a /# 3), because the application of f no 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 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 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 same expression says False to exprIsCheap. Simplest way to
guarantee the let/app invariant is to use the same function! guarantee the let/app invariant is to use the same function!
......
...@@ -1869,7 +1869,7 @@ be huge. Here's an example (simplCore/should_compile/T7785) ...@@ -1869,7 +1869,7 @@ be huge. Here's an example (simplCore/should_compile/T7785)
foldr (mapFB c1 f) n xs)) foldr (mapFB c1 f) n xs))
= -- Use mapFB rule: mapFB (mapFB c f) g = mapFB c (f.g) = -- 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 map f (build (\cn. let c1 = mapFB c n in
foldr (mapFB c (f.f)) n x)) foldr (mapFB c (f.f)) n x))
......
...@@ -214,7 +214,7 @@ Consider a function whose most general type is ...@@ -214,7 +214,7 @@ Consider a function whose most general type is
f :: forall a b. Ord a => [a] -> b -> b 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 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 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 ain't much point in making separate versions of g for the different
b types. b types.
......
...@@ -737,7 +737,7 @@ GHC were typechecking the binding ...@@ -737,7 +737,7 @@ GHC were typechecking the binding
bar = $gdm bar bar = $gdm bar
it would it would
* skolemise the expected type of bar * 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 * build an implication constraint
[STEP DAC BUILD] [STEP DAC BUILD]
......
...@@ -320,7 +320,7 @@ tcLHsType ty = addTypeCtxt ty (tc_infer_lhs_type typeLevelMode ty) ...@@ -320,7 +320,7 @@ tcLHsType ty = addTypeCtxt ty (tc_infer_lhs_type typeLevelMode ty)
--------------------------- ---------------------------
-- | Should we generalise the kind of this type signature? -- | 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. -- or if NoMonoLocalBinds is set. Otherwise, nope.
decideKindGeneralisationPlan :: Type -> TcM Bool decideKindGeneralisationPlan :: Type -> TcM Bool
decideKindGeneralisationPlan ty decideKindGeneralisationPlan ty
......
...@@ -306,7 +306,7 @@ This might not necessarily show up in kind checking. ...@@ -306,7 +306,7 @@ This might not necessarily show up in kind checking.
checkValidType :: UserTypeCtxt -> Type -> TcM () checkValidType :: UserTypeCtxt -> Type -> TcM ()
-- Checks that a user-written type is valid for the given context -- 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 -- Not used for instance decls; checkValidInstance instead
checkValidType ctxt ty checkValidType ctxt ty
= do { traceTc "checkValidType" (ppr ty <+> text "::" <+> ppr (typeKind ty)) = do { traceTc "checkValidType" (ppr ty <+> text "::" <+> ppr (typeKind ty))
...@@ -365,7 +365,7 @@ checkValidType ctxt ty ...@@ -365,7 +365,7 @@ checkValidType ctxt ty
; traceTc "checkValidType done" (ppr ty <+> text "::" <+> ppr (typeKind ty)) } ; traceTc "checkValidType done" (ppr ty <+> text "::" <+> ppr (typeKind ty)) }
checkValidMonoType :: Type -> TcM () checkValidMonoType :: Type -> TcM ()
-- Assumes arguemt is fully zonked -- Assumes argument is fully zonked
checkValidMonoType ty checkValidMonoType ty
= do { env <- tcInitOpenTidyEnv (tyCoVarsOfTypeList ty) = do { env <- tcInitOpenTidyEnv (tyCoVarsOfTypeList ty)
; check_type env SigmaCtxt MustBeMonoType ty } ; check_type env SigmaCtxt MustBeMonoType ty }
......
...@@ -5104,8 +5104,8 @@ this case ``a``). More precisely, a constraint in a class method signature is r ...@@ -5104,8 +5104,8 @@ this case ``a``). More precisely, a constraint in a class method signature is r
class C a where class C a where
op3 :: Eq a => a -> a -- Rejected: constrains class variable only op3 :: Eq a => a -> a -- Rejected: constrains class variable only
op4 :: D 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 varible `b` op5 :: D (a,b) => a -> b -- Accepted: constrains a locally-quantified variable `b`
GHC lifts this restriction with language extension GHC lifts this restriction with language extension
...@@ -8866,7 +8866,7 @@ is ambiguous if and only if ``((undefined :: ty) :: ty)`` would fail to ...@@ -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 typecheck. We use a very similar test for *inferred* types, to ensure
that they too are unambiguous. 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 ambiguous type according the "guiding principle", it is possible that
the function is callable. For example: :: the function is callable. For example: ::
......
...@@ -117,7 +117,7 @@ f >=> g = \x -> f x >>= g ...@@ -117,7 +117,7 @@ f >=> g = \x -> f x >>= g
forever :: (Applicative f) => f a -> f b forever :: (Applicative f) => f a -> f b
{-# INLINE forever #-} {-# INLINE forever #-}
forever a = let a' = a *> a' in a' 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. -- optimizations.
-- ----------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
......
...@@ -1176,7 +1176,7 @@ class Generic1 (f :: k -> *) where ...@@ -1176,7 +1176,7 @@ class Generic1 (f :: k -> *) where
-- * In @MetaCons n f s@, @n@ is the constructor's name, @f@ is its fixity, -- * 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. -- 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 -- 'Just' the record name. Otherwise, @mn@ is 'Nothing'. @su@ and @ss@ are
-- the field's unpackedness and strictness annotations, and @ds@ is the -- the field's unpackedness and strictness annotations, and @ds@ is the
-- strictness that GHC infers for the field. -- strictness that GHC infers for the field.
......
...@@ -27,7 +27,7 @@ module Text.Printf( ...@@ -27,7 +27,7 @@ module Text.Printf(
-- --
-- | This 'printf' can be extended to format types -- | This 'printf' can be extended to format types
-- other than those provided for by default. This -- 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 -- a 'formatArg' for the type. It is possible to
-- provide a 'parseFormat' to process type-specific -- provide a 'parseFormat' to process type-specific
-- modifiers, but the default instance is usually -- modifiers, but the default instance is usually
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
-- dump the memory to disk and/or send it over the network. -- dump the memory to disk and/or send it over the network.
-- For applications that are not bandwidth bound (GHC's heap -- For applications that are not bandwidth bound (GHC's heap
-- representation can be as much of a x4 expansion over a -- 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@, -- For example, suppose you have a function @loadBigStruct :: IO BigStruct@,
-- which loads a large data structure from the file system. You can "compact" -- which loads a large data structure from the file system. You can "compact"
...@@ -106,7 +106,7 @@ import GHC.Types ...@@ -106,7 +106,7 @@ import GHC.Types
-- data, but it is perfomed only once. However, because -- data, but it is perfomed only once. However, because
-- "Data.Compact.compact" does not stop-the-world, retaining internal -- "Data.Compact.compact" does not stop-the-world, retaining internal
-- sharing during the compaction process is very costly. The user -- 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 -- 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 -- in the region using "Data.Compact.getCompact". The 'Compact' type
......
...@@ -63,7 +63,7 @@ Moreover, we want to make it CONLIKE, so that: ...@@ -63,7 +63,7 @@ Moreover, we want to make it CONLIKE, so that:
E.g. the eqString rule in PrelRules E.g. the eqString rule in PrelRules
eqString (unpackCString# (Lit s1)) (unpackCString# (Lit s2) = s1==s2 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"# let x = unpackCString# "foo"#
...(case x of algs)... ...(case x of algs)...
......
...@@ -909,7 +909,7 @@ test('T10370', ...@@ -909,7 +909,7 @@ test('T10370',
# were identical, so I think it's just GC noise. # were identical, so I think it's just GC noise.
# 2016-10-20 38221184 Allow top-level string literals. # 2016-10-20 38221184 Allow top-level string literals.
# See the comment 16 on #8472. # 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-27 43455848 Likely drift from recent simplifier improvements
# 2017-02-25 41291976 Early inline patch # 2017-02-25 41291976 Early inline patch
...@@ -922,7 +922,7 @@ test('T10370', ...@@ -922,7 +922,7 @@ test('T10370',
# 2016-04-14 101 final demand analyzer run # 2016-04-14 101 final demand analyzer run
# 2016-08-08 121 see above # 2016-08-08 121 see above
# 2017-01-18 146 Allow top-level string literals in Core # 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 # 2017-02-25 154 Early inline patch
(wordsize(32), 39, 15), (wordsize(32), 39, 15),
# 2015-10-22 39 # 2015-10-22 39
......
...@@ -13,4 +13,4 @@ f x = let x = "foo"# ...@@ -13,4 +13,4 @@ f x = let x = "foo"#
_ -> False _ -> False
) )
-- This case-expression should simplify -- This case-expression should simplify
-- yeilding a KnownBranch simplifier tick -- yielding a KnownBranch simplifier tick
...@@ -653,7 +653,7 @@ wanteds os = concat ...@@ -653,7 +653,7 @@ wanteds os = concat
,constantWord Haskell "MAX_Real_Long_REG" "MAX_REAL_LONG_REG" ,constantWord Haskell "MAX_Real_Long_REG" "MAX_REAL_LONG_REG"
-- This tells the native code generator the size of the spill -- 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" ,constantWord Haskell "RESERVED_C_STACK_BYTES" "RESERVED_C_STACK_BYTES"
-- The amount of (Haskell) stack to leave free for saving -- The amount of (Haskell) stack to leave free for saving
-- registers when returning to the scheduler. -- registers when returning to the scheduler.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment