%
+% (c) The University of Glasgow 2006
% (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
%
-\section[HsTypes]{Abstract syntax: user-defined types}
+
+HsTypes: Abstract syntax: user-defined types
\begin{code}
module HsTypes (
import {-# SOURCE #-} HsExpr ( HsSplice, pprSplice )
-import Type ( Type )
-import {- Kind parts of -}
- Type ( {- instance Outputable Kind -} Kind,
- pprParendKind, pprKind, isLiftedTypeKind )
-import BasicTypes ( IPName, Boxity, tupleParens )
-import SrcLoc ( Located(..), unLoc, noSrcSpan )
-import StaticFlags ( opt_PprStyle_Debug )
+import Type
+import HsDoc
+import BasicTypes
+import SrcLoc
+import StaticFlags
import Outputable
\end{code}
| HsSpliceTy (HsSplice name)
+ | HsDocTy (LHsType name) (LHsDoc name) -- A documented type
+
data HsExplicitForAll = Explicit | Implicit
-----------------------
-- 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_mono_ty ctxt_prec (HsDocTy ty doc)
+ = ppr ty <+> ppr (unLoc doc)
+
--------------------------
ppr_fun_ty ctxt_prec ty1 ty2
= let p1 = ppr_mono_lty pREC_FUN ty1