diff options
author | Eduardo Julian | 2017-11-13 20:02:18 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-11-13 20:02:18 -0400 |
commit | 2a3946e713821880ecc47580e754315349f2fe73 (patch) | |
tree | 7c32a522dff9d09293a5265baa968bc04137c944 /new-luxc/source/luxc/base.lux | |
parent | ca297162d5416a8c7b8af5f27757900d82d3ad03 (diff) |
- Type-vars no longer get deleted.
- Fixed some bugs.
Diffstat (limited to 'new-luxc/source/luxc/base.lux')
-rw-r--r-- | new-luxc/source/luxc/base.lux | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/new-luxc/source/luxc/base.lux b/new-luxc/source/luxc/base.lux index 580f5593f..c7768cd8c 100644 --- a/new-luxc/source/luxc/base.lux +++ b/new-luxc/source/luxc/base.lux @@ -63,6 +63,18 @@ (#e;Success [(set@ #;type-context context' compiler) output])))) +(def: #export (with-fresh-type-env action) + (All [a] (-> (Meta a) (Meta a))) + (function [compiler] + (let [old (get@ #;type-context compiler)] + (case (action (set@ #;type-context tc;fresh-context compiler)) + (#e;Success [compiler' output]) + (#e;Success [(set@ #;type-context old compiler') + output]) + + output + output)))) + (def: #export (infer actualT) (-> Type (Meta Unit)) (do meta;Monad<Meta> |