Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : ghc-new-co

http://hackage.haskell.org/trac/ghc/changeset/15bea1b740be3d5ee755e0e7a7b214b587ad2205

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

commit 15bea1b740be3d5ee755e0e7a7b214b587ad2205
Author: Simon Peyton Jones <[email protected]>
Date:   Wed Apr 20 12:58:37 2011 +0100

    Comment changes to satisfy Haddock

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

 compiler/basicTypes/DataCon.lhs |    2 +-
 compiler/types/TypeRep.lhs      |   17 +++--------------
 2 files changed, 4 insertions(+), 15 deletions(-)

diff --git a/compiler/basicTypes/DataCon.lhs b/compiler/basicTypes/DataCon.lhs
index fae899d..5e35984 100644
--- a/compiler/basicTypes/DataCon.lhs
+++ b/compiler/basicTypes/DataCon.lhs
@@ -300,7 +300,7 @@ data DataCon
                -- the context constrains only universally quantified variables
                --      MkT :: forall a b. (a ~ b, Ord b) => a -> T a b
        dcOtherTheta :: ThetaType,  -- The other constraints in the data con's 
type
-                                   -- *other than* those in the dcEqSpec
+                                   -- other than those in the dcEqSpec
 
        dcStupidTheta :: ThetaType,     -- The context of the data type 
declaration 
                                        --      data Eq a => T a = ...
diff --git a/compiler/types/TypeRep.lhs b/compiler/types/TypeRep.lhs
index 446341d..c12f9c8 100644
--- a/compiler/types/TypeRep.lhs
+++ b/compiler/types/TypeRep.lhs
@@ -147,9 +147,10 @@ data Type
   | FunTy
        Type
        Type            -- ^ Special case of 'TyConApp': @TyConApp FunTyCon 
[t1, t2]@
+                       -- See Note [Equality-constrained types]
 
   | ForAllTy
-       TyCoVar         -- ^ Type *or* coercion variable; see Note 
[Equality-constrained types]
+       TyCoVar         -- Type variable
        Type            -- ^ A polymorphic type
 
   | PredTy
@@ -183,21 +184,9 @@ The type   forall ab. (a ~ [b]) => blah
 is encoded like this:
 
    ForAllTy (a:*) $ ForAllTy (b:*) $
-   ForAllTy (wild_co : a ~ [b]) $
+   FunTy (PredTy (EqPred a [b]) $
    blah
 
-That is, the "(a ~ [b]) =>" part is encode as a for-all
-type with a coercion variable that is never mentioned.
-
-We could instead have used a FunTy with an EqPred on the 
-left.  But we want 
-
-  * FunTy to mean RUN-TIME abstraction,
-    passing a real value at runtime, 
-
-  * ForAllTy to mean COMPILE-TIME abstraction, 
-    erased at runtime
-
 -------------------------------------
                Note [PredTy]
 



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to