Skip to content

Instantly share code, notes, and snippets.

View trefis's full-sized avatar

Thomas Refis trefis

View GitHub Profile
@trefis
trefis / unstaged.diff
Created February 17, 2020 17:08
suggested changes on #9309
diff --git a/typing/typecore.ml b/typing/typecore.ml
index c2cd2653e..d2bb6de46 100644
--- a/typing/typecore.ml
+++ b/typing/typecore.ml
@@ -1056,7 +1056,7 @@ and counter_example_checking_info = {
of the original names.
*)
-(** Due to GADT constraints, an or-pattern produced within
+(** Due to empty types and GADT constraints, an or-pattern produced within
--- ok
+++ ko
@@@@@@@@@@ -1,137 +1,137 @@@@@@@@@@
$1: Types.type_expr =
{desc =
Tarrow (Nolabel,
{desc =
-| Tconstr (Pident (Ident.Local {Ident.name = "range"; stamp = 102}),
+| Tconstr (Pident (Ident.Local {Ident.name = "range"; stamp = 109}),
[{desc =
$ cat lol2.sexp
((a 11111 x) (aa 11111 tot) (aaa 11111 a) (aaaa 112111 a) (aaaaa 11111111 a) (aaaaaa 11111 a) (aaaaaaa 11111 a) (aaaaaaaa 1111 a) (aaaaaaaaa 111 a) (aaaaaaaaaa 11 a) (aaaaaaaaaaa 1))
$ cat lol2.sexp | sexp pp
((a 11111 x)
(aa 11111 tot)
(aaa 11111 a)
(aaaa 112111 a)
(aaaaa 11111111 a)
(aaaaaa 11111 a)
(aaaaaaa 11111 a)
$ cat repro.t
First comment
$ echo toto
onoes
Second comment (dropped)
$ echo titi
woops
diff --git a/Makefile b/Makefile
index 40c60d7ae..9c7df1c82 100644
--- a/Makefile
+++ b/Makefile
@@ -57,15 +57,15 @@ CAMLRUN ?= boot/ocamlrun
CAMLYACC ?= boot/ocamlyacc
include stdlib/StdlibModules
-CAMLC=$(CAMLRUN) boot/ocamlc -g -nostdlib -I boot -use-prims byterun/primitives
-CAMLOPT=$(CAMLRUN) ./ocamlopt -g -nostdlib -I stdlib -I otherlibs/dynlink
@trefis
trefis / gist:4b8a634bb92adb3849becdf56acb9fb9
Created March 8, 2018 11:42
make world.opt with -dtimings
The average total compilation time moved from 82.327s to 82.543s
The average total typing time moved from 46.690s to 46.842s
┌───────────────────────────────────────────────────────────┬───────────────────────────┬──────────────────────────────────┬──────┐
│ file │ -dtimings world.opt trunk │ -dtimings world.opt disambiguate │ runs │
├───────────────────────────────────────────────────────────┼───────────────────────────┼──────────────────────────────────┼──────┤
│ actions.ml (total) │ 0.030s │ 0.029s │ 20 │
│ actions.ml (typing) │ 0.018s │ 0.018s │ 20 │
│ actions.mli (total) │ 0.008s │ 0.008s │ 10 │
│ actions.mli (typing) │ 0.004s │
let run f =
try f ()
with exn ->
match exn with
| x -> (* disable reraise *)
raise x
let () =
run (fun () -> raise Exit)
diff --git a/stdlib/Compflags b/stdlib/Compflags
index 0f7b922..a29e8e1 100755
--- a/stdlib/Compflags
+++ b/stdlib/Compflags
@@ -20,10 +20,10 @@ case $1 in
camlinternalOO.cmx|camlinternalOO.p.cmx) echo ' -inline 0';;
buffer.cmx|buffer.p.cmx) echo ' -inline 3';;
@trefis
trefis / compl.el
Created February 9, 2017 10:45
helm - merlin
(eval-after-load 'j-merlin
'(progn
(require 'dabbrev)
(defun merlin-try-completion ()
"Perform completion at point with merlin via completing-read."
(interactive)
(lexical-let*
((bounds (merlin/completion-bounds))
(start (car bounds))
(end (cdr bounds))
open Memprof
open Printexc
open ListLabels
(* Data structures *)
let min_buf_size = 1024
let empty_ephe = Ephemeron.K1.create ()
let samples = ref (Array.make min_buf_size empty_ephe)
let n_samples = ref 0