Skip to content

Instantly share code, notes, and snippets.

Avatar

Olle Härstedt olleharstedt

View GitHub Profile
@karlhorky
karlhorky / pr.md
Last active March 14, 2023 18:57 — forked from piscisaureus/pr.md
Fetch all GitHub pull requests to local tracking branches
View pr.md

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
View nel.ml
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