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

On branch  : tc-untouchables

http://hackage.haskell.org/trac/ghc/changeset/1b5c8337577eea64972856b0466a7fbc36683540

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

commit 1b5c8337577eea64972856b0466a7fbc36683540
Author: Simon Peyton Jones <[email protected]>
Date:   Tue Sep 18 17:31:28 2012 +0100

    Undo making Any into a type family, for now
    
    Making Any a type family is the right thing to do, but it messes up
    the proxy kind arguments in TypeLits and Singletons, so I'm backing it
    out for now.
    
    More thought required!

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

 compiler/prelude/TysPrim.lhs  |    6 ++++++
 compiler/stgSyn/CoreToStg.lhs |    1 +
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/compiler/prelude/TysPrim.lhs b/compiler/prelude/TysPrim.lhs
index 792c174..5d177d5 100644
--- a/compiler/prelude/TysPrim.lhs
+++ b/compiler/prelude/TysPrim.lhs
@@ -717,6 +717,11 @@ anyTy :: Type
 anyTy = mkTyConTy anyTyCon
 
 anyTyCon :: TyCon
+anyTyCon = mkLiftedPrimTyCon anyTyConName kind 1 PtrRep
+  where kind = ForAllTy kKiVar (mkTyVarTy kKiVar)
+
+{-   Can't do this yet without messing up kind proxies
+anyTyCon :: TyCon
 anyTyCon = mkSynTyCon anyTyConName kind [kKiVar] 
                       syn_rhs
                       NoParentTyCon
@@ -724,6 +729,7 @@ anyTyCon = mkSynTyCon anyTyConName kind [kKiVar]
     kind = ForAllTy kKiVar (mkTyVarTy kKiVar)
     syn_rhs = SynFamilyTyCon { synf_open = False, synf_injective = True }
                   -- NB Closed, injective
+-}
 
 anyTypeOfKind :: Kind -> Type
 anyTypeOfKind kind = mkNakedTyConApp anyTyCon [kind]
diff --git a/compiler/stgSyn/CoreToStg.lhs b/compiler/stgSyn/CoreToStg.lhs
index 6c315b3..678136d 100644
--- a/compiler/stgSyn/CoreToStg.lhs
+++ b/compiler/stgSyn/CoreToStg.lhs
@@ -476,6 +476,7 @@ mkStgAltType bndr alts = case repType (idType bndr) of
   where
    _is_poly_alt_tycon tc
         =  isFunTyCon tc
+        || isPrimTyCon tc   -- "Any" is lifted but primitive
         || isFamilyTyCon tc -- Type family; e.g. Any, or arising from strict
                             -- function application where argument has a
                             -- type-family type



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

Reply via email to