Commit 49c5cb40 authored by Rik Steenkamp's avatar Rik Steenkamp Committed by Ben Gamari

Fix typos

Reviewers: bgamari, austin

Reviewed By: austin

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D1915
parent 31160036
......@@ -815,7 +815,7 @@ We have to take care though! Consider a machine-generated module (Trac #10370)
...
a2000 = e2000
Then "a1", "a2" etc are all marked taken. But now if we come across "a7" again,
we have to do a linear search to find a free one, "a20001". That might just be
we have to do a linear search to find a free one, "a2001". That might just be
acceptable once. But if we now come across "a8" again, we don't want to repeat
that search.
......@@ -851,7 +851,7 @@ tidyOccName env occ@(OccName occ_sp fs)
find !k !n
= case lookupUFM env new_fs of
Just {} -> find (k+1 :: Int) (n+k)
-- By using n+k, the n arguemt to find goes
-- By using n+k, the n argument to find goes
-- 1, add 1, add 2, add 3, etc which
-- moves at quadratic speed through a dense patch
......@@ -859,8 +859,8 @@ tidyOccName env occ@(OccName occ_sp fs)
where
new_fs = mkFastString (base ++ show n)
new_env = addToUFM (addToUFM env new_fs 1) base1 (n+1)
-- Update: base_fs, so that next time we'll start whwere we left off
-- new_fs, so that we know it is taken
-- Update: base1, so that next time we'll start where we left off
-- new_fs, so that we know it is taken
-- If they are the same (n==1), the former wins
-- See Note [TidyOccEnv]
......
......@@ -49,7 +49,7 @@ import Data.List
-- | A pattern synonym
-- See Note [Pattern synonym representation]
-- See Note [Patten synonym signatures]
-- See Note [Pattern synonym signatures]
data PatSyn
= MkPatSyn {
psName :: Name,
......@@ -104,7 +104,7 @@ data PatSyn
}
deriving Data.Typeable.Typeable
{- Note [Patten synonym signatures]
{- Note [Pattern synonym signatures]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In a pattern synonym signature we write
pattern P :: req => prov => t1 -> ... tn -> res_ty
......@@ -128,7 +128,7 @@ Example 2:
data T2 where
MkT2 :: (Num a, Eq a) => a -> a -> T2
patttern P2 :: () => (Num a, Eq a) => a -> T2
pattern P2 :: () => (Num a, Eq a) => a -> T2
pattern P2 x = MkT2 3 x
When we match against P2 we get a Num dictionary provided.
......@@ -323,7 +323,7 @@ patSynName = psName
patSynType :: PatSyn -> Type
-- The full pattern type, used only in error messages
-- See Note [Patten synonym signatures]
-- See Note [Pattern synonym signatures]
patSynType (MkPatSyn { psUnivTyVars = univ_tvs, psReqTheta = req_theta
, psExTyVars = ex_tvs, psProvTheta = prov_theta
, psArgs = orig_args, psOrigResTy = orig_res_ty })
......
......@@ -22,7 +22,7 @@ module Unique (
-- * Main data types
Unique, Uniquable(..),
-- ** Constructors, desctructors and operations on 'Unique's
-- ** Constructors, destructors and operations on 'Unique's
hasKey, cmpByUnique,
pprUnique,
......
......@@ -90,7 +90,7 @@ data InScopeSet = InScope (VarEnv Var) {-# UNPACK #-} !Int
-- unfolding), so this lookup is useful.
--
-- INVARIANT: the VarEnv maps (the Unique of) a variable to
-- a variable with the same Uniqua. (This was not
-- a variable with the same Unique. (This was not
-- the case in the past, when we had a grevious hack
-- mapping var1 to var2.
--
......
......@@ -65,7 +65,7 @@ unionVarSet :: VarSet -> VarSet -> VarSet
unionVarSets :: [VarSet] -> VarSet
mapUnionVarSet :: (a -> VarSet) -> [a] -> VarSet
-- ^ map the function oer the list, and union the results
-- ^ map the function over the list, and union the results
varSetElems :: VarSet -> [Var]
unitVarSet :: Var -> VarSet
......
......@@ -700,7 +700,7 @@ data Sig name
-- For details on above see note [Api annotations] in ApiAnnotation
| PatSynSig (Located name) (LHsSigType name)
-- P :: forall a b. Prov => Req => ty
-- P :: forall a b. Req => Prov => ty
-- | A signature for a class method
-- False: ordinary class-method signature
......
......@@ -1374,7 +1374,7 @@ misMatchMsg ct oriented ty1 ty2
text "Couldn't match a lifted type with an unlifted type"
| otherwise -- So now we have Nothing or (Just IsSwapped)
-- For some reason we treat Nothign like IsSwapped
-- For some reason we treat Nothing like IsSwapped
= addArising orig $
sep [ text herald1 <+> quotes (ppr ty1)
, nest padding $
......
......@@ -88,9 +88,9 @@ Once we get to type checking, we decompose it into its parts, in tcPatSynSig.
Note [The pattern-synonym signature splitting rule]
the universals are the ones mentioned in
- univ_tvs (and the kinds thereof)
- prov
- req
- body_ty
the existential are the rest
the existentials are the rest
* Moreover see Note
-}
......@@ -157,7 +157,7 @@ tcPatSynSig name sig_ty
, text "univ_tvs" <+> ppr univ_tvs
, text "req" <+> ppr req
, text "extra_ex" <+> ppr extra_ex
, text "ex_tvs_" <+> ppr ex_tvs
, text "ex_tvs" <+> ppr ex_tvs
, text "prov" <+> ppr prov
, text "arg_tys" <+> ppr arg_tys
, text "body_ty" <+> ppr body_ty ]
......@@ -249,7 +249,7 @@ tcCheckPatSynDecl PSB{ psb_id = lname@(L _ name), psb_args = details
do { (subst, ex_tvs') <- if isUnidirectional dir
then newMetaTyVars ex_tvs
else newMetaSigTyVars ex_tvs
-- See the "Existential type variables part of
-- See the "Existential type variables" part of
-- Note [Checking against a pattern signature]
; prov_dicts <- mapM (emitWanted origin)
(substTheta (extendTCvInScopeList subst univ_tvs) prov_theta)
......@@ -304,8 +304,8 @@ Example
pattern P x = [MkT x]
We must check that the (Eq a) that P claims to bind (and to
make available to matches against P, is derivable from the
acutal pattern. For example:
make available to matches against P), is derivable from the
actual pattern. For example:
f (P (x::a)) = ...here (Eq a) should be available...
And yes, (Eq a) is derivable from the (Ord a) bound by P's rhs.
......
......@@ -219,7 +219,7 @@ type RnM = TcRn
-- | Historical "type-checking monad" (now it's just 'TcRn').
type TcM = TcRn
-- We 'stack' these envs through the Reader like monad infastructure
-- We 'stack' these envs through the Reader like monad infrastructure
-- as we move into an expression (although the change is focused in
-- the lcl type).
data Env gbl lcl
......@@ -1183,7 +1183,7 @@ data TcIdSigInfo
}
data TcIdSigBndr -- See Note [Complete and partial type signatures]
= CompleteSig -- A complete signature with no wildards,
= CompleteSig -- A complete signature with no wildcards,
-- so the complete polymorphic type is known.
TcId -- The polymorphic Id with that type
......@@ -2174,7 +2174,7 @@ For Givens we make new EvVars and bind them immediately. Two main reasons:
But that superclass selector can't (yet) appear in a coercion
(see evTermCoercion), so the easy thing is to bind it to an Id.
So a Given has EvVar inside it rather that (as previously) an EvTerm.
So a Given has EvVar inside it rather than (as previously) an EvTerm.
-}
-- | A place for type-checking evidence to go after it is generated.
......@@ -2447,7 +2447,7 @@ level.
equalities involving type functions. Example:
Assume we have a wanted at depth 7:
[W] d{7} : F () ~ a
If thre is an type function equation "F () = Int", this would be rewritten to
If there is an type function equation "F () = Int", this would be rewritten to
[W] d{8} : Int ~ a
and remembered as having depth 8.
......@@ -2938,7 +2938,7 @@ pprCtOrigin (MCompPatOrigin pat)
pprCtOrigin (FailablePattern pat)
= ctoHerald <+> text "the failable pattern" <+> quotes (ppr pat)
$$
text "(this will become an error a future GHC release)"
text "(this will become an error in a future GHC release)"
pprCtOrigin (Shouldn'tHappenOrigin note)
= sdocWithDynFlags $ \dflags ->
......
......@@ -2298,7 +2298,7 @@ Note [Precedence in types]
We don't keep the fixity of type operators in the operator. So the pretty printer
operates the following precedene structre:
Type constructor application binds more tightly than
Oerator applications which bind more tightly than
Operator applications which bind more tightly than
Function arrow
So we might see a :+: T b -> c
......
......@@ -509,7 +509,7 @@ language as follows: ::
The representation of Typ is held abstract, permitting implementations
to use a fancy representation (e.g., hash-consing to manage sharing).
Without view patterns, using this signature a little inconvenient: ::
Without view patterns, using this signature is a little inconvenient: ::
size :: Typ -> Integer
size t = case view t of
......@@ -6086,8 +6086,8 @@ following is not possible: ::
data instance T Int = A
data instance T Char = B
foo :: T a -> Int
foo A = 1 -- WRONG: These two equations together...
foo B = 2 -- ...will produce a type error.
foo A = 1
foo B = 2
Instead, you would have to write ``foo`` as a class operation, thus: ::
......@@ -6100,7 +6100,7 @@ Instead, you would have to write ``foo`` as a class operation, thus: ::
Given the functionality provided by GADTs (Generalised Algebraic Data
Types), it might seem as if a definition, such as the above, should be
feasible. However, type families are - in contrast to GADTs - are
feasible. However, type families - in contrast to GADTs - are
*open;* i.e., new instances can always be added, possibly in other
modules. Supporting pattern matching across different data instances
would require a form of extensible case construct.
......@@ -8865,7 +8865,7 @@ Here are some more details:
More information is given for explicit holes (i.e. ones that start
with an underscore), than for out-of-scope variables, because the
latter are often unintended typos, so the extra information is
distracting. If you the detailed information, use a leading
distracting. If you want the detailed information, use a leading
underscore to make explicit your intent to use a hole.
- Unbound identifiers with the same name are never unified, even within
......
......@@ -2,7 +2,7 @@
MonadFailWarnings.hs:19:5: warning:
• Could not deduce (MonadFail m)
arising from the failable pattern ‘Just x’
(this will become an error a future GHC release)
(this will become an error in a future GHC release)
from the context: Monad m
bound by the type signature for:
general :: Monad m => m a
......@@ -23,7 +23,7 @@ MonadFailWarnings.hs:19:5: warning:
MonadFailWarnings.hs:35:5: warning:
• No instance for (MonadFail Identity)
arising from the failable pattern ‘Just x’
(this will become an error a future GHC release)
(this will become an error in a future GHC release)
• In a stmt of a 'do' block: Just x <- undefined
In the expression:
do { Just x <- undefined;
......@@ -36,7 +36,7 @@ MonadFailWarnings.hs:35:5: warning:
MonadFailWarnings.hs:51:5: warning:
• No instance for (MonadFail (ST s))
arising from the failable pattern ‘Just x’
(this will become an error a future GHC release)
(this will become an error in a future GHC release)
• In a stmt of a 'do' block: Just x <- undefined
In the expression:
do { Just x <- undefined;
......@@ -49,7 +49,7 @@ MonadFailWarnings.hs:51:5: warning:
MonadFailWarnings.hs:59:5: warning:
• No instance for (MonadFail ((->) r))
arising from the failable pattern ‘Just x’
(this will become an error a future GHC release)
(this will become an error in a future GHC release)
• In a stmt of a 'do' block: Just x <- undefined
In the expression:
do { Just x <- undefined;
......
......@@ -2,7 +2,7 @@
WCompatWarningsOn.hs:13:5: warning:
• Could not deduce (Control.Monad.Fail.MonadFail m)
arising from the failable pattern ‘Just _’
(this will become an error a future GHC release)
(this will become an error in a future GHC release)
from the context: Monad m
bound by the type signature for:
monadFail :: Monad m => m a
......
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