diff options
author | Eduardo Julian | 2017-04-10 23:21:35 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-04-10 23:21:35 -0400 |
commit | a1b2a8120921ccca79e95b8bd35b475b34dd9780 (patch) | |
tree | 721634e556f66d3d8afcae181320c503c3b708df /luxc/src | |
parent | 6066515f7a9736210a04652636a634179939d185 (diff) |
- Renamed "LambdaT" to "FunctionT".
Diffstat (limited to '')
-rw-r--r-- | luxc/src/lux/analyser/base.clj | 2 | ||||
-rw-r--r-- | luxc/src/lux/analyser/case.clj | 12 | ||||
-rw-r--r-- | luxc/src/lux/analyser/lux.clj | 8 | ||||
-rw-r--r-- | luxc/src/lux/base.clj | 2 | ||||
-rw-r--r-- | luxc/src/lux/compiler/cache/type.clj | 4 | ||||
-rw-r--r-- | luxc/src/lux/host.clj | 2 | ||||
-rw-r--r-- | luxc/src/lux/type.clj | 20 |
7 files changed, 25 insertions, 25 deletions
diff --git a/luxc/src/lux/analyser/base.clj b/luxc/src/lux/analyser/base.clj index 46eafa051..cbcb71933 100644 --- a/luxc/src/lux/analyser/base.clj +++ b/luxc/src/lux/analyser/base.clj @@ -74,7 +74,7 @@ (return ?module))] (return (&/T [module* ?name])))) -(let [tag-names #{"HostT" "VoidT" "UnitT" "SumT" "ProdT" "LambdaT" "BoundT" "VarT" "ExT" "UnivQ" "ExQ" "AppT" "NamedT"}] +(let [tag-names #{"HostT" "VoidT" "UnitT" "SumT" "ProdT" "FunctionT" "BoundT" "VarT" "ExT" "UnivQ" "ExQ" "AppT" "NamedT"}] (defn type-tag? [module name] (and (= "lux" module) (contains? tag-names name)))) diff --git a/luxc/src/lux/analyser/case.clj b/luxc/src/lux/analyser/case.clj index 5b25115ea..2f3a4d575 100644 --- a/luxc/src/lux/analyser/case.clj +++ b/luxc/src/lux/analyser/case.clj @@ -74,9 +74,9 @@ (&/$HostT ?name (&/|map (partial clean! level ?tid bound-idx) ?params)) - (&/$LambdaT ?arg ?return) - (&/$LambdaT (clean! level ?tid bound-idx ?arg) - (clean! level ?tid bound-idx ?return)) + (&/$FunctionT ?arg ?return) + (&/$FunctionT (clean! level ?tid bound-idx ?arg) + (clean! level ?tid bound-idx ?return)) (&/$AppT ?lambda ?param) (&/$AppT (clean! level ?tid bound-idx ?lambda) @@ -135,9 +135,9 @@ _ type) - (&/$LambdaT ?input ?output) - (&/$LambdaT (beta-reduce! level env ?input) - (beta-reduce! level env ?output)) + (&/$FunctionT ?input ?output) + (&/$FunctionT (beta-reduce! level env ?input) + (beta-reduce! level env ?output)) (&/$BoundT ?idx) (|case (&/|at (- ?idx (* 2 level)) env) diff --git a/luxc/src/lux/analyser/lux.clj b/luxc/src/lux/analyser/lux.clj index 04ef66683..16ba17583 100644 --- a/luxc/src/lux/analyser/lux.clj +++ b/luxc/src/lux/analyser/lux.clj @@ -40,7 +40,7 @@ (&/$UnivQ env (embed-inferred-input input output*)) _ - (&/$LambdaT input output))) + (&/$FunctionT input output))) ;; [Exports] (defn analyse-unit [analyse ?exo-type] @@ -354,7 +354,7 @@ type* (&type/apply-type ?fun-type* $var)] (analyse-apply* analyse exo-type type* ?args)) - (&/$LambdaT ?input-t ?output-t) + (&/$FunctionT ?input-t ?output-t) (|do [[=output-t =args] (analyse-apply* analyse exo-type ?output-t ?args*) =arg (&/with-attempt (&&/analyse-1 analyse ?input-t ?arg) @@ -476,7 +476,7 @@ (fn [$input] (&type/with-var (fn [$output] - (|do [[[function-type function-cursor] function-analysis] (analyse-function* analyse (&/$LambdaT $input $output) ?self ?arg ?body) + (|do [[[function-type function-cursor] function-analysis] (analyse-function* analyse (&/$FunctionT $input $output) ?self ?arg ?body) =input (&type/resolve-type $input) =output (&type/resolve-type $output) inferred-type (clean-func-inference $input $output =input (embed-inferred-input =input =output)) @@ -503,7 +503,7 @@ =expr (analyse-function* analyse exo-type** ?self ?arg ?body)] (&&/clean-analysis $var =expr)))) - (&/$LambdaT ?arg-t ?return-t) + (&/$FunctionT ?arg-t ?return-t) (|do [[=scope =captured =body] (&&function/with-function ?self exo-type* ?arg ?arg-t (&&/analyse-1 analyse ?return-t ?body)) diff --git a/luxc/src/lux/base.clj b/luxc/src/lux/base.clj index da6dcbf0a..2fe9952ee 100644 --- a/luxc/src/lux/base.clj +++ b/luxc/src/lux/base.clj @@ -91,7 +91,7 @@ ("UnitT" 0) ("SumT" 2) ("ProdT" 2) - ("LambdaT" 2) + ("FunctionT" 2) ("BoundT" 1) ("VarT" 1) ("ExT" 1) diff --git a/luxc/src/lux/compiler/cache/type.clj b/luxc/src/lux/compiler/cache/type.clj index 26a08e193..5715866f7 100644 --- a/luxc/src/lux/compiler/cache/type.clj +++ b/luxc/src/lux/compiler/cache/type.clj @@ -39,7 +39,7 @@ (&/$SumT left right) (str "+" (serialize-type left) (serialize-type right)) - (&/$LambdaT left right) + (&/$FunctionT left right) (str ">" (serialize-type left) (serialize-type right)) (&/$UnivQ env body) @@ -100,7 +100,7 @@ ^:private deserialize-sum "+" &/$SumT ^:private deserialize-prod "*" &/$ProdT - ^:private deserialize-lambda ">" &/$LambdaT + ^:private deserialize-lambda ">" &/$FunctionT ^:private deserialize-app "%" &/$AppT ) diff --git a/luxc/src/lux/host.clj b/luxc/src/lux/host.clj index f0b45723d..e222baf10 100644 --- a/luxc/src/lux/host.clj +++ b/luxc/src/lux/host.clj @@ -55,7 +55,7 @@ (= &host-type/null-data-tag ?name) (return (&host-generics/->type-signature "java.lang.Object")) :else (return (&host-generics/->type-signature ?name))) - (&/$LambdaT _ _) + (&/$FunctionT _ _) (return (&host-generics/->type-signature function-class)) (&/$UnitT) diff --git a/luxc/src/lux/type.clj b/luxc/src/lux/type.clj index 47b4b9c38..561d81795 100644 --- a/luxc/src/lux/type.clj +++ b/luxc/src/lux/type.clj @@ -53,7 +53,7 @@ (def IO (&/$NamedT (&/T ["lux/codata" "IO"]) (&/$UnivQ empty-env - (&/$LambdaT &/$VoidT (&/$BoundT 1))))) + (&/$FunctionT &/$VoidT (&/$BoundT 1))))) (def List (&/$NamedT (&/T ["lux" "List"]) @@ -98,7 +98,7 @@ ;; ProdT TypePair (&/$SumT - ;; LambdaT + ;; FunctionT TypePair (&/$SumT ;; BoundT @@ -335,10 +335,10 @@ (|do [=params (&/map% (partial clean* ?tid) ?params)] (return (&/$HostT ?name =params))) - (&/$LambdaT ?arg ?return) + (&/$FunctionT ?arg ?return) (|do [=arg (clean* ?tid ?arg) =return (clean* ?tid ?return)] - (return (&/$LambdaT =arg =return))) + (return (&/$FunctionT =arg =return))) (&/$AppT ?lambda ?param) (|do [=lambda (clean* ?tid ?lambda) @@ -379,7 +379,7 @@ (defn ^:private unravel-fun [type] (|case type - (&/$LambdaT ?in ?out) + (&/$FunctionT ?in ?out) (|let [[??out ?args] (unravel-fun ?out)] (&/T [??out (&/$Cons ?in ?args)])) @@ -462,7 +462,7 @@ (&/$SumT _) (str "(| " (->> (flatten-sum type) (&/|map show-type) (&/|interpose " ") (&/fold str "")) ")") - (&/$LambdaT input output) + (&/$FunctionT input output) (|let [[?out ?ins] (unravel-fun type)] (str "(-> " (->> ?ins (&/|map show-type) (&/|interpose " ") (&/fold str "")) " " (show-type ?out) ")")) @@ -519,7 +519,7 @@ (and (type= xL yL) (type= xR yR)) - [(&/$LambdaT xinput xoutput) (&/$LambdaT yinput youtput)] + [(&/$FunctionT xinput xoutput) (&/$FunctionT yinput youtput)] (and (type= xinput yinput) (type= xoutput youtput)) @@ -618,8 +618,8 @@ _ type) - (&/$LambdaT ?input ?output) - (&/$LambdaT (beta-reduce env ?input) (beta-reduce env ?output)) + (&/$FunctionT ?input ?output) + (&/$FunctionT (beta-reduce env ?input) (beta-reduce env ?output)) (&/$BoundT ?idx) (|case (&/|at ?idx env) @@ -852,7 +852,7 @@ [(&/$UnitT) (&/$UnitT)] (return fixpoints) - [(&/$LambdaT eI eO) (&/$LambdaT aI aO)] + [(&/$FunctionT eI eO) (&/$FunctionT aI aO)] (|do [fixpoints* (check* fixpoints invariant?? aI eI)] (check* fixpoints* invariant?? eO aO)) |