Created
November 17, 2019 02:38
-
-
Save leque/2c716b25e791dd84b04b990ad9044dd3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Extraction. | |
Inductive list (A : Type) : Type := | |
| nil : list A | |
| cons : A -> list A -> list A. | |
CoInductive Stream (A : Type) := | |
Cons : A -> Stream A -> Stream A. | |
Extraction Language Haskell. | |
Extraction list. | |
Extraction Stream. | |
(* -> | |
data List a = | |
Nil | |
| Cons a (List a) | |
data Stream a = | |
Cons a (Stream a) | |
*) | |
Extraction Language OCaml. | |
Extraction list. | |
Extraction Stream. | |
(* -> | |
type 'a list = | |
| Nil | |
| Cons of 'a * 'a list | |
type 'a stream = 'a __stream Lazy.t | |
and 'a __stream = | |
| Cons of 'a * 'a stream | |
*) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment