Settings: System Preferences » Keyboard » Key Repeat/Delay Until Repeat
Use the commands below to increase the key repeat rate on macOS beyond the possible settings via the user interface. The changes aren't applied until you restart your computer.
open Core_kernel | |
module Ast = struct | |
type ident = string [@@deriving compare, hash, sexp] | |
type t = | |
| Var of ident | |
| Int of int | |
| Let of ident * t * t | |
| App of ident * t list |
type ('a,'r) iter = | |
| Done of 'r | |
| Cont of ('a option -> ('a,'r) iter) | |
let head = let k x = Done x in Cont k | |
let len () = | |
let rec k acc x = |
Settings: System Preferences » Keyboard » Key Repeat/Delay Until Repeat
Use the commands below to increase the key repeat rate on macOS beyond the possible settings via the user interface. The changes aren't applied until you restart your computer.
type 'a printer = Format.formatter -> 'a -> unit | |
let inspect (pp : 'a printer) = | |
Format.(kfprintf (fun f -> pp_print_newline f ()) std_formatter "%a" pp) | |
let print ?(channel=stdout) fmt = | |
let f = Format.formatter_of_out_channel channel in | |
Format.(kfprintf (fun f -> pp_print_newline f ()) f fmt) | |
let int_to_bin_byte d = | |
if d < 0 then invalid_arg "bin_of_int" else | |
if d = 0 then "0" else | |
let rec aux acc d = | |
if d = 0 then acc else | |
aux (string_of_int (d land 1) :: acc) (d lsr 1) | |
in | |
let res = String.concat "" (aux [] d) in | |
if String.length res mod 8 <> 0 then | |
String.make (8 - String.length res mod 8) '0' ^ res |
type property = string | |
(** Logic subsumption type: p |= q *) | |
type t = (property → property → bool) | |
(** Converts a property to a string representation. *) | |
let string_of_property p = p | |
module Continuation : sig | |
type ('a, 'r) t = ('a -> 'r) -> 'r | |
val return : 'a -> ('a, 'r) t | |
val (>>=) : ('a, 'r) t -> ('a -> ('b, 'r) t) -> ('b, 'r) t | |
end = struct | |
type ('a, 'r) t = ('a -> 'r) -> 'r | |
let return x = fun k -> k x |
# Build image | |
FROM node:10.13-alpine as build | |
# Prepare the environment to install esy. | |
RUN apk add --no-cache \ | |
ca-certificates wget \ | |
bash curl perl-utils \ | |
git patch gcc g++ musl-dev make m4 |
Query commands are:
-start <position> Where analysis starts
-end <position> Where analysis ends
When the range determined by (-start, -end) positions is an expression, this command replaces it with [match expr with _] expression where a branch is introduced for each immediate value constructor of the type that was determined for expr. When it is a variable pattern, it is further expanded and new branches are introduced for each possible immediate constructor of this variable.
(* Helper definitions *) | |
let pass = fun () -> () | |
let output_line str chan = | |
Pervasives.output_string chan (str ^ "\n") | |
let open_in path = | |
print (format "> open_in %s" path); |