aboutsummaryrefslogtreecommitdiffhomepage
path: root/test-suite/output/Extraction_matchs_2413.out
diff options
context:
space:
mode:
authorGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2010-12-21 11:31:57 +0000
committerGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2010-12-21 11:31:57 +0000
commite3696e15775c44990018d1d4aea01c9bf662cd73 (patch)
tree6f14fb168ffe95ef0dd25984a99e0678f53bd89e /test-suite/output/Extraction_matchs_2413.out
parentb1ae368ec3228f7340076ba0d3bc465f79ed44fa (diff)
Extraction: avoid type-unsafe optimisation of pattern-matchings (fix #2413)
We now keep some type information in the "info" field of constructors and cases, and compact a match with some default branches (or remove this match completely) only if this transformation is type-preserving. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13732 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'test-suite/output/Extraction_matchs_2413.out')
-rw-r--r--test-suite/output/Extraction_matchs_2413.out52
1 files changed, 52 insertions, 0 deletions
diff --git a/test-suite/output/Extraction_matchs_2413.out b/test-suite/output/Extraction_matchs_2413.out
new file mode 100644
index 000000000..7bce6671a
--- /dev/null
+++ b/test-suite/output/Extraction_matchs_2413.out
@@ -0,0 +1,52 @@
+(** val test1 : bool -> bool **)
+
+let test1 b =
+ b
+(** val test2 : bool -> bool **)
+
+let test2 b =
+ False
+(** val wrong_id : 'a1 hole -> 'a2 hole **)
+
+let wrong_id = function
+ | Hole -> Hole
+ | Hole2 -> Hole2
+(** val test3 : 'a1 option -> 'a1 option **)
+
+let test3 o =
+ o
+(** val test4 : indu -> indu **)
+
+let test4 = function
+ | A m -> A (S m)
+ | x -> x
+(** val test5 : indu -> indu **)
+
+let test5 = function
+ | A m -> A (S m)
+ | _ -> B
+(** val test6 : indu' -> indu' **)
+
+let test6 = function
+ | A' m -> A' (S m)
+ | E' -> B'
+ | F' -> B'
+ | _ -> C'
+(** val test7 : indu -> nat option **)
+
+let test7 = function
+ | A m -> Some m
+ | _ -> None
+(** val decode_cond_mode :
+ (word -> opcode option) -> (word -> 'a1 decoder_result) -> word -> ('a1
+ -> opcode -> 'a2) -> 'a2 decoder_result **)
+
+let decode_cond_mode condition f w g =
+ match condition w with
+ | Some oc ->
+ (match f w with
+ | DecUndefined -> DecUndefined
+ | DecUnpredictable -> DecUnpredictable
+ | DecInst i -> DecInst (g i oc)
+ | DecError m -> DecError m)
+ | None -> DecUndefined