Mercurial > urweb
diff src/explify.sml @ 156:34ccd7d2bea8
Start of datatype support
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 24 Jul 2008 15:02:03 -0400 |
parents | 7420fa18d657 |
children | 06a98129b23f |
line wrap: on
line diff
--- a/src/explify.sml Thu Jul 24 11:32:01 2008 -0400 +++ b/src/explify.sml Thu Jul 24 15:02:03 2008 -0400 @@ -95,6 +95,8 @@ case sgi of L.SgiConAbs (x, n, k) => SOME (L'.SgiConAbs (x, n, explifyKind k), loc) | L.SgiCon (x, n, k, c) => SOME (L'.SgiCon (x, n, explifyKind k, explifyCon c), loc) + | L.SgiDatatype _ => raise Fail "Explify SgiDatatype" + | L.SgiDatatypeImp _ => raise Fail "Explify SgiDatatypeImp" | L.SgiVal (x, n, c) => SOME (L'.SgiVal (x, n, explifyCon c), loc) | L.SgiStr (x, n, sgn) => SOME (L'.SgiStr (x, n, explifySgn sgn), loc) | L.SgiSgn (x, n, sgn) => SOME (L'.SgiSgn (x, n, explifySgn sgn), loc) @@ -112,6 +114,8 @@ fun explifyDecl (d, loc : EM.span) = case d of L.DCon (x, n, k, c) => SOME (L'.DCon (x, n, explifyKind k, explifyCon c), loc) + | L.DDatatype _ => raise Fail "Explify DDatatype" + | L.DDatatypeImp _ => raise Fail "Explify DDatatypeImp" | L.DVal (x, n, t, e) => SOME (L'.DVal (x, n, explifyCon t, explifyExp e), loc) | L.DValRec vis => SOME (L'.DValRec (map (fn (x, n, t, e) => (x, n, explifyCon t, explifyExp e)) vis), loc)