Skip to content

Instantly share code, notes, and snippets.

open Import
open Jbuild
type scope =
{ mutable libs : Lib.Internal.t String_map.t
; scope : Scope.t
}
type t =
{ findlib : Findlib.t
(rule (with-stdout-to html_sigs.ml
(progn
(echo "[@@@warning \"-a\"]\nmodule rec HACK : sig\n")
(cat html_sigs.mli)
(echo "\nend = HACK\ninclude HACK\n"))))
-*- mode: compilation; default-directory: "~/reps/ml/tyxml/" -*-
Compilation started at Tue Jul 11 13:42:41
jbuilder build
Warning: Module Xml_sigs in lib doesn't have a corresponding .ml file.
Modules without an implementation are not recommended, see this discussion:
https://github.com/janestreet/jbuilder/issues/9
In the meantime I'm implicitely adding this rule:
jbuilder build lib_test/test_glob.exe
ocamldep lib_test/test_glob.depends.ocamldep-output
ocamldep lib_test/fort_unit.depends.ocamldep-output
ocamldep lib/re.dependsi.ocamldep-output
ocamlc lib/re_cset.{cmi,cmti}
ocamlc lib/re_str.{cmi,cmti}
ocamlc lib/re.{cmi,cmti}
ocamlc lib/re_emacs.{cmi,cmti}
ocamldep lib/re.depends.ocamldep-output
ocamlc lib/re_automata.{cmi,cmti}
drop : ∀{l}{A : Set l}(n : ℕ) -> List A -> List A
drop zero xs = xs
drop (suc n) xs = drop n xs
#!/home/rgrinberg/miniconda3/bin/python
if __name__ == '__main__':
import sys
import pip
sys.exit(pip.main())
mapM' :: Monad m => (a -> m b) -> [a] -> m [b]
mapM' _ [] = return []
mapM' f (x : xs) = do
y <- f x
ys <- mapM' f xs
return (y : ys)
mapM'' :: Monad m => (a -> m b) -> [a] -> m [b]
mapM'' _ [] = return []
mapM' :: Monad m => (a -> m b) -> [a] -> m [b]
mapM' _ [] = return []
mapM' f (x : xs) = do
y <- f x
ys <- mapM' f xs
return (y : ys)
mapM'' :: Monad m => (a -> m b) -> [a] -> m [b]
mapM'' _ [] = return []
mapM' :: Monad m => (a -> b m) -> [a] -> m [b]
mapM' _ [] = return []
mapM' (x : xs) f = do
y <- f x
ys <- mapM' xs f
return (y : ys)
open Core.Std
let compress s =
let (r, w) = Unix.pipe () in
let w = Unix.out_channel_of_descr w in
let gz = Gzip.open_out_chan w in
Gzip.output gz s 0 (String.length s);
Gzip.close_out gz;