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
(* Fun with behavioral types. Inspired by https://hal.archives-ouvertes.fr/hal-01216310 *) | |
exception LinearityViolation | |
module type Ref = | |
sig | |
type ('a, 'b) ref constraint 'b = [>] | |
(* 'b is the behavioural type variable *) | |
val ref : 'a -> ('a, 'b) ref |
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
(* Fun with behavioral types. Inspired by https://hal.archives-ouvertes.fr/hal-01216310 *) | |
module type Ref = | |
sig | |
type ('a, 'b) ref constraint 'b = [>] | |
(* 'b is the behavioural type variable *) | |
val ref : 'a -> ('a, 'b) ref | |
val read : ('a, [`Read of 'b]) ref -> 'a * ('a, 'b) ref | |
(* Require `Read capability. 'b is the continuation's behavior. *) |
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
(* Fun with behavioral types. Inspired by https://hal.archives-ouvertes.fr/hal-01216310 *) | |
type ('a,'b) test_result = True of 'a | False of 'b | |
module type Ref = | |
sig | |
type ('a, 'b) ref constraint 'b = [>] | |
(* 'b is the behavioural type variable *) | |
val ref : 'a -> ('a, 'b) ref |
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
FROM ocaml/opam:raspbian-8_ocaml-4.02.3 | |
RUN opam remote add main https://opam.ocaml.org | |
RUN opam pin add -y merlin https://github.com/the-lambda-church/merlin.git#reason-0.0.1 | |
RUN opam pin add -y merlin_extend https://github.com/let-def/merlin-extend.git#reason-0.0.1 | |
RUN opam pin add -y reason https://github.com/facebook/reason.git#0.0.6 |
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
diff --git a/boot/ocamlc b/boot/ocamlc | |
index 6c7ba14..c063309 100755 | |
Binary files a/boot/ocamlc and b/boot/ocamlc differ | |
diff --git a/boot/ocamldep b/boot/ocamldep | |
index 29ad003..26935c5 100755 | |
Binary files a/boot/ocamldep and b/boot/ocamldep differ | |
diff --git a/boot/ocamllex b/boot/ocamllex | |
index 2e40046..5da3c7e 100755 | |
Binary files a/boot/ocamllex and b/boot/ocamllex differ | |
diff --git a/byterun/addrmap.c b/byterun/addrmap.c |
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
module type Applicative = sig | |
type 'a t | |
val pure : 'a -> 'a t | |
val (<*>) : ('a -> 'b) t -> 'a t -> 'b t | |
end | |
module type Promise = sig | |
include Applicative | |
val fork : (unit -> 'a) -> 'a t | |
val get : 'a t -> ('a, exn) result |
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
module type Arrow = | |
sig | |
type ('a,'b) t | |
val arr : ('a -> 'b) -> ('a, 'b) t | |
val (>>>) : ('a,'b) t -> ('b,'c) t -> ('a,'c) t | |
val first : ('a,'b) t -> ('a * 'c, 'b * 'c) t | |
end | |
module type Arrow_choice = | |
sig |
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
module type Arrow = | |
sig | |
type ('a,'b) t | |
val arr : ('a -> 'b) -> ('a, 'b) t | |
val (>>>) : ('a,'b) t -> ('b,'c) t -> ('a,'c) t | |
val first : ('a,'b) t -> ('a * 'c, 'b * 'c) t | |
end | |
module type Arrow_choice = | |
sig |
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
module type Arrow = | |
sig | |
type ('a,'b) t | |
val arr : ('a -> 'b) -> ('a, 'b) t | |
val (>>>) : ('a,'b) t -> ('b,'c) t -> ('a,'c) t | |
val first : ('a,'b) t -> ('a * 'c, 'b * 'c) t | |
end | |
module type Arrow_choice = | |
sig |
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
#lang racket | |
(require redex) | |
(define-language L | |
(e (e e) | |
(λ (x t) e) | |
x | |
(amb e ...) | |
number | |
(+ e ...) |