diff options
author | Eduardo Julian | 2017-11-15 20:35:56 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-11-15 20:35:56 -0400 |
commit | 094c0904470f85ff0d63c788e07ce1ecf355577e (patch) | |
tree | a55c642d0ae834e79ddd8549ff2bc5c4c39e4b30 /new-luxc/source/luxc/lang/translation | |
parent | af1417bf28529a8fec06901d586b60b41bba8f76 (diff) |
- Moved type-cleaning to lux/meta/type/check.
Diffstat (limited to '')
-rw-r--r-- | new-luxc/source/luxc/lang/translation.lux | 39 |
1 files changed, 1 insertions, 38 deletions
diff --git a/new-luxc/source/luxc/lang/translation.lux b/new-luxc/source/luxc/lang/translation.lux index 85eed9ba1..e573aa3ae 100644 --- a/new-luxc/source/luxc/lang/translation.lux +++ b/new-luxc/source/luxc/lang/translation.lux @@ -37,43 +37,6 @@ (exception: #export Macro-Expansion-Failed) (exception: #export Unrecognized-Statement) -(def: (clean inputT) - (-> Type (tc;Check Type)) - (case inputT - (#;Primitive name paramsT+) - (do tc;Monad<Check> - [paramsT+' (monad;map @ clean paramsT+)] - (wrap (#;Primitive name paramsT+'))) - - (^or #;Void #;Unit (#;Bound _) (#;Ex _) (#;Named _)) - (:: tc;Monad<Check> wrap inputT) - - (^template [<tag>] - (<tag> leftT rightT) - (do tc;Monad<Check> - [leftT' (clean leftT) - rightT' (clean rightT)] - (wrap (<tag> leftT' rightT')))) - ([#;Sum] [#;Product] [#;Function] [#;Apply]) - - (#;Var id) - (do tc;Monad<Check> - [?actualT (tc;read id)] - (case ?actualT - (#;Some actualT) - (clean actualT) - - _ - (wrap inputT))) - - (^template [<tag>] - (<tag> envT+ unquantifiedT) - (do tc;Monad<Check> - [envT+' (monad;map @ clean envT+)] - (wrap (<tag> envT+' unquantifiedT)))) - ([#;UnivQ] [#;ExQ]) - )) - (def: (process-annotations annsC) (-> Code (Meta [$;Inst Code])) (do meta;Monad<Meta> @@ -101,7 +64,7 @@ (commonA;with-unknown-type (analyse valueC)))) valueT (&;with-type-env - (clean valueT)) + (tc;clean valueT)) valueI (expressionT;translate (expressionS;synthesize valueA)) _ (&;with-scope (statementT;translate-def def-name valueT valueI annsI annsV))] |