[commit: ghc] master: Comments only (b800e52)

git at git.haskell.org git at git.haskell.org
Tue Mar 25 14:35:06 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/b800e52ac503c27912260cab4a14022c09f98ded/ghc

>---------------------------------------------------------------

commit b800e52ac503c27912260cab4a14022c09f98ded
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Tue Mar 25 14:20:10 2014 +0000

    Comments only


>---------------------------------------------------------------

b800e52ac503c27912260cab4a14022c09f98ded
 compiler/coreSyn/CoreSubst.lhs    |   12 +++++-------
 compiler/typecheck/TcDeriv.lhs    |    2 +-
 compiler/typecheck/TcSimplify.lhs |    2 +-
 3 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/compiler/coreSyn/CoreSubst.lhs b/compiler/coreSyn/CoreSubst.lhs
index ff24e2e..ef601a2 100644
--- a/compiler/coreSyn/CoreSubst.lhs
+++ b/compiler/coreSyn/CoreSubst.lhs
@@ -1118,11 +1118,10 @@ to remain visible until Phase 1
 
 Note [Unfold compulsory unfoldings in LHSs]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
 When the user writes `map coerce = coerce` as a rule, the rule will only ever
 match if we replace coerce by its unfolding on the LHS, because that is the
 core that the rule matching engine will find. So do that for everything that
-has a compulsory unfolding. Also see Note [Desugaring coerce as cast]
+has a compulsory unfolding. Also see Note [Desugaring coerce as cast] in Desugar
 
 %************************************************************************
 %*                                                                      *
@@ -1302,10 +1301,9 @@ exprIsLiteral_maybe env@(_, id_unf) e
       _         -> Nothing
 \end{code}
 
-Note [exprIsLiteral_maybe]
+Note [exprIsLambda_maybe]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-This function will, given an expression `e`, try to turn it into the form
+exprIsLambda_maybe will, given an expression `e`, try to turn it into the form
 `Lam v e'` (returned as `Just (v,e')`). Besides using lambdas, it looks through
 casts (using the Push rule), and it unfolds function calls if the unfolding
 has a greater arity than arguments are present.
@@ -1314,10 +1312,10 @@ Currently, it is used in Rules.match, and is required to make
 "map coerce = coerce" match.
 
 \begin{code}
--- See Note [exprIsLiteral_maybe]
 exprIsLambda_maybe :: InScopeEnv -> CoreExpr -> Maybe (Var, CoreExpr)
+    -- See Note [exprIsLambda_maybe]
 
--- The simpe case: It is a lambda
+-- The simple case: It is a lambda already
 exprIsLambda_maybe _ (Lam x e)
     = Just (x, e)
 
diff --git a/compiler/typecheck/TcDeriv.lhs b/compiler/typecheck/TcDeriv.lhs
index 9cd2cf1..1e19bd4 100644
--- a/compiler/typecheck/TcDeriv.lhs
+++ b/compiler/typecheck/TcDeriv.lhs
@@ -1492,7 +1492,7 @@ badCon con msg = ptext (sLit "Constructor") <+> quotes (ppr con) <+> msg
 Note [Check that the type variable is truly universal]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 For Functor, Foldable, Traversable, we must check that the *last argument*
-of the type constructor is used truly universally.  Example
+of the type constructor is used truly universally quantified.  Example
 
    data T a b where
      T1 :: a -> b -> T a b      -- Fine! Vanilla H-98
diff --git a/compiler/typecheck/TcSimplify.lhs b/compiler/typecheck/TcSimplify.lhs
index af57729..fa7c75d 100644
--- a/compiler/typecheck/TcSimplify.lhs
+++ b/compiler/typecheck/TcSimplify.lhs
@@ -493,7 +493,7 @@ This only half-works, but then let-generalisation only half-works.
 *                                                                                 *
 ***********************************************************************************
 
-See note [Simplifying RULE consraints] in TcRule
+See note [Simplifying RULE constraints] in TcRule
 
 Note [RULE quanfification over equalities]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



More information about the ghc-commits mailing list