git checkout -b <branchname>
git add
git commit -m "description of changes"
| (* Simple weak array benchmark that mirrors original hugebench structure *) | |
| let enable_hugepages () = | |
| let ch = open_in "/proc/self/maps" in | |
| let module Syscall = struct | |
| external madvise : (int64[@unboxed]) -> (int64[@unboxed]) -> (int[@untagged]) -> (int[@untagged]) = | |
| "unimplemented" "madvise" | |
| end in | |
| try | |
| while true do |
| ``` | |
| OCaml compilation pipeline | |
| ┌────────────────┐ | |
| │ │ | |
| │ Source code │ |
| {-# LANGUAGE ConstraintKinds #-} | |
| {-# LANGUAGE DeriveGeneric #-} | |
| {-# LANGUAGE FlexibleContexts #-} | |
| {-# LANGUAGE FlexibleInstances #-} | |
| {-# LANGUAGE MultiParamTypeClasses #-} | |
| {-# LANGUAGE PartialTypeSignatures #-} | |
| {-# LANGUAGE TemplateHaskell #-} | |
| {-# LANGUAGE TypeApplications #-} | |
| {-# LANGUAGE TypeFamilies #-} |
This gist is a fork of the gist from this blog post.
| Today we'll be looking into Kmett's | |
| [adjunctions](http://hackage.haskell.org/package/adjunctions) library, | |
| particularly the meat of the library in Data.Functor.Adjunction. | |
| This post is a literate haskell file, which means you can load it right up in | |
| ghci and play around with it! Like any good haskell file we need half a dozen | |
| language pragmas and imports before we get started. | |
| > {-# language DeriveFunctor #-} | |
| > {-# language TypeFamilies #-} |