summaryrefslogtreecommitdiff
path: root/compiler/GHC/Data
diff options
context:
space:
mode:
authorEric Lindblad <lindblad@gmx.us>2022-09-13 10:31:23 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-09-14 03:13:56 -0400
commit646d15ad8f1119f339998ee8dd79ea96cfd1d165 (patch)
tree84bc30035fb31ea0f418384b2399400d53539cbf /compiler/GHC/Data
parentdc6af9ed87e619d754bfc385df931c81cba6d93a (diff)
downloadhaskell-646d15ad8f1119f339998ee8dd79ea96cfd1d165.tar.gz
Fix typos
This fixes various typos and spelling mistakes in the compiler. Fixes #21891
Diffstat (limited to 'compiler/GHC/Data')
-rw-r--r--compiler/GHC/Data/Graph/Color.hs2
-rw-r--r--compiler/GHC/Data/Graph/Ops.hs6
-rw-r--r--compiler/GHC/Data/Graph/UnVar.hs2
-rw-r--r--compiler/GHC/Data/Stream.hs2
4 files changed, 6 insertions, 6 deletions
diff --git a/compiler/GHC/Data/Graph/Color.hs b/compiler/GHC/Data/Graph/Color.hs
index 452da2dbe9..496f98b205 100644
--- a/compiler/GHC/Data/Graph/Color.hs
+++ b/compiler/GHC/Data/Graph/Color.hs
@@ -95,7 +95,7 @@ colorGraph iterative spinCount colors triv spill graph0
-- try and color the problem nodes
-- problem nodes are the ones that were left uncolored because they weren't triv.
- -- theres a change we can color them here anyway.
+ -- there's a change we can color them here anyway.
(graph_prob, ksNoColor)
= assignColors colors graph_triv ksProblems
diff --git a/compiler/GHC/Data/Graph/Ops.hs b/compiler/GHC/Data/Graph/Ops.hs
index c34595eb76..d2671f252d 100644
--- a/compiler/GHC/Data/Graph/Ops.hs
+++ b/compiler/GHC/Data/Graph/Ops.hs
@@ -253,7 +253,7 @@ addExclusions u getClass colors graph
-- | Add a coalescence edge to the graph, creating nodes if required.
--- It is considered adventageous to assign the same color to nodes in a coalesence.
+-- It is considered advantageous to assign the same color to nodes in a coalescence.
addCoalesce
:: Uniquable k
=> (k, cls) -> (k, cls)
@@ -491,7 +491,7 @@ freezeNode k
= if elementOfUniqSet k (nodeCoalesce node)
then node { nodeCoalesce = delOneFromUniqSet (nodeCoalesce node) k }
else node -- panic "GHC.Data.Graph.Ops.freezeNode: edge to freeze wasn't in the coalesce set"
- -- If the edge isn't actually in the coelesce set then just ignore it.
+ -- If the edge isn't actually in the coalesce set then just ignore it.
fm2 = nonDetStrictFoldUniqSet (adjustUFM_C (freezeEdge k)) fm1
-- It's OK to use a non-deterministic fold here because the
@@ -609,7 +609,7 @@ validateGraph doc isColored graph
$ nonDetEltsUFM $ graphMap graph
, not $ null badNodes
= pprPanic "GHC.Data.Graph.Ops.validateGraph"
- ( text "Supposably colored graph has uncolored nodes."
+ ( text "Supposedly colored graph has uncolored nodes."
$$ text " uncolored nodes: " <> hcat (map (ppr . nodeId) badNodes)
$$ doc )
diff --git a/compiler/GHC/Data/Graph/UnVar.hs b/compiler/GHC/Data/Graph/UnVar.hs
index f5a9e1e54a..91239ab1d5 100644
--- a/compiler/GHC/Data/Graph/UnVar.hs
+++ b/compiler/GHC/Data/Graph/UnVar.hs
@@ -43,7 +43,7 @@ import qualified Data.IntSet as S
-- at hand, and we do not have that when we turn the domain of a VarEnv into a UnVarSet.
-- Therefore, use a IntSet directly (which is likely also a bit more efficient).
--- Set of uniques, i.e. for adjancet nodes
+-- Set of uniques, i.e. for adjacent nodes
newtype UnVarSet = UnVarSet (S.IntSet)
deriving Eq
diff --git a/compiler/GHC/Data/Stream.hs b/compiler/GHC/Data/Stream.hs
index 10f12c4462..32d5ff7e62 100644
--- a/compiler/GHC/Data/Stream.hs
+++ b/compiler/GHC/Data/Stream.hs
@@ -126,7 +126,7 @@ mapM f str = Stream $ \g h -> runStreamInternal str (g <=< f) h
-- | Note this is not very efficient because it traverses the whole stream
-- before rebuilding it, avoid using it if you can. mapAccumL used to
-- implemented but it wasn't used anywhere in the compiler and has similar
--- effiency problems.
+-- efficiency problems.
mapAccumL_ :: forall m a b c r . Monad m => (c -> a -> m (c,b)) -> c -> Stream m a r
-> Stream m b (c, r)
mapAccumL_ f c str = Stream $ \f h -> go c f h (runStream str)