Skip to content

Instantly share code, notes, and snippets.

View olleharstedt's full-sized avatar

Olle Härstedt olleharstedt

View GitHub Profile
@karlhorky
karlhorky / pr.md
Last active November 2, 2023 13:44 — forked from piscisaureus/pr.md
Fetch all GitHub pull requests to local tracking branches

NOTE

You may not need local branches for all pull requests in a repo.

To fetch only the ref of a single pull request that you need, use this:

git fetch origin pull/7324/head:pr-7324
git checkout pr-7324
# ...
@NicolasT
NicolasT / nel.ml
Last active May 28, 2019 18:48
Playing with OCaml GADTs
type z
type 'a s
(* Sadly enough, without kind restrictions, this still allows nonsense types like *)
type nonsense = int s
(* GHC 7.6 supports this (lifting types to kinds & kind constraints) ;-) *)
type (_, _) llist =
| Nil : (z, 'a) llist
| Cons : ('a * ('l, 'a) llist) -> ('l s, 'a) llist