{- *********************************************************************
*                                                                      *
                         Type equalities
*                                                                      *
********************************************************************* -}

eqTyCon :: TyCon
eqTyCon = mkAlgTyCon eqTyConName
            (ForAllTy kv $ mkArrowKinds [k, k] constraintKind)
            [kv, a, b]
            [Nominal, Nominal, Nominal]
            Nothing
            []      -- No stupid theta
            (DataTyCon [eqBoxDataCon] False)
            (VanillaAlgTyCon (mkSpecialTyConRepName (fsLit "tcEq") eqTyConName))
            NonRecursive
            False
            NotPromoted
  where
    kv = kKiVar
    k = mkTyVarTy kv
    [a,b] = mkTemplateTyVars [k,k]
eqTyCon :: TyCon
eqTyCon = mkAlgTyCon eqTyConName
            (ForAllTy kv $ mkArrowKinds [k, k] constraintKind)
            [kv, a, b]
            [Nominal, Nominal, Nominal]
            Nothing
            []      -- No stupid theta
            (DataTyCon [eqBoxDataCon] False)
            (VanillaAlgTyCon (mkSpecialTyConRepName (fsLit "tcEq") eqTyConName))
            NonRecursive
            False
            NotPromoted
  where
    kv = kKiVar
    k = mkTyVarTy kv
    [a,b] = mkTemplateTyVars [k,k]
eqTyCon = mkAlgTyCon eqTyConName
            (ForAllTy kv $ mkArrowKinds [k, k] constraintKind)
            [kv, a, b]
            [Nominal, Nominal, Nominal]
            Nothing
            []      -- No stupid theta
            (DataTyCon [eqBoxDataCon] False)
            (VanillaAlgTyCon (mkSpecialTyConRepName (fsLit "tcEq") eqTyConName))
            NonRecursive
            False
            NotPromoted
  where
    kv = kKiVar
    k = mkTyVarTy kv
    [a,b] = mkTemplateTyVars [k,k]