aboutsummaryrefslogtreecommitdiff
path: root/theories/extraction/ExtrHaskellBasic.v
diff options
context:
space:
mode:
authorThéo Zimmermann2020-02-18 19:47:40 +0100
committerThéo Zimmermann2020-02-18 19:47:40 +0100
commitf208f65ee8ddb40c9195b5c06475eabffeae0401 (patch)
tree3f6e5d9f1c1bffe3e4187131f87d3187a8d9ebe5 /theories/extraction/ExtrHaskellBasic.v
parentaf3fd09e2f0cc2eac2bc8802a6818baf0c184563 (diff)
parent83052eff43d3eeff96462286b69249ef868bf5f0 (diff)
Merge PR #11529: [build] Consolidate stdlib's .v files under a single directory.
Reviewed-by: Zimmi48
Diffstat (limited to 'theories/extraction/ExtrHaskellBasic.v')
-rw-r--r--theories/extraction/ExtrHaskellBasic.v17
1 files changed, 17 insertions, 0 deletions
diff --git a/theories/extraction/ExtrHaskellBasic.v b/theories/extraction/ExtrHaskellBasic.v
new file mode 100644
index 0000000000..d08a81da64
--- /dev/null
+++ b/theories/extraction/ExtrHaskellBasic.v
@@ -0,0 +1,17 @@
+(** Extraction to Haskell : use of basic Haskell types *)
+
+Require Coq.extraction.Extraction.
+
+Extract Inductive bool => "Prelude.Bool" [ "Prelude.True" "Prelude.False" ].
+Extract Inductive option => "Prelude.Maybe" [ "Prelude.Just" "Prelude.Nothing" ].
+Extract Inductive unit => "()" [ "()" ].
+Extract Inductive list => "([])" [ "([])" "(:)" ].
+Extract Inductive prod => "(,)" [ "(,)" ].
+
+Extract Inductive sumbool => "Prelude.Bool" [ "Prelude.True" "Prelude.False" ].
+Extract Inductive sumor => "Prelude.Maybe" [ "Prelude.Just" "Prelude.Nothing" ].
+Extract Inductive sum => "Prelude.Either" [ "Prelude.Left" "Prelude.Right" ].
+
+Extract Inlined Constant andb => "(Prelude.&&)".
+Extract Inlined Constant orb => "(Prelude.||)".
+Extract Inlined Constant negb => "Prelude.not".