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

Typos in docs and comments

parent 1ee92293
...@@ -146,7 +146,7 @@ data IdDetails ...@@ -146,7 +146,7 @@ data IdDetails
-- e.g. $trModule, or $tcT -- e.g. $trModule, or $tcT
| PatSynId -- ^ A top-level Id to support pattern synonyms; | PatSynId -- ^ A top-level Id to support pattern synonyms;
-- the builder or matcher for the patern synonym -- the builder or matcher for the pattern synonym
data RecSelParent = RecSelData TyCon | RecSelPatSyn PatSyn deriving Eq data RecSelParent = RecSelData TyCon | RecSelPatSyn PatSyn deriving Eq
-- Either `TyCon` or `PatSyn` depending -- Either `TyCon` or `PatSyn` depending
......
...@@ -549,7 +549,7 @@ a user-written type or function name ...@@ -549,7 +549,7 @@ a user-written type or function name
$f... Dict-fun identifiers (from inst decls) $f... Dict-fun identifiers (from inst decls)
$dmop Default method for 'op' $dmop Default method for 'op'
$pnC n'th superclass selector for class C $pnC n'th superclass selector for class C
$wf Worker for functtoin 'f' $wf Worker for function 'f'
$sf.. Specialised version of f $sf.. Specialised version of f
T:C Tycon for dictionary for class C T:C Tycon for dictionary for class C
D:C Data constructor for dictionary for class C D:C Data constructor for dictionary for class C
......
...@@ -1773,9 +1773,9 @@ varids0 :: { Located [Located RdrName] } ...@@ -1773,9 +1773,9 @@ varids0 :: { Located [Located RdrName] }
Note [Parsing ~] Note [Parsing ~]
~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~
Due to parsing conflicts between lazyness annotations in data type Due to parsing conflicts between laziness annotations in data type
declarations (see strict_mark) and equality types ~'s are always declarations (see strict_mark) and equality types ~'s are always
parsed as lazyness annotations, and turned into HsEqTy's in the parsed as laziness annotations, and turned into HsEqTy's in the
correct places using RdrHsSyn.splitTilde. correct places using RdrHsSyn.splitTilde.
Since strict_mark is parsed as part of atype which is part of type, Since strict_mark is parsed as part of atype which is part of type,
......
...@@ -667,7 +667,7 @@ rnFamInstDecl doc mb_cls tycon (HsIB { hsib_body = pats }) payload rnPayload ...@@ -667,7 +667,7 @@ rnFamInstDecl doc mb_cls tycon (HsIB { hsib_body = pats }) payload rnPayload
(L loc _ : ps) -> combineSrcSpans loc (getLoc (last ps)) (L loc _ : ps) -> combineSrcSpans loc (getLoc (last ps))
; pat_kity_vars_with_dups <- extractHsTysRdrTyVarsDups pats ; pat_kity_vars_with_dups <- extractHsTysRdrTyVarsDups pats
-- Use the "...Dups" form becuase it's needed -- Use the "...Dups" form because it's needed
-- below to report unsed binder on the LHS -- below to report unsed binder on the LHS
; var_names <- mapM (newTyVarNameRn mb_cls . L loc . unLoc) $ ; var_names <- mapM (newTyVarNameRn mb_cls . L loc . unLoc) $
freeKiTyVarsAllVars $ freeKiTyVarsAllVars $
......
...@@ -1023,7 +1023,7 @@ preInlineUnconditionally :: DynFlags -> SimplEnv -> TopLevelFlag -> InId -> InEx ...@@ -1023,7 +1023,7 @@ preInlineUnconditionally :: DynFlags -> SimplEnv -> TopLevelFlag -> InId -> InEx
-- Precondition: rhs satisfies the let/app invariant -- Precondition: rhs satisfies the let/app invariant
-- See Note [CoreSyn let/app invariant] in CoreSyn -- See Note [CoreSyn let/app invariant] in CoreSyn
-- Reason: we don't want to inline single uses, or discard dead bindings, -- Reason: we don't want to inline single uses, or discard dead bindings,
-- for unlifted, side-effect-full bindings -- for unlifted, side-effect-ful bindings
preInlineUnconditionally dflags env top_lvl bndr rhs preInlineUnconditionally dflags env top_lvl bndr rhs
| not active = False | not active = False
| isStableUnfolding (idUnfolding bndr) = False -- Note [Stable unfoldings and preInlineUnconditionally] | isStableUnfolding (idUnfolding bndr) = False -- Note [Stable unfoldings and preInlineUnconditionally]
...@@ -1136,7 +1136,7 @@ postInlineUnconditionally ...@@ -1136,7 +1136,7 @@ postInlineUnconditionally
-- Precondition: rhs satisfies the let/app invariant -- Precondition: rhs satisfies the let/app invariant
-- See Note [CoreSyn let/app invariant] in CoreSyn -- See Note [CoreSyn let/app invariant] in CoreSyn
-- Reason: we don't want to inline single uses, or discard dead bindings, -- Reason: we don't want to inline single uses, or discard dead bindings,
-- for unlifted, side-effect-full bindings -- for unlifted, side-effect-ful bindings
postInlineUnconditionally dflags env top_lvl bndr occ_info rhs unfolding postInlineUnconditionally dflags env top_lvl bndr occ_info rhs unfolding
| not active = False | not active = False
| isWeakLoopBreaker occ_info = False -- If it's a loop-breaker of any kind, don't inline | isWeakLoopBreaker occ_info = False -- If it's a loop-breaker of any kind, don't inline
......
...@@ -593,7 +593,7 @@ we keep? More subtle than you might think! ...@@ -593,7 +593,7 @@ we keep? More subtle than you might think!
8% performance improvement in nofib cryptarithm2, compared to 8% performance improvement in nofib cryptarithm2, compared to
just rolling the dice. I didn't investigate why. just rolling the dice. I didn't investigate why.
* Constaints coming from the same level (i.e. same implication) * Constraints coming from the same level (i.e. same implication)
- Always get rid of InstSC ones if possible, since they are less - Always get rid of InstSC ones if possible, since they are less
useful for solving. If both are InstSC, choose the one with useful for solving. If both are InstSC, choose the one with
......
...@@ -8770,7 +8770,7 @@ monomorphic type (one with no foralls). For example, ...@@ -8770,7 +8770,7 @@ monomorphic type (one with no foralls). For example,
The definition of ``foo`` is rejected because one would have to The definition of ``foo`` is rejected because one would have to
instantiate ``id``\'s type with ``b := (forall s. ST s a) -> a``, and instantiate ``id``\'s type with ``b := (forall s. ST s a) -> a``, and
that is not allowed. Instanting polymorpic type variables with that is not allowed. Instantiating polymorphic type variables with
polymorphic types is called *impredicative polymorphism*. polymorphic types is called *impredicative polymorphism*.
GHC has extremely flaky support for *impredicative polymorphism*, GHC has extremely flaky support for *impredicative polymorphism*,
......
...@@ -440,7 +440,7 @@ SRC_HC_OPTS_STAGE0 = ...@@ -440,7 +440,7 @@ SRC_HC_OPTS_STAGE0 =
SRC_HC_OPTS_STAGE1 = SRC_HC_OPTS_STAGE1 =
SRC_HC_OPTS_STAGE2 = SRC_HC_OPTS_STAGE2 =
# Warning supression flags. See mk/warnings.mk. # Warning suppression flags. See mk/warnings.mk.
SRC_CC_WARNING_OPTS = SRC_CC_WARNING_OPTS =
SRC_HC_WARNING_OPTS = SRC_HC_WARNING_OPTS =
......
...@@ -123,10 +123,10 @@ GhcBootLibExtraHcOpts += -fno-warn-deprecated-flags ...@@ -123,10 +123,10 @@ GhcBootLibExtraHcOpts += -fno-warn-deprecated-flags
# * Most .cabal files specify -Wall. But not all, and not all building we # * Most .cabal files specify -Wall. But not all, and not all building we
# do relies on .cabal files. So we have to add -Wall ourselves somewhere. # do relies on .cabal files. So we have to add -Wall ourselves somewhere.
# #
# * Some .cabal also specify warning supression flags. Because -Wall # * Some .cabal also specify warning suppression flags. Because -Wall
# overrides any warning supression flags that come before it, we have to # overrides any warning suppression flags that come before it, we have to
# make sure -Wall comes before any warning supression flags. So we add it # make sure -Wall comes before any warning suppression flags. So we add it
# to SRC_HC_OPTS. # to SRC_HC_OPTS.
# #
# * Similarly, our own warning supression should come after the -Wall from # * Similarly, our own warning suppression should come after the -Wall from
# the .cabal files, so we do *not* add them to SRC_HC_OPTS. # the .cabal files, so we do *not* add them to SRC_HC_OPTS.
...@@ -24,6 +24,6 @@ f (Y x) = g maybeToInt x ...@@ -24,6 +24,6 @@ f (Y x) = g maybeToInt x
-- g :: Functor f => (f Int -> b) -> f (Y Maybe) -> b -- g :: Functor f => (f Int -> b) -> f (Y Maybe) -> b
g h x = h $ fmap f x g h x = h $ fmap f x
-- 'test' checks that g's type is polymophic enough -- 'test' checks that g's type is polymorphic enough
test :: Functor f => (f Int -> b) -> f (Y Maybe) -> b test :: Functor f => (f Int -> b) -> f (Y Maybe) -> b
test = g test = g
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