summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2016-07-18 09:14:36 -0400
committerRyan Scott <ryan.gl.scott@gmail.com>2016-07-18 09:14:36 -0400
commitd213ab3fa0cc2a39d9f74df11c8a3451ac34411c (patch)
tree2aa55498f07af24806e8c23c2037ac66a18a91a5
parent5df92f6776b31b375a80865e7db1f330d929c18f (diff)
downloadhaskell-d213ab3fa0cc2a39d9f74df11c8a3451ac34411c.tar.gz
Fix misspellings of the word "instance" in comments
[ci skip]
-rw-r--r--compiler/rename/RnNames.hs2
-rw-r--r--compiler/rename/RnSource.hs2
-rw-r--r--compiler/typecheck/TcInstDcls.hs4
-rw-r--r--compiler/typecheck/TcValidity.hs2
-rw-r--r--compiler/types/TyCon.hs2
-rw-r--r--libraries/base/GHC/Base.hs2
-rw-r--r--testsuite/tests/deriving/should_compile/drv015.hs2
7 files changed, 8 insertions, 8 deletions
diff --git a/compiler/rename/RnNames.hs b/compiler/rename/RnNames.hs
index ab27b6af5e..51a231c184 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 67cf7fd9f2..adfec6f278 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 21eea28b99..220923d34d 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 4653eaaf00..49767fe1a8 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 d825712e27..a31ecddd72 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 9e4467be5e..03e9648ac9 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 b8575b2970..f76da45552 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.