[commit: ghc] master: Fix misspellings of the word "instance" in comments (d213ab3)
git at git.haskell.org
git at git.haskell.org
Mon Jul 18 13:16:14 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/d213ab3fa0cc2a39d9f74df11c8a3451ac34411c/ghc
>---------------------------------------------------------------
commit d213ab3fa0cc2a39d9f74df11c8a3451ac34411c
Author: Ryan Scott <ryan.gl.scott at gmail.com>
Date: Mon Jul 18 09:14:36 2016 -0400
Fix misspellings of the word "instance" in comments
[ci skip]
>---------------------------------------------------------------
d213ab3fa0cc2a39d9f74df11c8a3451ac34411c
compiler/rename/RnNames.hs | 2 +-
compiler/rename/RnSource.hs | 2 +-
compiler/typecheck/TcInstDcls.hs | 4 ++--
compiler/typecheck/TcValidity.hs | 2 +-
compiler/types/TyCon.hs | 2 +-
libraries/base/GHC/Base.hs | 2 +-
testsuite/tests/deriving/should_compile/drv015.hs | 2 +-
7 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/compiler/rename/RnNames.hs b/compiler/rename/RnNames.hs
index ab27b6a..51a231c 100644
--- a/compiler/rename/RnNames.hs
+++ b/compiler/rename/RnNames.hs
@@ -1466,7 +1466,7 @@ dupExport_ok :: Name -> IE RdrName -> IE RdrName -> Bool
-- Example of "yes" (Trac #2436)
-- module M( C(..), T(..) ) where
-- class C a where { data T a }
--- instace C Int where { data T Int = TInt }
+-- instance C Int where { data T Int = TInt }
--
-- Example of "yes" (Trac #2436)
-- module Foo ( T ) where
diff --git a/compiler/rename/RnSource.hs b/compiler/rename/RnSource.hs
index 67cf7fd..adfec6f 100644
--- a/compiler/rename/RnSource.hs
+++ b/compiler/rename/RnSource.hs
@@ -1268,7 +1268,7 @@ if the data instance is an assocaited type of an enclosing class instance.
with different dependency structure!)
Ugh. For now we simply don't allow promotion of data constructors for
-data instaces. See Note [AFamDataCon: not promoting data family
+data instances. See Note [AFamDataCon: not promoting data family
constructors] in TcEnv
-}
diff --git a/compiler/typecheck/TcInstDcls.hs b/compiler/typecheck/TcInstDcls.hs
index 21eea28..220923d 100644
--- a/compiler/typecheck/TcInstDcls.hs
+++ b/compiler/typecheck/TcInstDcls.hs
@@ -888,7 +888,7 @@ wrapId wrapper id = mkHsWrap wrapper (HsVar (noLoc id))
{- Note [Typechecking plan for instance declarations]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-For intance declarations we generate the following bindings and implication
+For instance declarations we generate the following bindings and implication
constraints. Example:
instance Ord a => Ord [a] where compare = <compare-rhs>
@@ -1516,7 +1516,7 @@ mkDefMethBind :: Class -> [Type] -> Id -> Name -> TcM (LHsBind Name, [LSig Name]
-- The is a default method (vanailla or generic) defined in the class
-- So make a binding op = $dmop @t1 @t2
-- where $dmop is the name of the default method in the class,
--- and t1,t2 are the instace types.
+-- and t1,t2 are the instance types.
-- See Note [Default methods in instances] for why we use
-- visible type application here
mkDefMethBind clas inst_tys sel_id dm_name
diff --git a/compiler/typecheck/TcValidity.hs b/compiler/typecheck/TcValidity.hs
index 4653eaa..49767fe 100644
--- a/compiler/typecheck/TcValidity.hs
+++ b/compiler/typecheck/TcValidity.hs
@@ -130,7 +130,7 @@ And this is what checkAmbiguity does.
What about this, though?
g :: C [a] => Int
Is every call to 'g' ambiguous? After all, we might have
- intance C [a] where ...
+ instance C [a] where ...
at the call site. So maybe that type is ok! Indeed even f's
quintessentially ambiguous type might, just possibly be callable:
with -XFlexibleInstances we could have
diff --git a/compiler/types/TyCon.hs b/compiler/types/TyCon.hs
index d825712..a31ecdd 100644
--- a/compiler/types/TyCon.hs
+++ b/compiler/types/TyCon.hs
@@ -852,7 +852,7 @@ data AlgTyConFlav
[Type] -- Argument types (mentions the tyConTyVars of this TyCon)
-- Match in length the tyConTyVars of the family TyCon
- -- E.g. data intance T [a] = ...
+ -- E.g. data instance T [a] = ...
-- gives a representation tycon:
-- data R:TList a = ...
-- axiom co a :: T [a] ~ R:TList a
diff --git a/libraries/base/GHC/Base.hs b/libraries/base/GHC/Base.hs
index 9e4467b..03e9648 100644
--- a/libraries/base/GHC/Base.hs
+++ b/libraries/base/GHC/Base.hs
@@ -50,7 +50,7 @@ GHC.Num Class: Num, plus instances for Int
GHC.Real Classes: Real, Integral, Fractional, RealFrac
plus instances for Int, Integer
Types: Ratio, Rational
- plus intances for classes so far
+ plus instances for classes so far
Rational is needed here because it is mentioned in the signature
of 'toRational' in class Real
diff --git a/testsuite/tests/deriving/should_compile/drv015.hs b/testsuite/tests/deriving/should_compile/drv015.hs
index b8575b2..f76da45 100644
--- a/testsuite/tests/deriving/should_compile/drv015.hs
+++ b/testsuite/tests/deriving/should_compile/drv015.hs
@@ -1,7 +1,7 @@
-- July 07: I'm changing this from "should_compile" to "should_fail".
-- It would generate an instance decl like
--- insance (Show (f a), Show (g a)) => Show (Pair1 f g a)
+-- instance (Show (f a), Show (g a)) => Show (Pair1 f g a)
-- and that is not Haskell 98.
--
-- See Note [Exotic derived instance contexts] in TcSimplify.
More information about the ghc-commits
mailing list