Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
67e1f95
commit 28b005c
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
operation hippy 0 | ||
|
||
let rec prodify xs t = | ||
match xs with | ||
| [] => t | ||
| (|- ?x : ?u) :: ?xs => | ||
let t' = forall y : u, (t where x = y) in | ||
prodify xs t' | ||
end | ||
|
||
let rec apply head es = | ||
match es with | ||
| [] => head | ||
| ?e :: ?es => apply (head e) es | ||
end | ||
|
||
handle | ||
hippy : t => | ||
match t with | ||
| None => Type | ||
| Some ?t => | ||
let xs = context in | ||
let t_abs = prodify xs t in | ||
assume hippy : t_abs in | ||
apply hippy (rev xs) | ||
end | ||
end |