aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/analysis/structure.lux
diff options
context:
space:
mode:
Diffstat (limited to 'new-luxc/source/luxc/lang/analysis/structure.lux')
-rw-r--r--new-luxc/source/luxc/lang/analysis/structure.lux28
1 files changed, 14 insertions, 14 deletions
diff --git a/new-luxc/source/luxc/lang/analysis/structure.lux b/new-luxc/source/luxc/lang/analysis/structure.lux
index 3048d4a4e..76b5a3a42 100644
--- a/new-luxc/source/luxc/lang/analysis/structure.lux
+++ b/new-luxc/source/luxc/lang/analysis/structure.lux
@@ -45,7 +45,7 @@
(case (list;nth tag flat)
(#;Some variant-type)
(do @
- [valueA (&;with-expected-type variant-type
+ [valueA (&;with-type variant-type
(analyse valueC))
temp &scope;next-local]
(wrap (la;sum tag type-size temp valueA)))
@@ -54,7 +54,7 @@
(&common;variant-out-of-bounds-error expectedT type-size tag)))
(#;Named name unnamedT)
- (&;with-expected-type unnamedT
+ (&;with-type unnamedT
(analyse-sum analyse tag valueC))
(#;Var id)
@@ -63,7 +63,7 @@
(tc;read id))]
(case ?expectedT'
(#;Some expectedT')
- (&;with-expected-type expectedT'
+ (&;with-type expectedT'
(analyse-sum analyse tag valueC))
_
@@ -79,7 +79,7 @@
(<tag> _)
(do @
[[instance-id instanceT] (&;with-type-env <instancer>)]
- (&;with-expected-type (maybe;assume (type;apply (list instanceT) expectedT))
+ (&;with-type (maybe;assume (type;apply (list instanceT) expectedT))
(analyse-sum analyse tag valueC))))
([#;UnivQ tc;existential]
[#;ExQ tc;var])
@@ -91,7 +91,7 @@
[?funT' (&;with-type-env (tc;read funT-id))]
(case ?funT'
(#;Some funT')
- (&;with-expected-type (#;Apply inputT funT')
+ (&;with-type (#;Apply inputT funT')
(analyse-sum analyse tag valueC))
_
@@ -105,7 +105,7 @@
(&;throw Not-Quantified-Type (%type funT))
(#;Some outputT)
- (&;with-expected-type outputT
+ (&;with-type outputT
(analyse-sum analyse tag valueC))))
_
@@ -123,14 +123,14 @@
## If the tuple runs out, whatever expression is the last gets
## matched to the remaining type.
[tailT (#;Cons tailC #;Nil)]
- (&;with-expected-type tailT
+ (&;with-type tailT
(analyse tailC))
## If the type and the code are still ongoing, match each
## sub-expression to its corresponding type.
[(#;Product leftT rightT) (#;Cons leftC rightC)]
(do @
- [leftA (&;with-expected-type leftT
+ [leftA (&;with-type leftT
(analyse leftC))
rightA (recur rightT rightC)]
(wrap (` [(~ leftA) (~ rightA)])))
@@ -155,7 +155,7 @@
[tailT tailC]
(do @
[g!tail (meta;gensym "tail")]
- (&;with-expected-type tailT
+ (&;with-type tailT
(analyse (` ("lux case" [(~@ tailC)]
(~ g!tail)
(~ g!tail))))))
@@ -173,7 +173,7 @@
(analyse-typed-product analyse membersC)
(#;Named name unnamedT)
- (&;with-expected-type unnamedT
+ (&;with-type unnamedT
(analyse-product analyse membersC))
(#;Var id)
@@ -182,7 +182,7 @@
(tc;read id))]
(case ?expectedT'
(#;Some expectedT')
- (&;with-expected-type expectedT'
+ (&;with-type expectedT'
(analyse-product analyse membersC))
_
@@ -199,7 +199,7 @@
(<tag> _)
(do @
[[instance-id instanceT] (&;with-type-env <instancer>)]
- (&;with-expected-type (maybe;assume (type;apply (list instanceT) expectedT))
+ (&;with-type (maybe;assume (type;apply (list instanceT) expectedT))
(analyse-product analyse membersC))))
([#;UnivQ tc;existential]
[#;ExQ tc;var])
@@ -211,7 +211,7 @@
[?funT' (&;with-type-env (tc;read funT-id))]
(case ?funT'
(#;Some funT')
- (&;with-expected-type (#;Apply inputT funT')
+ (&;with-type (#;Apply inputT funT')
(analyse-product analyse membersC))
_
@@ -224,7 +224,7 @@
(&;throw Not-Quantified-Type (%type funT))
(#;Some outputT)
- (&;with-expected-type outputT
+ (&;with-type outputT
(analyse-product analyse membersC))))
_