comparison 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
comparison
equal deleted inserted replaced
639:9da62680adc5 640:63b0bcacd535
542 let 542 let
543 val (dsF, ds, ps, sm) = foldl (fn (d, (dsF, ds, ps, sm)) => 543 val (dsF, ds, ps, sm) = foldl (fn (d, (dsF, ds, ps, sm)) =>
544 let 544 let
545 val (dop, pop, sm) = cifyDecl (d, sm) 545 val (dop, pop, sm) = cifyDecl (d, sm)
546 546
547 val dsF = case dop of
548 SOME (L'.DDatatype (dk, x, n, _), loc) =>
549 (L'.DDatatypeForward (dk, x, n), loc) :: dsF
550 | _ => dsF
551
552 val dsF = map (fn v => (L'.DStruct v, ErrorMsg.dummySpan)) (Sm.declares sm)
553 @ dsF
554
547 val (dsF, ds) = case dop of 555 val (dsF, ds) = case dop of
548 NONE => (dsF, ds) 556 NONE => (dsF, ds)
549 | SOME (d as (L'.DDatatype _, loc)) => 557 | SOME (d as (L'.DDatatype _, loc)) =>
550 (d :: dsF, ds) 558 (d :: dsF, ds)
551 | SOME d => (dsF, d :: ds) 559 | SOME d => (dsF, d :: ds)
552
553 val dsF = map (fn v => (L'.DStruct v, ErrorMsg.dummySpan)) (Sm.declares sm)
554 @ dsF
555 560
556 val ps = case pop of 561 val ps = case pop of
557 NONE => ps 562 NONE => ps
558 | SOME p => p :: ps 563 | SOME p => p :: ps
559 in 564 in