Mercurial > urweb
diff src/cjrize.sml @ 640:63b0bcacd535
RPC returning a default datatype
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 08 Mar 2009 13:28:21 -0400 |
parents | 56aaa1941dad |
children | aa2290c32ce2 |
line wrap: on
line diff
--- a/src/cjrize.sml Sun Mar 08 12:54:07 2009 -0400 +++ b/src/cjrize.sml Sun Mar 08 13:28:21 2009 -0400 @@ -544,15 +544,20 @@ let val (dop, pop, sm) = cifyDecl (d, sm) + val dsF = case dop of + SOME (L'.DDatatype (dk, x, n, _), loc) => + (L'.DDatatypeForward (dk, x, n), loc) :: dsF + | _ => dsF + + val dsF = map (fn v => (L'.DStruct v, ErrorMsg.dummySpan)) (Sm.declares sm) + @ dsF + val (dsF, ds) = case dop of NONE => (dsF, ds) | SOME (d as (L'.DDatatype _, loc)) => (d :: dsF, ds) | SOME d => (dsF, d :: ds) - val dsF = map (fn v => (L'.DStruct v, ErrorMsg.dummySpan)) (Sm.declares sm) - @ dsF - val ps = case pop of NONE => ps | SOME p => p :: ps