X-Git-Url: http://git.megacz.com/?p=coq-hetmet.git;a=blobdiff_plain;f=src%2FHaskFlattener.v;h=b3523985d74df8d979a3d6985cd243a02de391a4;hp=59636bf87830880d016ab7372c6f2629a4cd453f;hb=3161a8a65cb0190e83d32bde613c3b64dfe31739;hpb=83ea5d8ef61c6a711a411a198f61f2a359ce0cba;ds=sidebyside diff --git a/src/HaskFlattener.v b/src/HaskFlattener.v index 59636bf..b352398 100644 --- a/src/HaskFlattener.v +++ b/src/HaskFlattener.v @@ -1196,8 +1196,26 @@ Section HaskFlattener. reflexivity. destruct case_RCase. - simpl. - apply (Prelude_error "Case not supported (BIG FIXME)"). + destruct lev; [ idtac | apply (Prelude_error "case at depth >0") ]; simpl. + apply nd_rule. + rewrite <- mapOptionTree_compose. + replace (mapOptionTree + (fun x => flatten_judgment (pcb_judg (snd x))) + alts,, [Γ > Δ > mapOptionTree flatten_leveled_type Σ |- [flatten_type (caseType tc avars)] @ nil]) + with + (mapOptionTree + (fun x => @pcb_judg tc Γ Δ nil (flatten_type tbranches) avars (fst x) (snd x)) + alts,, + [Γ > Δ > mapOptionTree flatten_leveled_type Σ |- [caseType tc avars] @ nil]). + replace (mapOptionTree flatten_leveled_type + (mapOptionTreeAndFlatten + (fun x => (snd x)) alts)) + with (mapOptionTreeAndFlatten + (fun x => + (snd x)) alts). + apply RCase. + admit. + admit. destruct case_SBrak. simpl.