LBangType, BangType, HsBang(..),
getBangType, getBangStrictness,
LBangType, BangType, HsBang(..),
getBangType, getBangStrictness,
- mkExplicitHsForAllTy, mkImplicitHsForAllTy,
+ mkExplicitHsForAllTy, mkImplicitHsForAllTy, hsExplicitTvs,
hsTyVarName, hsTyVarNames, replaceTyVarName,
hsLTyVarName, hsLTyVarNames, hsLTyVarLocName, hsLTyVarLocNames,
splitHsInstDeclTy, splitHsFunType,
hsTyVarName, hsTyVarNames, replaceTyVarName,
hsLTyVarName, hsLTyVarNames, hsLTyVarLocName, hsLTyVarLocNames,
splitHsInstDeclTy, splitHsFunType,
import BasicTypes ( IPName, Boxity, tupleParens )
import SrcLoc ( Located(..), unLoc, noSrcSpan )
import StaticFlags ( opt_PprStyle_Debug )
import BasicTypes ( IPName, Boxity, tupleParens )
import SrcLoc ( Located(..), unLoc, noSrcSpan )
import StaticFlags ( opt_PprStyle_Debug )
where
split_tau tvs cxt (HsPredTy (HsClassP cls tys)) = (tvs, cxt, cls, tys)
split_tau tvs cxt (HsParTy (L _ ty)) = split_tau tvs cxt ty
where
split_tau tvs cxt (HsPredTy (HsClassP cls tys)) = (tvs, cxt, cls, tys)
split_tau tvs cxt (HsParTy (L _ ty)) = split_tau tvs cxt ty
-- Splits HsType into the (init, last) parts
-- Breaks up any parens in the result type:
-- Splits HsType into the (init, last) parts
-- Breaks up any parens in the result type:
-- But we still use the precedence stuff to add parens because
-- toHsType doesn't put in any HsParTys, so we may still need them
-- But we still use the precedence stuff to add parens because
-- toHsType doesn't put in any HsParTys, so we may still need them
--------------------------
ppr_fun_ty ctxt_prec ty1 ty2
= let p1 = ppr_mono_lty pREC_FUN ty1
--------------------------
ppr_fun_ty ctxt_prec ty1 ty2
= let p1 = ppr_mono_lty pREC_FUN ty1