summaryrefslogtreecommitdiff
path: root/compiler/basicTypes
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/basicTypes')
-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
5 files changed, 11 insertions, 11 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