summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRik Steenkamp <rik@ewps.nl>2016-02-16 22:44:42 +0100
committerBen Gamari <ben@smart-cactus.org>2016-02-16 22:44:49 +0100
commit49c5cb40f049f0a868fa310a240a31b571f40491 (patch)
tree4d6d14d6f6fe6403e5e659825063ab1b9fda7e54
parent31160036c71f6f913623ea5c889ec3963d49768c (diff)
downloadhaskell-49c5cb40f049f0a868fa310a240a31b571f40491.tar.gz
Fix typos
Reviewers: bgamari, austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1915
-rw-r--r--compiler/basicTypes/OccName.hs8
-rw-r--r--compiler/basicTypes/PatSyn.hs8
-rw-r--r--compiler/basicTypes/Unique.hs2
-rw-r--r--compiler/basicTypes/VarEnv.hs2
-rw-r--r--compiler/basicTypes/VarSet.hs2
-rw-r--r--compiler/hsSyn/HsBinds.hs2
-rw-r--r--compiler/typecheck/TcErrors.hs2
-rw-r--r--compiler/typecheck/TcPatSyn.hs12
-rw-r--r--compiler/typecheck/TcRnTypes.hs10
-rw-r--r--compiler/types/TyCoRep.hs2
-rw-r--r--docs/users_guide/glasgow_exts.rst10
-rw-r--r--testsuite/tests/monadfail/MonadFailWarnings.stderr8
-rw-r--r--testsuite/tests/wcompat-warnings/WCompatWarningsOn.stderr2
13 files changed, 35 insertions, 35 deletions
diff --git a/compiler/basicTypes/OccName.hs b/compiler/basicTypes/OccName.hs
index 28256fb67b..a45cc960ac 100644
--- a/compiler/basicTypes/OccName.hs
+++ b/compiler/basicTypes/OccName.hs
@@ -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]
diff --git a/compiler/basicTypes/PatSyn.hs b/compiler/basicTypes/PatSyn.hs
index a0430ca319..65826583dd 100644
--- a/compiler/basicTypes/PatSyn.hs
+++ b/compiler/basicTypes/PatSyn.hs
@@ -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 })
diff --git a/compiler/basicTypes/Unique.hs b/compiler/basicTypes/Unique.hs
index e330aedb28..ca74373ce4 100644
--- a/compiler/basicTypes/Unique.hs
+++ b/compiler/basicTypes/Unique.hs
@@ -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,
diff --git a/compiler/basicTypes/VarEnv.hs b/compiler/basicTypes/VarEnv.hs
index 10a7f14901..bd59e15253 100644
--- a/compiler/basicTypes/VarEnv.hs
+++ b/compiler/basicTypes/VarEnv.hs
@@ -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.
--
diff --git a/compiler/basicTypes/VarSet.hs b/compiler/basicTypes/VarSet.hs
index 7966139d8c..1cd9e21dab 100644
--- a/compiler/basicTypes/VarSet.hs
+++ b/compiler/basicTypes/VarSet.hs
@@ -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
diff --git a/compiler/hsSyn/HsBinds.hs b/compiler/hsSyn/HsBinds.hs
index 1ee8ab741b..e2476cd92b 100644
--- a/compiler/hsSyn/HsBinds.hs
+++ b/compiler/hsSyn/HsBinds.hs
@@ -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
diff --git a/compiler/typecheck/TcErrors.hs b/compiler/typecheck/TcErrors.hs
index 1fb2094a57..7fcf5743e7 100644
--- a/compiler/typecheck/TcErrors.hs
+++ b/compiler/typecheck/TcErrors.hs
@@ -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 $
diff --git a/compiler/typecheck/TcPatSyn.hs b/compiler/typecheck/TcPatSyn.hs
index 6a59f71e70..1e833242cb 100644
--- a/compiler/typecheck/TcPatSyn.hs
+++ b/compiler/typecheck/TcPatSyn.hs
@@ -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.
diff --git a/compiler/typecheck/TcRnTypes.hs b/compiler/typecheck/TcRnTypes.hs
index 0810ac8070..3864f1a493 100644
--- a/compiler/typecheck/TcRnTypes.hs
+++ b/compiler/typecheck/TcRnTypes.hs
@@ -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 ->
diff --git a/compiler/types/TyCoRep.hs b/compiler/types/TyCoRep.hs
index 6a13213a6c..f72c37fd13 100644
--- a/compiler/types/TyCoRep.hs
+++ b/compiler/types/TyCoRep.hs
@@ -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
diff --git a/docs/users_guide/glasgow_exts.rst b/docs/users_guide/glasgow_exts.rst
index 481ff5ffe5..dfa8669a34 100644
--- a/docs/users_guide/glasgow_exts.rst
+++ b/docs/users_guide/glasgow_exts.rst
@@ -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
diff --git a/testsuite/tests/monadfail/MonadFailWarnings.stderr b/testsuite/tests/monadfail/MonadFailWarnings.stderr
index 3d05126623..af2606a392 100644
--- a/testsuite/tests/monadfail/MonadFailWarnings.stderr
+++ b/testsuite/tests/monadfail/MonadFailWarnings.stderr
@@ -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;
diff --git a/testsuite/tests/wcompat-warnings/WCompatWarningsOn.stderr b/testsuite/tests/wcompat-warnings/WCompatWarningsOn.stderr
index ee2ded8516..9a28fb3e21 100644
--- a/testsuite/tests/wcompat-warnings/WCompatWarningsOn.stderr
+++ b/testsuite/tests/wcompat-warnings/WCompatWarningsOn.stderr
@@ -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