summaryrefslogtreecommitdiff
path: root/src/source_print.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-02-22 16:10:25 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-02-22 16:10:25 -0500
commit85cf99a95c910841f197ca911bb13d044456de7f (patch)
tree7f9fc4189681a0186e8ecbfcc84a0eec50d03be9 /src/source_print.sml
parentc60437564b5265a6f0735bd402abead87782d36a (diff)
Start of kind polymorphism, up to the point where demo/hello elaborates with updated Basis/Top
Diffstat (limited to 'src/source_print.sml')
-rw-r--r--src/source_print.sml26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/source_print.sml b/src/source_print.sml
index 148157c2..f2420947 100644
--- a/src/source_print.sml
+++ b/src/source_print.sml
@@ -50,6 +50,13 @@ fun p_kind' par (k, _) =
p_list_sep (box [space, string "*", space]) p_kind ks,
string ")"]
+ | KVar x => string x
+ | KFun (x, k) => box [string x,
+ space,
+ string "-->",
+ space,
+ p_kind k]
+
and p_kind k = p_kind' false k
fun p_explicitness e =
@@ -156,6 +163,17 @@ fun p_con' par (c, _) =
| CProj (c, n) => box [p_con c,
string ".",
string (Int.toString n)]
+
+ | CKAbs (x, c) => box [string x,
+ space,
+ string "==>",
+ space,
+ p_con c]
+ | TKFun (x, c) => box [string x,
+ space,
+ string "-->",
+ space,
+ p_con c]
and p_con c = p_con' false c
@@ -273,8 +291,6 @@ fun p_exp' par (e, _) =
string "---",
space,
p_con' true c])
- | EFold => string "fold"
-
| ECase (e, pes) => parenIf par (box [string "case",
space,
p_exp e,
@@ -300,6 +316,12 @@ fun p_exp' par (e, _) =
newline,
string "end"]
+ | EKAbs (x, e) => box [string x,
+ space,
+ string "-->",
+ space,
+ p_exp e]
+
and p_exp e = p_exp' false e
and p_edecl (d, _) =