Skip to content

Instantly share code, notes, and snippets.

@jroesch
Last active October 19, 2016 02:32
Show Gist options
  • Save jroesch/4b2ddd9fa4fea2e1a34f4357ab719618 to your computer and use it in GitHub Desktop.
Save jroesch/4b2ddd9fa4fea2e1a34f4357ab719618 to your computer and use it in GitHub Desktop.
-- imagine pseudo terms like this
-- def id : Pi (A : Type), A -> A := ...
-- irrelevant.fun
irrelevant.fun A Type (fun x, x)
-- irrelevant.fun A Type (fun x, x) => fun x, x
-- application of id
(irrelevant.app (fun x, x) A) 10
-- rule for compilation later on strips type information simply by
-- (irrelevant.app (fun x, x) A) 10 => (fun x, x) 10
-- eq.rec
(irrelevant.eq_rec A C a) (irrelevant.fun a1 A (irrelvant.fun equality (a = a1) term))
-- (irrelevant.eq_rec A C a) (irrelevant.fun a1 A (irrelvant.fun equality (a = a1) term)) => term
-- essentially just keep these extra annotations around until the last level compilation where we strip them
-- and emit bytecode like normal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment