Skip to content

Instantly share code, notes, and snippets.

@c-cube
c-cube / stdlib_roadmap.md
Last active August 1, 2017 17:48
plans for OCaml's stdlib

Plans for the future of OCaml's stdlib

One of the most common complaint about OCaml, from both newcomers and veterans, is that the stdlib is lacking in several domains. Among these we can list:

  • some modules are absent but should exist (e.g. Option)
  • some modules are present but lack some functionality (e.g. List could have many more combinators)
  • the lack of some transverse features (iterators, printers, monadic operators…)
  • the lack of generality of some constructs. Notably, in_channel
anonymous
anonymous / Lwt_fmt.ml
Created January 9, 2017 23:29
open Lwt.Infix
type order =
| String of string * int * int
| Flush
let write_order oc = function
| String (s, i, j) ->
Lwt_io.write_from_string_exactly oc s i j
| Flush ->
@hcarty
hcarty / mwt.ml
Created June 24, 2016 19:32
Medium-weight threads?
(* Based on module lwt_preemptive.ml from Lwt which is
* Copyright (C) 2005 Nataliya Guts, Vincent Balat, Jérôme Vouillon
* Laboratoire PPS - CNRS Université Paris Diderot
* 2009 Jérémie Dimino
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, with linking exceptions;
* either version 2.1 of the License, or (at your option) any later version.
* See COPYING file for details.