[commit: ghc] master: Minor spelling, grammar, and formatting fixes (4080a63)
git at git.haskell.org
git at git.haskell.org
Tue Feb 21 14:54:08 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/4080a63c510f13be22953383a07ce0cf2d29e17b/ghc
>---------------------------------------------------------------
commit 4080a63c510f13be22953383a07ce0cf2d29e17b
Author: Ryan Scott <ryan.gl.scott at gmail.com>
Date: Tue Feb 21 09:43:43 2017 -0500
Minor spelling, grammar, and formatting fixes
[ci skip]
>---------------------------------------------------------------
4080a63c510f13be22953383a07ce0cf2d29e17b
compiler/typecheck/TcDerivInfer.hs | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/compiler/typecheck/TcDerivInfer.hs b/compiler/typecheck/TcDerivInfer.hs
index 22c0503..a28b0bc 100644
--- a/compiler/typecheck/TcDerivInfer.hs
+++ b/compiler/typecheck/TcDerivInfer.hs
@@ -34,7 +34,7 @@ import Type
import TcSimplify
import TcValidity (validDerivPred)
import TcUnify (buildImplicationFor)
-import Unify ( {- tcMatchTy, -} tcUnifyTy)
+import Unify (tcUnifyTy)
import Util
import Var
import VarEnv
@@ -592,7 +592,7 @@ simplifyDeriv pred tvs thetas
-- Create the implications we need to solve. For stock and newtype
-- deriving, these implication constraints will be simple class
- -- constriants like (C a, Ord b).
+ -- constraints like (C a, Ord b).
-- But with DeriveAnyClass, we make an implication constraint.
-- See Note [Gathering and simplifying constraints for DeriveAnyClass]
mk_wanteds :: ThetaOrigin -> TcM WantedConstraints
@@ -716,8 +716,8 @@ To see why, consider this example of DeriveAnyClass:
default baz :: (Ord a, Show a) => a -> a -> Bool
baz x y = compare x y == EQ
-Because 'bar' and 'baz' have default signatures, generates a top-level
-definition for thse generic default methods
+Because 'bar' and 'baz' have default signatures, this generates a top-level
+definition for these generic default methods
$gdm_bar :: forall a. Foo a
=> forall c. (Show a, Ix c)
@@ -737,14 +737,15 @@ GHC were typechecking the binding
bar = $gdm bar
it would
* skolemise the expected type of bar
- * instaniate the type of $dm_bar with meta-type varibles
+ * instantiate the type of $dm_bar with meta-type varibles
* build an implication constraint
[STEP DAC BUILD]
So that's what we do. We build the constraint (call it C1)
forall b. Ix b => (Show (Maybe s), Ix cc,
- Maybe s -> b -> String ~ Maybe s -> cc -> String)
+ Maybe s -> b -> String
+ ~ Maybe s -> cc -> String)
The 'cc' is a unification variable that comes from instantiating
$dm_bar's type. The equality constraint comes from marrying up
More information about the ghc-commits
mailing list