Skip to content

Instantly share code, notes, and snippets.

View samoht's full-sized avatar
💭
⛵️

Thomas Gazagnaire samoht

💭
⛵️
View GitHub Profile
@samoht
samoht / loc-lambda.diff
Created November 12, 2012 13:38
Location in lambda IR
commit 7c0725871e7dddf8fa9b3000405199cfe96886c3
Author: Thomas Gazagnaire <thomas@gazagnaire.org>
Date: Sun Dec 4 22:53:34 2011 +0100
Add location in lambda code
This is a very preliminary patch as there is just enough change to make everything compile, but location are not propagated through the backend.
Also the Levent are still there.
@samoht
samoht / check_ocamlfind.ml
Last active December 21, 2015 18:19
Check that all the package correctly depend on ocamlfind
(* Run that file at the root of your repository:
ocamlbuild -pkg opam chek_ocamlfind.native --
This will rewrite all the OPAM files to add the missing ocamlfind dependency if needed.
*)
open OpamTypes
module N = OpamPackage.Name
@samoht
samoht / type_error.ml
Last active December 21, 2015 23:39
type error
module type S1 = sig
type t
end
module X = struct
type t = int
let f x = x
end
module type S2 = sig

Keybase proof

I hereby claim:

  • I am samoht on github.
  • I am samoht (https://keybase.io/samoht) on keybase.
  • I have a public key whose fingerprint is 8DD5 2ABD 293E 73E8 FD6E 8992 1A7B D9B2 EA10 4FBB

To claim this, I am signing this object:

module type LIST = (module type of List)
module M (X: sig end) = struct
module K = (val (match Random.int 2 with 0 -> assert false | _ -> (module List)): LIST)
end
open Lwt
open Irmin_unix
let path = IrminStorageConfig.store_path
module Git = IrminGit.FS(struct
let root = Some path
let bare = true
end)
(*---------------------------------------------------------------------------
Copyright (c) 2014 Daniel C. Bünzli. All rights reserved.
Distributed under the BSD3 license, see license at the end of the file.
%%NAME%% release %%VERSION%%
---------------------------------------------------------------------------*)
(** Non-blocking streaming deflate, gzip and zlib codec.
[Deflatem] is a non-blocking streaming codec to
{{!section:decode}decode} and {{!section:encode}encode} the
@samoht
samoht / opam-sources.sh
Last active May 15, 2016 23:01
Gather the sources to build an opam project
#!/usr/bin/env bash
# Instructions. You need:
# - a working opam environment
# - an opam file in your current directory (to describe your project)
# - possibly some packages path-pinned in the current switch
#
# Run the scripts, and then check the contents of sources/
set -eu
@samoht
samoht / opam-package.md
Last active August 19, 2016 14:28
opam package

Managing local packages

OPAM is able to manage local packages.

Commands

The opam package sub-command extracts and uses the fields of a local opam file as it is was a globally available package.

Documentation

@samoht
samoht / opam-bundle.md
Last active August 19, 2016 15:31
Managing development/deployment bundles

Bundles

OPAM can manage development and deployment bundles

Commands

Now that we have compiler-as-packages, switches can come empty by default. OPAM 2.0 adds a new mechanism to handle set of packages, called bundles.

Switch bundle