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 Abstract_value : | |
sig | |
type t | |
val create : unit -> t | |
end = | |
struct | |
type t = unit -> unit | |
let create () = |
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
(* | |
Compile with: | |
ocamlfind opt -package ketrew -thread -linkpkg k4people.ml -o k4people | |
*) | |
open Nonstd | |
let (//) = Filename.concat |
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
#use "topfind";; | |
#thread;; | |
#require "ketrew";; | |
open Nonstd | |
module String = Sosa.Native_string | |
let escape_blob s = | |
let b = Buffer.create (String.length s * 2 + 4) in | |
Buffer.add_string b "X'"; | |
String.iter s ~f:(fun c -> |
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
#!/bin/bash | |
# | |
# Copyright (c) 2006 by Sebastien Mondet. | |
# | |
# Permission to use, copy, modify, and distribute this software for any | |
# purpose with or without fee is hereby granted, provided that the above | |
# copyright notice and this permission notice appear in all copies. | |
# |
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
#! /bin/sh | |
SCRIPT_NAME=$(basename $0) | |
short_usage() | |
{ | |
echo "Cf : $SCRIPT_NAME [--help]" | |
} | |
long_usage() | |
{ |
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
(add-to-list 'sebs-packages 'tuareg) | |
(setq opam-share | |
(substring | |
(shell-command-to-string "opam config var share 2> /dev/null") 0 -1)) | |
(add-to-list 'load-path (concat opam-share "/emacs/site-lisp")) | |
(require 'merlin) | |
(setq ocp-indent-config "strict_with=always,with=0,strict_comments=false") | |
(require 'ocp-indent) | |
(add-to-list 'auto-mode-alist '("\\.eliom" . tuareg-mode)) |
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
" ### Ocaml | |
" Get the opam directories: | |
let opam_prefix_ = system('echo -n "$(opam config var prefix)"') | |
let opam_prefix = substitute(opam_prefix_,'^\s*\(.\{-}\)\s*$', '\1', '') " This strips the string | |
" #### merlin | |
if filereadable(opam_prefix . '/share/ocamlmerlin/vim/doc/merlin.txt') | |
exec 'set rtp+=' . opam_prefix . '/share/ocamlmerlin/vim' | |
exec 'set rtp+=' . opam_prefix . '/share/ocamlmerlin/vimbufsync' | |
exec 'helptags ' . opam_prefix . '/share/ocamlmerlin/vim/doc' |
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 (_,_) safety = Safe : ('a,'a option) safety | Unsafe : ('a,'a) safety | |
let ios: type a. (int, a) safety -> string -> a = fun safety s -> | |
match safety with | |
| Safe -> (try Some (int_of_string s) with _ -> None) | |
| Unsafe -> int_of_string s | |
let () = | |
assert (ios Safe "dskljf" = None); |
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
(*D | |
Trying CConv | |
============ | |
See | |
[`c-cube/cconv`](https://github.com/c-cube/cconv) | |
For now, it is experimental: |
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
# example .ensime generation | |
# Maven to Ensime config. convertor: | |
# | |
# Prints .ensime configuration for Maven project. | |
# | |
# USAGE: | |
# mvn-ensime PROJECT_NAME PROJECT_PACKAGE ROOT_DIR TARGET_DIR SOURCE_DIRS* | |
# | |
python mvn-ensime.py adam org.bdgenomics.adam \ |