-
-
Save joom/6f7ab1d3bc840839b993c241a5f29cd1 to your computer and use it in GitHub Desktop.
Coq extraction in separate modules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Inductive color := red | green | blue. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Require Import A. | |
Definition next_color (c : color) := | |
match c with | |
| red => green | |
| green => blue | |
| blue => red | |
end. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Require Import A. | |
Definition prev_color (c : color) := | |
match c with | |
| red => blue | |
| green => red | |
| blue => green | |
end. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Require Import A. | |
Require Import B. | |
Require Import C. | |
Require Extraction. | |
Extraction Language Haskell. | |
Extraction Library A. | |
Extraction Library B. | |
Extraction Library C. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is the result:
A.hs:
B.hs:
C.hs: