module FIFO : sig
exception Empty
type 'a t
val empty: 'a t
(* | |
* ocamlbuild -pkg unix assoc_timing.native | |
* | |
* When visiting all keys in an association list, when does it | |
* make sense to build a map first? According to this, | |
* building the map is amortised for list longer than 20 to 30 | |
* elements. | |
*) | |
module Int = struct |
\documentclass[a4paper,12pt]{article} | |
\usepackage{fullpage} | |
\usepackage[latin1]{inputenc} | |
\usepackage{graphicx} | |
\usepackage{xspace} | |
% PDF stuff | |
\ifx\pdfoutput\undefined | |
\else | |
\pdfpagewidth=210mm |
module type Monad = sig | |
type 'a t | |
val return: 'a -> 'a t | |
val bind: 'a t -> ('a -> 'b t) -> 'b t | |
end |
#! /usr/bin/env ruby | |
# | |
# Report code size by OCaml module in a native binary | |
# | |
require 'set' | |
require 'getoptlong' | |
class OCamlModule | |
include Comparable |
{ | |
(* short names for important modules *) | |
module L = Lexing | |
module B = Buffer | |
type token = | |
| STR of string | |
| VAR of string | |
(* | |
* ocamllex bible.mll && ocamlopt -o bible bible.ml | |
* ./bible < bible.txt | |
*) | |
{ | |
module L = Lexing | |
let get = L.lexeme | |
let sprintf = Printf.sprintf |