diff options
author | Eduardo Julian | 2017-06-27 17:52:52 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-06-27 17:52:52 -0400 |
commit | 36cf0c61991bda395e224fa2d435fa6b6f5090e5 (patch) | |
tree | 50216b0052b413dd7dff04a980e6f238cec98984 /new-luxc/source/luxc/analyser/function.lux | |
parent | 49fab71f7965e4c76796d5b4ce9648fc46ab2660 (diff) |
- Adapted compiler to the latest stdlib changes.
Diffstat (limited to 'new-luxc/source/luxc/analyser/function.lux')
-rw-r--r-- | new-luxc/source/luxc/analyser/function.lux | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/new-luxc/source/luxc/analyser/function.lux b/new-luxc/source/luxc/analyser/function.lux index 5144534fb..f1d7fdd31 100644 --- a/new-luxc/source/luxc/analyser/function.lux +++ b/new-luxc/source/luxc/analyser/function.lux @@ -25,26 +25,24 @@ (#;Named name unnamedT) (recur unnamedT) - (#;App funT argT) - (do @ - [fully-applied (case (type;apply-type funT argT) - (#;Some value) - (wrap value) + (#;Apply argT funT) + (case (type;apply (list argT) funT) + (#;Some value) + (recur value) - #;None - (&;fail (format "Cannot apply type " (%type funT) " to type " (%type argT))))] - (recur fully-applied)) + #;None + (&;fail (format "Cannot apply type " (%type funT) " to type " (%type argT)))) (#;UnivQ _) (do @ [[var-id var] (&;within-type-env TC;existential)] - (recur (assume (type;apply-type expected var)))) + (recur (assume (type;apply (list var) expected)))) (#;ExQ _) (&common;with-var (function [[var-id var]] - (recur (assume (type;apply-type expected var))))) + (recur (assume (type;apply (list var) expected))))) (#;Var id) (do @ |