(let
'(init_value, reachable) :=
match entrypoints.(Script_typed_ir.entrypoints_node.at_node) with
| Some e =>
((Map.Make Alpha_context.Entrypoint.T).(S.singleton)
e.(Script_typed_ir.entrypoint_info.name) tt, true)
| None => ((Map.Make Alpha_context.Entrypoint.T).(S.empty), false)
end in
let? ' (first_unreachable, all)
๐
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
section | |
abbrev Stack := List Int | |
def nAdd (s : Stack) (pc : Nat) : Stack ร Nat := | |
match s with | |
| [] => ([], pc) | |
| x :: [] => ([x], pc) | |
| x :: y :: xs => ((x + y) :: xs, pc + 1) | |
def nSub (s : Stack) (pc : Nat) : Stack ร Nat := |
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
// update cab destination and person_id | |
nearest_cab.update_destination(Some(person.location.clone())); | |
nearest_cab.update_person_id(ObjectId::parse_str(person_id).ok()); | |
// update cab by using `assign_person` | |
let cab_id = match nearest_cab.id { | |
Some(obj_id) => obj_id.to_hex(), | |
None => panic!("cannot get the cab id"), | |
}; | |
let update_result = db.assign_person(&cab_id, nearest_cab.clone()); | |
// return result as person and cab tuple |
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
// find the nearest cab in the fleet from the person | |
let mut nearest_cab = fleet | |
.into_iter() | |
.filter(|x| is_free((*x).clone()).is_ok()) | |
.reduce(|c1, c2| person.nearest_cab(&c1, &c2)) | |
.and_then(|x| Some(x.clone())) | |
.expect("Unable to get the nearest cab"); |
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
// find the nearest cab in the fleet from the person | |
let mut nearest_cab = fleet | |
.into_iter() | |
.reduce(|c1, c2| person.nearest_cab(&c1, &c2)) | |
.and_then(|x| Some(x.clone())) | |
.expect("Unable to get the nearest cab"); | |
// check if the cab is assigned or not | |
match is_free(nearest_cab.clone()) { | |
Ok(_) => { |
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
diff --git a/src/sexp_conv.ml b/src/sexp_conv.ml | |
index ed2becf..406ee73 100644 | |
--- a/src/sexp_conv.ml | |
+++ b/src/sexp_conv.ml | |
@@ -110,7 +110,7 @@ module Exn_converter = struct | |
end | |
let exn_id_map | |
- : (Obj.Extension_constructor.t, Registration.t) Ephemeron.K1.t Exn_ids.t ref | |
+ : (Obj.Extension_constructor.t * Registration.t) Exn_ids.t ref |
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
# /etc/systemd/system/minecraft-server.service | |
[Unit] | |
Description=Minecraft Server | |
[Service] | |
WorkingDirectory=/root/minecraft-server | |
ExecStart=/usr/bin/java -Xmx6G -Xms4G -jar /root/minecraft-server/server.jar nogui | |
Restart=on-failure | |
RestartSec=5 |
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
diff --git a/ast/supported_version/supported_version.ml b/ast/supported_version/supported_version.ml | |
index b90d7e8..1cd4373 100644 | |
--- a/ast/supported_version/supported_version.ml | |
+++ b/ast/supported_version/supported_version.ml | |
@@ -13,6 +13,7 @@ let all = | |
; 4, 11 | |
; 4, 12 | |
; 4, 13 | |
+ ; 4, 14 | |
] |
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
(define (append* . args) | |
(map (lambda (x) (if (list? x) (car x) x)) (apply append args)) | |
) | |
(define (append-map proc lst) (apply append (map proc lst))) |