Skip to content

Instantly share code, notes, and snippets.

@sjoerdvisscher
Created March 20, 2010 10:43
Show Gist options
  • Save sjoerdvisscher/338607 to your computer and use it in GitHub Desktop.
Save sjoerdvisscher/338607 to your computer and use it in GitHub Desktop.
Type level Fin
data Z = Z
newtype S n = S n
data family Fin n a b :: *
data instance Fin (S n) n Z = FZ
newtype instance Fin (S n) a (S b) = FS (Fin (S n) (S a) b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment