[MLton-commit] r6045
Matthew Fluet
fluet at mlton.org
Thu Sep 20 15:12:16 PDT 2007
Pretty-printing functions
----------------------------------------------------------------------
U mlton/trunk/mlton/elaborate/type-env.fun
U mlton/trunk/mlton/elaborate/type-env.sig
----------------------------------------------------------------------
Modified: mlton/trunk/mlton/elaborate/type-env.fun
===================================================================
--- mlton/trunk/mlton/elaborate/type-env.fun 2007-09-20 14:16:04 UTC (rev 6044)
+++ mlton/trunk/mlton/elaborate/type-env.fun 2007-09-20 22:12:15 UTC (rev 6045)
@@ -1393,10 +1393,18 @@
("tyvars", Vector.layout Tyvar.layout tyvars),
("ty", Type.layout ty)]
+ fun layoutPrettyAux (s, {expandOpaque, localTyvarNames}) =
+ case s of
+ Type ty =>
+ Type.layoutPrettyAux
+ (ty, {expandOpaque = expandOpaque,
+ localTyvarNames = localTyvarNames})
+ | General {ty, ...} =>
+ Type.layoutPrettyAux
+ (ty, {expandOpaque = expandOpaque,
+ localTyvarNames = localTyvarNames})
fun layoutPretty s =
- case s of
- Type t => Type.layoutPretty t
- | General {ty, ...} => Type.layoutPretty ty
+ layoutPrettyAux (s, {expandOpaque = false, localTyvarNames = true})
val bound =
fn General {bound, ...} => bound ()
Modified: mlton/trunk/mlton/elaborate/type-env.sig
===================================================================
--- mlton/trunk/mlton/elaborate/type-env.sig 2007-09-20 14:16:04 UTC (rev 6044)
+++ mlton/trunk/mlton/elaborate/type-env.sig 2007-09-20 22:12:15 UTC (rev 6045)
@@ -90,6 +90,9 @@
val instantiate: t -> {args: unit -> Type.t vector,
instance: Type.t}
val layout: t -> Layout.t
+ val layoutPrettyAux:
+ t * {expandOpaque: bool,
+ localTyvarNames: bool} -> Layout.t
val layoutPretty: t -> Layout.t
val make: {canGeneralize: bool,
ty: Type.t,
More information about the MLton-commit
mailing list