Commit c6b04865 authored by Gabor Greif's avatar Gabor Greif 💬

Typos in manual, comments and tests

parent f9df77e4
...@@ -1316,7 +1316,7 @@ allLazyNested is_rec (Floats IfUnboxedOk _) = isNonRec is_rec ...@@ -1316,7 +1316,7 @@ allLazyNested is_rec (Floats IfUnboxedOk _) = isNonRec is_rec
-- x = lazy @ (forall a. a) y @ Bool -- x = lazy @ (forall a. a) y @ Bool
-- --
-- When we inline 'x' after eliminating 'lazy', we need to replace -- When we inline 'x' after eliminating 'lazy', we need to replace
-- occurences of 'x' with 'y @ bool', not just 'y'. Situations like -- occurrences of 'x' with 'y @ bool', not just 'y'. Situations like
-- this can easily arise with higher-rank types; thus, cpe_env must -- this can easily arise with higher-rank types; thus, cpe_env must
-- map to CoreExprs, not Ids. -- map to CoreExprs, not Ids.
......
...@@ -557,7 +557,7 @@ data Tickish id = ...@@ -557,7 +557,7 @@ data Tickish id =
-- valid. Note that it is still undesirable though, as this reduces -- valid. Note that it is still undesirable though, as this reduces
-- their usefulness for debugging and profiling. Therefore we will -- their usefulness for debugging and profiling. Therefore we will
-- generally try only to make use of this property where it is -- generally try only to make use of this property where it is
-- neccessary to enable optimizations. -- necessary to enable optimizations.
| SourceNote | SourceNote
{ sourceSpan :: RealSrcSpan -- ^ Source covered { sourceSpan :: RealSrcSpan -- ^ Source covered
, sourceName :: String -- ^ Name for source location , sourceName :: String -- ^ Name for source location
......
...@@ -591,7 +591,7 @@ filterAlts _tycon inst_tys imposs_cons alts ...@@ -591,7 +591,7 @@ filterAlts _tycon inst_tys imposs_cons alts
impossible_alt _ _ = False impossible_alt _ _ = False
refineDefaultAlt :: [Unique] -> TyCon -> [Type] refineDefaultAlt :: [Unique] -> TyCon -> [Type]
-> [AltCon] -- Constructors tha cannot match the DEFAULT (if any) -> [AltCon] -- Constructors that cannot match the DEFAULT (if any)
-> [CoreAlt] -> [CoreAlt]
-> (Bool, [CoreAlt]) -> (Bool, [CoreAlt])
-- Refine the default alterantive to a DataAlt, -- Refine the default alterantive to a DataAlt,
......
...@@ -271,7 +271,7 @@ mergeIfaceDecls = plusOccEnv_C mergeIfaceDecl ...@@ -271,7 +271,7 @@ mergeIfaceDecls = plusOccEnv_C mergeIfaceDecl
-- (a) need a stronger acyclicity check which considers *all* -- (a) need a stronger acyclicity check which considers *all*
-- possible choices from a merge, or (b) we must find a selection -- possible choices from a merge, or (b) we must find a selection
-- of declarations which is acyclic, and show that this is always -- of declarations which is acyclic, and show that this is always
-- the "best" choice we could have made (ezyang conjecture's this -- the "best" choice we could have made (ezyang conjectures this
-- is the case but does not have a proof). For now this is -- is the case but does not have a proof). For now this is
-- not implemented. -- not implemented.
-- --
......
...@@ -137,7 +137,7 @@ ppLlvmFunction fun = ...@@ -137,7 +137,7 @@ ppLlvmFunction fun =
$+$ newLine $+$ newLine
$+$ newLine $+$ newLine
-- | Print out a function defenition header. -- | Print out a function definition header.
ppLlvmFunctionHeader :: LlvmFunctionDecl -> [LMString] -> SDoc ppLlvmFunctionHeader :: LlvmFunctionDecl -> [LMString] -> SDoc
ppLlvmFunctionHeader (LlvmFunctionDecl n l c r varg p a) args ppLlvmFunctionHeader (LlvmFunctionDecl n l c r varg p a) args
= let varg' = case varg of = let varg' = case varg of
......
...@@ -1530,7 +1530,7 @@ extractHsTyRdrTyVars :: LHsType RdrName -> RnM FreeKiTyVars ...@@ -1530,7 +1530,7 @@ extractHsTyRdrTyVars :: LHsType RdrName -> RnM FreeKiTyVars
-- It's used when making the for-alls explicit. -- It's used when making the for-alls explicit.
-- Does not return any wildcards -- Does not return any wildcards
-- When the same name occurs multiple times in the types, only the first -- When the same name occurs multiple times in the types, only the first
-- occurence is returned. -- occurrence is returned.
-- See Note [Kind and type-variable binders] -- See Note [Kind and type-variable binders]
extractHsTyRdrTyVars ty extractHsTyRdrTyVars ty
= do { FKTV kis k_set tys t_set all <- extract_lty TypeLevel ty emptyFKTV = do { FKTV kis k_set tys t_set all <- extract_lty TypeLevel ty emptyFKTV
...@@ -1540,20 +1540,20 @@ extractHsTyRdrTyVars ty ...@@ -1540,20 +1540,20 @@ extractHsTyRdrTyVars ty
-- | Extracts free type and kind variables from types in a list. -- | Extracts free type and kind variables from types in a list.
-- When the same name occurs multiple times in the types, only the first -- When the same name occurs multiple times in the types, only the first
-- occurence is returned and the rest is filtered out. -- occurrence is returned and the rest is filtered out.
-- See Note [Kind and type-variable binders] -- See Note [Kind and type-variable binders]
extractHsTysRdrTyVars :: [LHsType RdrName] -> RnM FreeKiTyVars extractHsTysRdrTyVars :: [LHsType RdrName] -> RnM FreeKiTyVars
extractHsTysRdrTyVars tys extractHsTysRdrTyVars tys
= rmDupsInRdrTyVars <$> extractHsTysRdrTyVarsDups tys = rmDupsInRdrTyVars <$> extractHsTysRdrTyVarsDups tys
-- | Extracts free type and kind variables from types in a list. -- | Extracts free type and kind variables from types in a list.
-- When the same name occurs multiple times in the types, all occurences -- When the same name occurs multiple times in the types, all occurrences
-- are returned. -- are returned.
extractHsTysRdrTyVarsDups :: [LHsType RdrName] -> RnM FreeKiTyVars extractHsTysRdrTyVarsDups :: [LHsType RdrName] -> RnM FreeKiTyVars
extractHsTysRdrTyVarsDups tys extractHsTysRdrTyVarsDups tys
= extract_ltys TypeLevel tys emptyFKTV = extract_ltys TypeLevel tys emptyFKTV
-- | Removes multiple occurences of the same name from FreeKiTyVars. -- | Removes multiple occurrences of the same name from FreeKiTyVars.
rmDupsInRdrTyVars :: FreeKiTyVars -> FreeKiTyVars rmDupsInRdrTyVars :: FreeKiTyVars -> FreeKiTyVars
rmDupsInRdrTyVars (FKTV kis k_set tys t_set all) rmDupsInRdrTyVars (FKTV kis k_set tys t_set all)
= FKTV (nubL kis) k_set (nubL tys) t_set (nubL all) = FKTV (nubL kis) k_set (nubL tys) t_set (nubL all)
......
...@@ -1121,7 +1121,7 @@ only have *forward* references. Hence, it's safe to discard the binding ...@@ -1121,7 +1121,7 @@ only have *forward* references. Hence, it's safe to discard the binding
NOTE: This isn't our last opportunity to inline. We're at the binding NOTE: This isn't our last opportunity to inline. We're at the binding
site right now, and we'll get another opportunity when we get to the site right now, and we'll get another opportunity when we get to the
ocurrence(s) occurrence(s)
Note that we do this unconditional inlining only for trival RHSs. Note that we do this unconditional inlining only for trival RHSs.
Don't inline even WHNFs inside lambdas; doing so may simply increase Don't inline even WHNFs inside lambdas; doing so may simply increase
......
...@@ -403,7 +403,7 @@ instance Outputable ChildLookupResult where ...@@ -403,7 +403,7 @@ instance Outputable ChildLookupResult where
ppr (FoundFL fls) = text "FoundFL:" <+> ppr fls ppr (FoundFL fls) = text "FoundFL:" <+> ppr fls
ppr (NameErr _) = text "Error" ppr (NameErr _) = text "Error"
-- Left biased accumulation monoid. Chooses the left-most positive occurence. -- Left biased accumulation monoid. Chooses the left-most positive occurrence.
instance Monoid ChildLookupResult where instance Monoid ChildLookupResult where
mempty = NameNotFound mempty = NameNotFound
NameNotFound `mappend` m2 = m2 NameNotFound `mappend` m2 = m2
...@@ -568,7 +568,7 @@ data DisambigInfo ...@@ -568,7 +568,7 @@ data DisambigInfo
instance Monoid DisambigInfo where instance Monoid DisambigInfo where
mempty = NoOccurence mempty = NoOccurence
-- This is the key line: We prefer disambiguated occurences to other -- This is the key line: We prefer disambiguated occurrences to other
-- names. -- names.
UniqueOccurence _ `mappend` DisambiguatedOccurence g' = DisambiguatedOccurence g' UniqueOccurence _ `mappend` DisambiguatedOccurence g' = DisambiguatedOccurence g'
DisambiguatedOccurence g' `mappend` UniqueOccurence _ = DisambiguatedOccurence g' DisambiguatedOccurence g' `mappend` UniqueOccurence _ = DisambiguatedOccurence g'
......
...@@ -280,7 +280,7 @@ reasons: ...@@ -280,7 +280,7 @@ reasons:
TyVars, bring 'k' and 'a' into scope, and kind check the TyVars, bring 'k' and 'a' into scope, and kind check the
signature for 'foo'. In doing so we call solveEqualities to signature for 'foo'. In doing so we call solveEqualities to
solve any kind equalities in foo's signature. So the solver solve any kind equalities in foo's signature. So the solver
may see free occurences of 'k'. may see free occurrences of 'k'.
It's convenient to simply treat these TyVars as skolem constants, It's convenient to simply treat these TyVars as skolem constants,
which of course they are. So which of course they are. So
...@@ -930,7 +930,7 @@ data TcDepVars -- See Note [Dependent type variables] ...@@ -930,7 +930,7 @@ data TcDepVars -- See Note [Dependent type variables]
= DV { dv_kvs :: DTyCoVarSet -- "kind" variables (dependent) = DV { dv_kvs :: DTyCoVarSet -- "kind" variables (dependent)
, dv_tvs :: DTyVarSet -- "type" variables (non-dependent) , dv_tvs :: DTyVarSet -- "type" variables (non-dependent)
-- A variable may appear in both sets -- A variable may appear in both sets
-- E.g. T k (x::k) The first occurence of k makes it -- E.g. T k (x::k) The first occurrence of k makes it
-- show up in dv_tvs, the second in dv_kvs -- show up in dv_tvs, the second in dv_kvs
-- See Note [Dependent type variables] -- See Note [Dependent type variables]
} }
...@@ -982,7 +982,7 @@ So: dv_kvs are the kind variables of the type ...@@ -982,7 +982,7 @@ So: dv_kvs are the kind variables of the type
Note that Note that
* A variable can occur in both. * A variable can occur in both.
T k (x::k) The first occurence of k makes it T k (x::k) The first occurrence of k makes it
show up in dv_tvs, the second in dv_kvs show up in dv_tvs, the second in dv_kvs
* We include any coercion variables in the "dependent", * We include any coercion variables in the "dependent",
......
...@@ -845,13 +845,13 @@ to ``hs-boot`` files, but with some slight changes: ...@@ -845,13 +845,13 @@ to ``hs-boot`` files, but with some slight changes:
type family ClosedFam a where .. type family ClosedFam a where ..
The ``..`` is meant literally -- you shoudl write two dots in The ``..`` is meant literally -- you should write two dots in
your file. The ``where`` clause distinguishes closed families your file. The ``where`` clause distinguishes closed families
from open ones. from open ones.
- A data type declaration can either be given in full, exactly - A data type declaration can either be given in full, exactly
as in Haskell, or it can be given abstractly, by omitting the '=' as in Haskell, or it can be given abstractly, by omitting the '='
sign and everything tha follows. For example: :: sign and everything that follows. For example: ::
signature A where signature A where
data T a b data T a b
...@@ -907,7 +907,7 @@ to ``hs-boot`` files, but with some slight changes: ...@@ -907,7 +907,7 @@ to ``hs-boot`` files, but with some slight changes:
These declarations can be implemented by type synonyms These declarations can be implemented by type synonyms
of kind ``Constraint``; this can be useful if you want to parametrize of kind ``Constraint``; this can be useful if you want to parametrize
over a constraint in functions. For example, with the over a constraint in functions. For example, with the
``ConstraintKinds`` extension, this type synonym is avalid ``ConstraintKinds`` extension, this type synonym is a valid
implementation of the signature above:: implementation of the signature above::
module A where module A where
......
...@@ -491,7 +491,7 @@ unzip :: Functor f => f (a,b) -> (f a, f b) ...@@ -491,7 +491,7 @@ unzip :: Functor f => f (a,b) -> (f a, f b)
unzip xs = (fst <$> xs, snd <$> xs) unzip xs = (fst <$> xs, snd <$> xs)
-- | The 'nub' function removes duplicate elements from a list. In -- | The 'nub' function removes duplicate elements from a list. In
-- particular, it keeps only the first occurence of each element. -- particular, it keeps only the first occurrence of each element.
-- (The name 'nub' means \'essence\'.) -- (The name 'nub' means \'essence\'.)
-- It is a special case of 'nubBy', which allows the programmer to -- It is a special case of 'nubBy', which allows the programmer to
-- supply their own inequality test. -- supply their own inequality test.
......
...@@ -427,7 +427,7 @@ test('T5631', ...@@ -427,7 +427,7 @@ test('T5631',
# 2015-12-21: 1198327544 (Mac) TypeApplications (will fix with #11196) # 2015-12-21: 1198327544 (Mac) TypeApplications (will fix with #11196)
# 2015-03-18: 1124068664 (Mac) optimize Unify & zonking # 2015-03-18: 1124068664 (Mac) optimize Unify & zonking
# 2016-10-19: 1024926024 (amd64/Linux) Refactor traceRn interface (#12617) # 2016-10-19: 1024926024 (amd64/Linux) Refactor traceRn interface (#12617)
# 2016-11-10: 1077429456 (amd64/Linux) Stop -dno-debug-output supressing -ddump-tc-trace # 2016-11-10: 1077429456 (amd64/Linux) Stop -dno-debug-output suppressing -ddump-tc-trace
only_ways(['normal']) only_ways(['normal'])
], ],
......
{-# LANGUAGE OverlappingInstances #-} {-# LANGUAGE OverlappingInstances #-}
{-# OPTIONS_GHC -w #-} -- Turn off deprecation for OverlappingInstances {-# OPTIONS_GHC -w #-} -- Turn off deprecation for OverlappingInstances
-- | Safe, as we now check at overlap occurence, not defenition. -- | Safe, as we now check at overlap occurrence, not definition.
module UnsafeInfered08_A where module UnsafeInfered08_A where
g :: Int g :: Int
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
-- and the constraint (Foo (t::? -> s::*)) didn't match Foo (a::* -> b::*). -- and the constraint (Foo (t::? -> s::*)) didn't match Foo (a::* -> b::*).
-- Solution is to zap the expected type in TcEpxr.tc_expr(HsOverLit). -- Solution is to zap the expected type in TcEpxr.tc_expr(HsOverLit).
module ShoudlCompile where module ShouldCompile where
class Foo a where class Foo a where
foo :: a foo :: a
......
...@@ -14,7 +14,7 @@ soon). ...@@ -14,7 +14,7 @@ soon).
-} -}
module ShoudlCompile where module ShouldCompile where
class (Monad m) => Stream m h | h->m where class (Monad m) => Stream m h | h->m where
vMkIOError :: h -> Int vMkIOError :: h -> Int
......
...@@ -7,7 +7,7 @@ import Data.Ord ( Down ) -- convenient newtype ...@@ -7,7 +7,7 @@ import Data.Ord ( Down ) -- convenient newtype
data X a data X a
-- See Trac #10715 for a long discussion about whether -- See Trac #10715 for a long discussion about whether
-- this shoudl be accepted or not. -- this should be accepted or not.
-- --
-- But in Trac #12466 we decided to accept contradictory -- But in Trac #12466 we decided to accept contradictory
-- type signatures, so definition is now accepeted even -- type signatures, so definition is now accepeted even
......
-- A missing kind check made GHC 6.4 crash on this one -- A missing kind check made GHC 6.4 crash on this one
module ShoudlFail where module ShouldFail where
class Foo f where class Foo f where
baa :: f a -> f baa :: f a -> f
......
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