summaryrefslogtreecommitdiff
path: root/compiler/GHC/Tc
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Tc')
-rw-r--r--compiler/GHC/Tc/Deriv/Utils.hs2
-rw-r--r--compiler/GHC/Tc/Errors/Hole.hs8
-rw-r--r--compiler/GHC/Tc/Gen/Bind.hs4
-rw-r--r--compiler/GHC/Tc/Gen/Expr.hs2
-rw-r--r--compiler/GHC/Tc/Gen/HsType.hs2
-rw-r--r--compiler/GHC/Tc/Solver.hs4
-rw-r--r--compiler/GHC/Tc/Solver/Monad.hs2
-rw-r--r--compiler/GHC/Tc/TyCl.hs6
-rw-r--r--compiler/GHC/Tc/Types.hs2
-rw-r--r--compiler/GHC/Tc/Utils/Env.hs2
-rw-r--r--compiler/GHC/Tc/Validity.hs2
11 files changed, 18 insertions, 18 deletions
diff --git a/compiler/GHC/Tc/Deriv/Utils.hs b/compiler/GHC/Tc/Deriv/Utils.hs
index 5f109fd148..b17cbb14b9 100644
--- a/compiler/GHC/Tc/Deriv/Utils.hs
+++ b/compiler/GHC/Tc/Deriv/Utils.hs
@@ -100,7 +100,7 @@ data DerivEnv = DerivEnv
, denv_cls :: Class
-- ^ Class for which we need to derive an instance
, denv_inst_tys :: [Type]
- -- ^ All arguments to to 'denv_cls' in the derived instance.
+ -- ^ All arguments to 'denv_cls' in the derived instance.
, denv_ctxt :: DerivContext
-- ^ @'SupplyContext' theta@ for standalone deriving (where @theta@ is the
-- context of the instance).
diff --git a/compiler/GHC/Tc/Errors/Hole.hs b/compiler/GHC/Tc/Errors/Hole.hs
index ebfe1e3003..25c7e8839a 100644
--- a/compiler/GHC/Tc/Errors/Hole.hs
+++ b/compiler/GHC/Tc/Errors/Hole.hs
@@ -111,7 +111,7 @@ The hole in `f` would generate the message:
(and originally defined in ‘GHC.Base’))
Valid hole fits are found by checking top level identifiers and local bindings
-in scope for whether their type can be instantiated to the the type of the hole.
+in scope for whether their type can be instantiated to the type of the hole.
Additionally, we also need to check whether all relevant constraints are solved
by choosing an identifier of that type as well, see Note [Relevant constraints]
@@ -122,10 +122,10 @@ This is to avoid affecting the hole and later checks by prematurely having
unified one of the free unification variables.
When outputting, we sort the hole fits by the size of the types we'd need to
-apply by type application to the type of the fit to to make it fit. This is done
+apply by type application to the type of the fit to make it fit. This is done
in order to display "more relevant" suggestions first. Another option is to
sort by building a subsumption graph of fits, i.e. a graph of which fits subsume
-what other fits, and then outputting those fits which are are subsumed by other
+what other fits, and then outputting those fits which are subsumed by other
fits (i.e. those more specific than other fits) first. This results in the ones
"closest" to the type of the hole to be displayed first.
@@ -600,7 +600,7 @@ findValidHoleFits tidy_env implics simples h@(Hole { hole_sort = ExprHole _
; return (tidy_env, vMsg $$ refMsg) }
where
-- We extract the type, the tcLevel and the types free variables
- -- from from the constraint.
+ -- from the constraint.
hole_fvs :: FV
hole_fvs = tyCoFVsOfType hole_ty
hole_lvl = ctLocLevel ct_loc
diff --git a/compiler/GHC/Tc/Gen/Bind.hs b/compiler/GHC/Tc/Gen/Bind.hs
index 0a393bf30b..1944c61af5 100644
--- a/compiler/GHC/Tc/Gen/Bind.hs
+++ b/compiler/GHC/Tc/Gen/Bind.hs
@@ -215,7 +215,7 @@ tcTopBinds binds sigs
-- a fixed return type must agree with this.
--
-- The fields of `Fixed` cache the first conlike and its return type so
--- that that we can compare all the other conlikes to it. The conlike is
+-- that we can compare all the other conlikes to it. The conlike is
-- stored for error messages.
--
-- `Nothing` in the case that the type is fixed by a type signature
@@ -1609,7 +1609,7 @@ We typecheck pattern bindings as follows. First tcLhs does this:
generalisation step will do the checking and impedance matching
against the signature.
- - If for some some reason we are not generalising (plan = NoGen), the
+ - If for some reason we are not generalising (plan = NoGen), the
LetBndrSpec will be LetGblBndr. In that case we must bind the
global version of the Id, and do so with precisely the type given
in the signature. (Then we unify with the type from the pattern
diff --git a/compiler/GHC/Tc/Gen/Expr.hs b/compiler/GHC/Tc/Gen/Expr.hs
index d970b3e0b2..eaf3a3db0c 100644
--- a/compiler/GHC/Tc/Gen/Expr.hs
+++ b/compiler/GHC/Tc/Gen/Expr.hs
@@ -2147,7 +2147,7 @@ tcTagToEnum expr fun args app_res_ty res_ty
checkThLocalId :: Id -> TcM ()
-- The renamer has already done checkWellStaged,
-- in 'GHC.Rename.Splice.checkThLocalName', so don't repeat that here.
--- Here we just just add constraints fro cross-stage lifting
+-- Here we just add constraints fro cross-stage lifting
checkThLocalId id
= do { mb_local_use <- getStageAndBindLevel (idName id)
; case mb_local_use of
diff --git a/compiler/GHC/Tc/Gen/HsType.hs b/compiler/GHC/Tc/Gen/HsType.hs
index 22edf3c0b4..0d1bc6cceb 100644
--- a/compiler/GHC/Tc/Gen/HsType.hs
+++ b/compiler/GHC/Tc/Gen/HsType.hs
@@ -3721,7 +3721,7 @@ Consider
Here
* The pattern (MkT p1 p2) creates a *skolem* type variable 'a_sk',
- It must be a skolem so that that it retains its identity, and
+ It must be a skolem so that it retains its identity, and
GHC.Tc.Errors.getSkolemInfo can thereby find the binding site for the skolem.
* The type signature pattern (f :: b -> c) makes freshs meta-tyvars
diff --git a/compiler/GHC/Tc/Solver.hs b/compiler/GHC/Tc/Solver.hs
index 7f60860888..8327b39e6d 100644
--- a/compiler/GHC/Tc/Solver.hs
+++ b/compiler/GHC/Tc/Solver.hs
@@ -435,7 +435,7 @@ than just accumulate an error message, for two reasons:
* More seriously, we don't have a convenient term-level place to add
deferred bindings for unsolved kind-equality constraints, so we
don't build evidence bindings (by usine reportAllUnsolved). That
- means that we'll be left with with a type that has coercion holes
+ means that we'll be left with a type that has coercion holes
in it, something like
<type> |> co-hole
where co-hole is not filled in. Eeek! That un-filled-in
@@ -2268,7 +2268,7 @@ the top-level simple constraints are plausible, but we also float constraints
out from inside, if they are not captured by skolems.
The same function is used when doing type-class defaulting (see the call
-to applyDefaultingRules) to extract constraints that that might be defaulted.
+to applyDefaultingRules) to extract constraints that might be defaulted.
There is one caveat:
diff --git a/compiler/GHC/Tc/Solver/Monad.hs b/compiler/GHC/Tc/Solver/Monad.hs
index 3500ef4bbe..3c783b0137 100644
--- a/compiler/GHC/Tc/Solver/Monad.hs
+++ b/compiler/GHC/Tc/Solver/Monad.hs
@@ -2313,7 +2313,7 @@ very same implication" as the equuality constraint.
MkS -> [y,z])
in ...
-From the type signature for `g`, we get `y::a` . Then when when we
+From the type signature for `g`, we get `y::a` . Then when we
encounter the `\z`, we'll assign `z :: alpha[1]`, say. Next, from the
body of the lambda we'll get
diff --git a/compiler/GHC/Tc/TyCl.hs b/compiler/GHC/Tc/TyCl.hs
index 5970147580..efdb1bdfd0 100644
--- a/compiler/GHC/Tc/TyCl.hs
+++ b/compiler/GHC/Tc/TyCl.hs
@@ -236,7 +236,7 @@ tcTyClDecls tyclds kisig_env role_annots
tcExtendRecEnv (zipRecTyClss tc_tycons rec_tyclss) $
-- Also extend the local type envt with bindings giving
- -- a TcTyCon for each each knot-tied TyCon or Class
+ -- a TcTyCon for each knot-tied TyCon or Class
-- See Note [Type checking recursive type and class declarations]
-- and Note [Type environment evolution]
tcExtendKindEnvWithTyCons tc_tycons $
@@ -2937,7 +2937,7 @@ unravelFamInstPats fam_app
addConsistencyConstraints :: AssocInstInfo -> TcType -> TcM ()
-- In the corresponding positions of the class and type-family,
--- ensure the the family argument is the same as the class argument
+-- ensure the family argument is the same as the class argument
-- E.g class C a b c d where
-- F c x y a :: Type
-- Here the first arg of F should be the same as the third of C
@@ -4191,7 +4191,7 @@ checkValidClass cls
-- default-method Name to be that of the generic
-- default type signature
- -- First, we check that that the method's default type signature
+ -- First, we check that the method's default type signature
-- aligns with the non-default type signature.
-- See Note [Default method type signatures must align]
let cls_pred = mkClassPred cls $ mkTyVarTys $ classTyVars cls
diff --git a/compiler/GHC/Tc/Types.hs b/compiler/GHC/Tc/Types.hs
index 2fb1a03db0..ce2e5faead 100644
--- a/compiler/GHC/Tc/Types.hs
+++ b/compiler/GHC/Tc/Types.hs
@@ -715,7 +715,7 @@ We gather three sorts of usage information
The tcg_keep field is used in two distinct ways:
* Desugar.addExportFlagsAndRules. Where things like (a-c) are locally
- defined, we should give them an an Exported flag, so that the
+ defined, we should give them an Exported flag, so that the
simplifier does not discard them as dead code, and so that they are
exposed in the interface file (but not to export to the user).
diff --git a/compiler/GHC/Tc/Utils/Env.hs b/compiler/GHC/Tc/Utils/Env.hs
index eebe9eb8ed..e8640a08dc 100644
--- a/compiler/GHC/Tc/Utils/Env.hs
+++ b/compiler/GHC/Tc/Utils/Env.hs
@@ -138,7 +138,7 @@ lookupGlobal hsc_env name
}
lookupGlobal_maybe :: HscEnv -> Name -> IO (MaybeErr MsgDoc TyThing)
--- This may look up an Id that one one has previously looked up.
+-- This may look up an Id that one has previously looked up.
-- If so, we are going to read its interface file, and add its bindings
-- to the ExternalPackageTable.
lookupGlobal_maybe hsc_env name
diff --git a/compiler/GHC/Tc/Validity.hs b/compiler/GHC/Tc/Validity.hs
index c9eec9838f..080132c080 100644
--- a/compiler/GHC/Tc/Validity.hs
+++ b/compiler/GHC/Tc/Validity.hs
@@ -122,7 +122,7 @@ Consider
You would think that the definition of g would surely typecheck!
After all f has exactly the same type, and g=f. But in fact f's type
is instantiated and the instantiated constraints are solved against
-the originals, so in the case an ambiguous type it won't work.
+the originals, so in the case of an ambiguous type it won't work.
Consider our earlier example f :: C a => Int. Then in g's definition,
we'll instantiate to (C alpha) and try to deduce (C alpha) from (C a),
and fail.