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
let asprintf_nm x = | |
let open Format in | |
let fns = get_formatter_out_functions () in | |
try | |
set_formatter_out_functions {fns with out_newline = Fun.const () ; out_indent = Fun.const ()}; | |
asprintf x | |
with exn -> | |
set_formatter_out_functions fns; | |
raise exn |
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
Fatal error: exception Vendor.Helpers.InvalidReference("unknown qualifier `(-'") | |
Raised at file "vendor/odoc_parser/helpers.ml", line 28, characters 14-72 | |
Called from file "vendor/odoc_parser/helpers.ml", line 258, characters 28-47 | |
Called from file "vendor/odoc_parser/syntax.ml", line 138, characters 47-71 | |
Called from file "vendor/odoc_parser/syntax.ml", line 340, characters 20-66 | |
Called from file "vendor/odoc_parser/syntax.ml", line 358, characters 16-34 | |
Called from file "vendor/odoc_parser/syntax.ml", line 365, characters 17-54 | |
Called from file "vendor/odoc_parser/syntax.ml", line 727, characters 18-33 | |
Called from file "vendor/odoc_parser/syntax.ml", line 1103, characters 6-71 | |
Called from file "vendor/odoc_parser/error.ml", line 62, characters 9-15 |
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
type k = [ `A of int | `B of string | `Ks of (string fn * k) list ] | |
and 'a fn = 'a -> k -> bool | |
(* Error: In the definition of k, type string fn should be 'a fn *) |
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 Foo : sig | |
type t = private [ `A | `B ] | |
end = struct | |
type t = [ `A ] | |
end |
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
type a = [ `A of int ] | |
type b = [ a | `B of int ] | |
let pair (a : a) (b : b) = ([a] :> b list) @ [b] (* works fine *) | |
module type Config = sig type t end | |
module type Box = sig | |
module C : Config | |
type t = { regions : C.t list } |
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
(****** works ******) | |
type foo = [`A of int | `B of int] | |
module type K = sig | |
type t | |
val value: t -> int | |
end | |
module J (K: K) = struct | |
let value = K.value | |
end | |
module FooJ = J(struct |
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
type _ foo = | |
| A : int -> int foo | |
| B : int -> int foo | |
module FooSet = Set.Make(struct | |
type t | |
let compare a b = | |
let a' = match a with A x -> x | B x -> x in | |
let b' = match b with A x -> x | B x -> x in | |
Pervasives.compare a' b' | |
end) |
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
let rec sweep responsibility t = | |
let neighbors = of_list t.members | |
|> filter (G.bounds %> extentEligible) | |
|> filter (distinct seenMembers G.bounds) in | |
|> persistent | |
if not @@ is_empty neighbors | |
then neighbors | |
else do_something_else |
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
open Containers | |
let _ = let lst = [1;2;3] in | |
let open Sequence in | |
let open Format in | |
let s = of_list lst in | |
if not @@ is_empty s | |
then print_endline "not empty"; | |
Format.printf "%a" (List.pp pp_print_int) (to_list s) | |
(* |
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
image: ocaml/opam2:ubuntu-lts | |
stages: | |
- build | |
- test | |
build: | |
# https://docs.gitlab.com/ee/ci/yaml/#cache | |
stage: build | |
cache: |
NewerOlder