-- ^^^^
-- HsPredTy
-- Note no need for location info on the
- -- enclosed HsPred; the one on the type will do
+ -- Enclosed HsPred; the one on the type will do
| HsKindSig (LHsType name) -- (ty :: kind)
Kind -- A type with a kind signature
| HsBangTy HsBang (LHsType name) -- Bang-style type annotations
| HsRecTy [ConDeclField name] -- Only in data type declarations
+
+ | HsCoreTy Type -- An escape hatch for tunnelling a *closed*
+ -- Core Type through HsSyn.
+
deriving (Data, Typeable)
data HsExplicitFlag = Explicit | Implicit deriving (Data, Typeable)
pprHsContext :: (OutputableBndr name) => HsContext name -> SDoc
pprHsContext [] = empty
pprHsContext [L _ pred]
- | noParenHsPred pred = ppr pred <+> ptext (sLit "=>")
-pprHsContext cxt = ppr_hs_context cxt <+> ptext (sLit "=>")
+ | noParenHsPred pred = ppr pred <+> darrow
+pprHsContext cxt = ppr_hs_context cxt <+> darrow
noParenHsPred :: HsPred name -> Bool
-- c.f. TypeRep.noParenPred
ppr_mono_ty _ (HsPredTy pred) = ppr pred
ppr_mono_ty _ (HsNumTy n) = integer n -- generics only
ppr_mono_ty _ (HsSpliceTy s _ _) = pprSplice s
+ppr_mono_ty _ (HsCoreTy ty) = ppr ty
ppr_mono_ty ctxt_prec (HsAppTy fun_ty arg_ty)
= maybeParen ctxt_prec pREC_CON $