aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cjrize.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-09-07 11:33:13 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-09-07 11:33:13 -0400
commit5cf1d4d086475575a31f57413c57c22bd6fda378 (patch)
treeab36ce67d2931f2c715b5b734930139c53adc670 /src/cjrize.sml
parent42c284b9204ef5dfc249cc7273ff2eaa9304e9e6 (diff)
Converting string to int
Diffstat (limited to 'src/cjrize.sml')
-rw-r--r--src/cjrize.sml20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/cjrize.sml b/src/cjrize.sml
index f3e24710..a45cf02d 100644
--- a/src/cjrize.sml
+++ b/src/cjrize.sml
@@ -111,6 +111,12 @@ fun cifyTyp x =
((L'.TDatatype (dk, n, r), loc), sm)
end)
| L.TFfi mx => ((L'.TFfi mx, loc), sm)
+ | L.TOption t =>
+ let
+ val (t, sm) = cify dtmap (t, sm)
+ in
+ ((L'.TOption t, loc), sm)
+ end
in
cify IM.empty x
end
@@ -170,6 +176,20 @@ fun cifyPat ((p, loc), sm) =
in
((L'.PRecord xps, loc), sm)
end
+ | L.PNone t =>
+ let
+ val (t, sm) = cifyTyp (t, sm)
+ in
+ ((L'.PNone t, loc), sm)
+ end
+ | L.PSome (t, p) =>
+ let
+ val (t, sm) = cifyTyp (t, sm)
+ val (p, sm) = cifyPat (p, sm)
+ in
+ ((L'.PSome (t, p), loc), sm)
+ end
+
fun cifyExp (eAll as (e, loc), sm) =
case e of