Commit d213ab3f authored by Ryan Scott's avatar Ryan Scott
Browse files

Fix misspellings of the word "instance" in comments

[ci skip]
parent 5df92f67
......@@ -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
......@@ -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
......@@ -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 instance types.
-- See Note [Default methods in instances] for why we use
-- visible type application here
mkDefMethBind clas inst_tys sel_id dm_name
......@@ -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
......@@ -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
......@@ -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
-- 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.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment