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

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/b52f0a404a693e26a7484a41efaae70276b01241

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

commit b52f0a404a693e26a7484a41efaae70276b01241
Merge: a4b3fda... 1e00b77...
Author: Ian Lynagh <[email protected]>
Date:   Thu Feb 16 16:42:01 2012 +0000

    Merge branch 'master' of http://darcs.haskell.org/ghc
    
    Conflicts:
        compiler/types/TyCon.lhs

 compiler/basicTypes/DataCon.lhs     |   13 +-
 compiler/basicTypes/Var.lhs         |    2 +-
 compiler/coreSyn/CoreFVs.lhs        |    2 +-
 compiler/coreSyn/CoreLint.lhs       |  462 ++++++++++++++---------------------
 compiler/deSugar/DsBinds.lhs        |    2 +-
 compiler/hsSyn/HsExpr.lhs           |   11 +-
 compiler/hsSyn/HsPat.lhs            |    7 +-
 compiler/hsSyn/HsTypes.lhs          |    6 +-
 compiler/iface/IfaceType.lhs        |   10 +-
 compiler/iface/TcIface.lhs          |    4 +-
 compiler/prelude/PrelNames.lhs      |    4 +-
 compiler/prelude/TysPrim.lhs        |   61 +++--
 compiler/simplCore/SetLevels.lhs    |    5 +-
 compiler/simplCore/Simplify.lhs     |   17 ++
 compiler/typecheck/TcBinds.lhs      |    6 +-
 compiler/typecheck/TcCanonical.lhs  |  425 +++++++++++++++++++--------------
 compiler/typecheck/TcEnv.lhs        |   41 +++-
 compiler/typecheck/TcErrors.lhs     |   11 +-
 compiler/typecheck/TcEvidence.lhs   |    5 +-
 compiler/typecheck/TcExpr.lhs       |    4 +-
 compiler/typecheck/TcHsSyn.lhs      |    3 +-
 compiler/typecheck/TcHsType.lhs     |   60 +++--
 compiler/typecheck/TcInteract.lhs   |    1 -
 compiler/typecheck/TcMType.lhs      |   40 +--
 compiler/typecheck/TcPat.lhs        |   14 +-
 compiler/typecheck/TcRnMonad.lhs    |   22 +--
 compiler/typecheck/TcRnTypes.lhs    |    9 +-
 compiler/typecheck/TcSMonad.lhs     |   13 +-
 compiler/typecheck/TcSimplify.lhs   |    4 +-
 compiler/typecheck/TcSplice.lhs     |    8 +-
 compiler/typecheck/TcTyClsDecls.lhs |   21 +-
 compiler/typecheck/TcType.lhs       |    7 +-
 compiler/typecheck/TcUnify.lhs      |  130 +----------
 compiler/types/Kind.lhs             |   13 +-
 compiler/types/TyCon.lhs            |   51 +---
 compiler/types/Type.lhs             |    4 +-
 compiler/types/TypeRep.lhs          |   44 ++--
 compiler/utils/Outputable.lhs       |   29 ++-
 38 files changed, 710 insertions(+), 861 deletions(-)

diff --cc compiler/types/TyCon.lhs
index 8ec2264,3347eed..18504d1
--- a/compiler/types/TyCon.lhs
+++ b/compiler/types/TyCon.lhs
@@@ -20,33 -27,32 +20,32 @@@ module TyCon
          coAxiomLHS, coAxiomRHS, isImplicitCoAxiom,
  
          -- ** Constructing TyCons
 -      mkAlgTyCon,
 -      mkClassTyCon,
 +        mkAlgTyCon,
 +        mkClassTyCon,
          mkIParamTyCon,
 -      mkFunTyCon,
 -      mkPrimTyCon,
 -      mkKindTyCon,
 -      mkLiftedPrimTyCon,
 -      mkTupleTyCon,
 -      mkSynTyCon,
 +        mkFunTyCon,
 +        mkPrimTyCon,
 +        mkKindTyCon,
 +        mkLiftedPrimTyCon,
 +        mkTupleTyCon,
 +        mkSynTyCon,
-         mkSuperKindTyCon,
          mkForeignTyCon,
 -      mkPromotedDataTyCon,
 -      mkPromotedTyCon,
 +        mkPromotedDataTyCon,
 +        mkPromotedTyCon,
  
          -- ** Predicates on TyCons
          isAlgTyCon,
 -        isClassTyCon, isFamInstTyCon, 
 -        isFunTyCon, 
 +        isClassTyCon, isFamInstTyCon,
 +        isFunTyCon,
          isPrimTyCon,
 -        isTupleTyCon, isUnboxedTupleTyCon, isBoxedTupleTyCon, 
 +        isTupleTyCon, isUnboxedTupleTyCon, isBoxedTupleTyCon,
          isSynTyCon, isClosedSynTyCon,
-         isSuperKindTyCon, isDecomposableTyCon,
-         isForeignTyCon, tyConHasKind,
+         isDecomposableTyCon,
+         isForeignTyCon, 
          isPromotedDataTyCon, isPromotedTypeTyCon,
  
 -      isInjectiveTyCon,
 -      isDataTyCon, isProductTyCon, isEnumerationTyCon, 
 +        isInjectiveTyCon,
 +        isDataTyCon, isProductTyCon, isEnumerationTyCon,
          isNewTyCon, isAbstractTyCon,
          isFamilyTyCon, isSynFamilyTyCon, isDataFamilyTyCon,
          isUnLiftedTyCon,
@@@ -75,13 -80,14 +74,14 @@@
          tupleTyConBoxity, tupleTyConSort, tupleTyConArity,
  
          -- ** Manipulating TyCons
 -      tcExpandTyCon_maybe, coreExpandTyCon_maybe,
 -      makeTyConAbstract,
 -      newTyConCo, newTyConCo_maybe,
 +        tcExpandTyCon_maybe, coreExpandTyCon_maybe,
 +        makeTyConAbstract,
 +        newTyConCo, newTyConCo_maybe,
+         pprPromotionQuote,
  
          -- * Primitive representations of Types
 -      PrimRep(..),
 -      tyConPrimRep,
 +        PrimRep(..),
 +        tyConPrimRep,
          primRepSizeW
  ) where
  
@@@ -395,33 -394,21 +395,21 @@@ data TyCo
                                             --   holds the name of the 
imported thing
      }
  
-   -- | Super-kinds. These are "kinds-of-kinds" and are never seen in
-   -- Haskell source programs.  There are only two super-kinds: TY (aka
-   -- "box"), which is the super-kind of kinds that construct types
-   -- eventually, and CO (aka "diamond"), which is the super-kind of
-   -- kinds that just represent coercions.
-   --
-   -- Super-kinds have no kind themselves, and have arity zero
-   | SuperKindTyCon {
-         tyConUnique :: Unique,
-         tyConName   :: Name
-     }
- 
    -- | Represents promoted data constructor.
 -  | PromotedDataTyCon {               -- See Note [Promoted data constructors]
 -      tyConUnique :: Unique, -- ^ Same Unique as the data constructor
 -      tyConName   :: Name,   -- ^ Same Name as the data constructor
 -      tyConArity  :: Arity, 
 -      tc_kind     :: Kind,   -- ^ Translated type of the data constructor
 +  | PromotedDataTyCon {         -- See Note [Promoted data constructors]
 +        tyConUnique :: Unique, -- ^ Same Unique as the data constructor
 +        tyConName   :: Name,   -- ^ Same Name as the data constructor
 +        tyConArity  :: Arity,
 +        tc_kind     :: Kind,   -- ^ Translated type of the data constructor
          dataCon     :: DataCon -- ^ Corresponding data constructor
      }
  
    -- | Represents promoted type constructor.
    | PromotedTypeTyCon {
 -      tyConUnique :: Unique, -- ^ Same Unique as the type constructor
 -      tyConName   :: Name,   -- ^ Same Name as the type constructor
 -      tyConArity  :: Arity,  -- ^ n if ty_con :: * -> ... -> *  n times
 +        tyConUnique :: Unique, -- ^ Same Unique as the type constructor
 +        tyConName   :: Name,   -- ^ Same Name as the type constructor
 +        tyConArity  :: Arity,  -- ^ n if ty_con :: * -> ... -> *  n times
-         tc_kind     :: Kind,   -- ^ Always tySuperKind
+         tc_kind     :: Kind,   -- ^ Always TysPrim.superKind
          ty_con      :: TyCon   -- ^ Corresponding type constructor
      }
  
@@@ -959,16 -942,8 +947,8 @@@ mkSynTyCon name kind tyvars cType rhs p
          synTcParent = parent
      }
  
- -- | Create a super-kind 'TyCon'
- mkSuperKindTyCon :: Name -> TyCon -- Super kinds always have arity zero
- mkSuperKindTyCon name
-   = SuperKindTyCon {
-         tyConName = name,
-         tyConUnique = nameUnique name
-   }
- 
  -- | Create a promoted data constructor 'TyCon'
 --- Somewhat dodgily, we give it the same Name 
 +-- Somewhat dodgily, we give it the same Name
  -- as the data constructor itself
  mkPromotedDataTyCon :: DataCon -> Name -> Unique -> Kind -> Arity -> TyCon
  mkPromotedDataTyCon con name unique kind arity
@@@ -1252,13 -1222,8 +1227,13 @@@ isImplicitTyCon tyco
    | isSynTyCon tycon   = False
    | isAlgTyCon tycon   = isTupleTyCon tycon
    | otherwise          = True
 -        -- 'otherwise' catches: FunTyCon, PrimTyCon, 
 +        -- 'otherwise' catches: FunTyCon, PrimTyCon,
-         -- PromotedDataCon, PomotedTypeTyCon, SuperKindTyCon
+         -- PromotedDataCon, PomotedTypeTyCon
 +
 +tyConCType_maybe :: TyCon -> Maybe CType
 +tyConCType_maybe tc@(AlgTyCon {}) = tyConCType tc
 +tyConCType_maybe tc@(SynTyCon {}) = tyConCType tc
 +tyConCType_maybe _ = Nothing
  \end{code}
  
  



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

Reply via email to