aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/host.old.lux
diff options
context:
space:
mode:
authorEduardo Julian2019-05-10 23:34:22 -0400
committerEduardo Julian2019-05-10 23:34:22 -0400
commit0ea5588551ae682c628f273bacb123fe0c1ed82c (patch)
tree9e001aac754896817edafeabec320afd2b210f9d /stdlib/source/lux/host.old.lux
parent30a237358ca0effc0aabca0a8fbc5ce81a91cb32 (diff)
Made the host-interop layer dependent on "lux/target/jvm/type".
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/host.old.lux92
1 files changed, 46 insertions, 46 deletions
diff --git a/stdlib/source/lux/host.old.lux b/stdlib/source/lux/host.old.lux
index 4c12d8774..f220d00b9 100644
--- a/stdlib/source/lux/host.old.lux
+++ b/stdlib/source/lux/host.old.lux
@@ -80,7 +80,7 @@
(#GenericArray GenericType)
(#GenericWildcard (Maybe [BoundKind GenericType])))
-(type: Type-Paramameter
+(type: Type-Parameter
[Text (List GenericType)])
(type: Primitive-Mode
@@ -109,7 +109,7 @@
(type: Class-Declaration
{#class-name Text
- #class-params (List Type-Paramameter)})
+ #class-params (List Type-Parameter)})
(type: StackFrame (primitive "java/lang/StackTraceElement"))
(type: StackTrace (Array StackFrame))
@@ -135,7 +135,7 @@
(#VariableField StateModifier GenericType))
(type: MethodDecl
- {#method-tvars (List Type-Paramameter)
+ {#method-tvars (List Type-Parameter)
#method-inputs (List GenericType)
#method-output GenericType
#method-exs (List GenericType)})
@@ -149,14 +149,14 @@
(type: Method-Definition
(#ConstructorMethod [Bit
- (List Type-Paramameter)
+ (List Type-Parameter)
(List ArgDecl)
(List ConstructorArg)
Code
(List GenericType)])
(#VirtualMethod [Bit
Bit
- (List Type-Paramameter)
+ (List Type-Parameter)
Text
(List ArgDecl)
GenericType
@@ -164,23 +164,23 @@
(List GenericType)])
(#OverridenMethod [Bit
Class-Declaration
- (List Type-Paramameter)
+ (List Type-Parameter)
Text
(List ArgDecl)
GenericType
Code
(List GenericType)])
(#StaticMethod [Bit
- (List Type-Paramameter)
+ (List Type-Parameter)
(List ArgDecl)
GenericType
Code
(List GenericType)])
- (#AbstractMethod [(List Type-Paramameter)
+ (#AbstractMethod [(List Type-Parameter)
(List ArgDecl)
GenericType
(List GenericType)])
- (#NativeMethod [(List Type-Paramameter)
+ (#NativeMethod [(List Type-Parameter)
(List ArgDecl)
GenericType
(List GenericType)]))
@@ -197,7 +197,7 @@
{#import-member-mode Primitive-Mode
#import-member-alias Text
#import-member-kind ImportMethodKind
- #import-member-tvars (List Type-Paramameter)
+ #import-member-tvars (List Type-Parameter)
#import-member-args (List [Bit GenericType])
#import-member-maybe? Bit
#import-member-try? Bit
@@ -280,8 +280,8 @@
(def: (generic-class->type' mode type-params in-array? name+params
class->type')
- (-> Primitive-Mode (List Type-Paramameter) Bit [Text (List GenericType)]
- (-> Primitive-Mode (List Type-Paramameter) Bit GenericType Code)
+ (-> Primitive-Mode (List Type-Parameter) Bit [Text (List GenericType)]
+ (-> Primitive-Mode (List Type-Parameter) Bit GenericType Code)
Code)
(case [name+params mode in-array?]
(^multi [[prim #.Nil] #ManualPrM #0]
@@ -298,7 +298,7 @@
(` (primitive (~ (code.text name)) [(~+ =params)])))))
(def: (class->type' mode type-params in-array? class)
- (-> Primitive-Mode (List Type-Paramameter) Bit GenericType Code)
+ (-> Primitive-Mode (List Type-Parameter) Bit GenericType Code)
(case class
(#GenericTypeVar name)
(case (list.find (function (_ [pname pbounds])
@@ -320,23 +320,23 @@
(` ((~! array.Array) (~ =param))))
(^or (#GenericWildcard #.None) (#GenericWildcard (#.Some [#LowerBound _])))
- (' (.Ex [*] *))
+ (` .Any)
(#GenericWildcard (#.Some [#UpperBound upper-bound]))
(class->type' mode type-params in-array? upper-bound)
))
(def: (class->type mode type-params class)
- (-> Primitive-Mode (List Type-Paramameter) GenericType Code)
+ (-> Primitive-Mode (List Type-Parameter) GenericType Code)
(class->type' mode type-params #0 class))
(def: (type-param-type$ [name bounds])
- (-> Type-Paramameter Code)
+ (-> Type-Parameter Code)
(code.identifier ["" name]))
(def: (class-decl-type$ (^slots [#class-name #class-params]))
(-> Class-Declaration Code)
- (let [=params (list@map (: (-> Type-Paramameter Code)
+ (let [=params (list@map (: (-> Type-Parameter Code)
(function (_ [pname pbounds])
(case pbounds
#.Nil
@@ -474,7 +474,7 @@
(def: type-var-class Text "java.lang.Object")
(def: (simple-class$ env class)
- (-> (List Type-Paramameter) GenericType Text)
+ (-> (List Type-Parameter) GenericType Text)
(case class
(#GenericTypeVar name)
(case (list.find (function (_ [pname pbounds])
@@ -578,7 +578,7 @@
(make-put-var-parser class-name field-name))))
(def: (make-constructor-parser params class-name arg-decls)
- (-> (List Type-Paramameter) Text (List ArgDecl) (Parser Code))
+ (-> (List Type-Parameter) Text (List ArgDecl) (Parser Code))
(do p.monad
[args (: (Parser (List Code))
(s.form (p.after (s.this! (' ::new!))
@@ -588,7 +588,7 @@
(~+ args))))))
(def: (make-static-method-parser params class-name method-name arg-decls)
- (-> (List Type-Paramameter) Text Text (List ArgDecl) (Parser Code))
+ (-> (List Type-Parameter) Text Text (List ArgDecl) (Parser Code))
(do p.monad
[#let [dotted-name (format "::" method-name "!")]
args (: (Parser (List Code))
@@ -600,7 +600,7 @@
(template [<name> <jvm-op>]
[(def: (<name> params class-name method-name arg-decls)
- (-> (List Type-Paramameter) Text Text (List ArgDecl) (Parser Code))
+ (-> (List Type-Parameter) Text Text (List ArgDecl) (Parser Code))
(do p.monad
[#let [dotted-name (format "::" method-name "!")]
args (: (Parser (List Code))
@@ -615,7 +615,7 @@
)
(def: (method->parser params class-name [[method-name _ _] meth-def])
- (-> (List Type-Paramameter) Text [Member-Declaration Method-Definition] (Parser Code))
+ (-> (List Type-Parameter) Text [Member-Declaration Method-Definition] (Parser Code))
(case meth-def
(#ConstructorMethod strict? type-vars args constructor-args return-expr exs)
(make-constructor-parser params class-name args)
@@ -668,7 +668,7 @@
(not (text.contains? "." name))))
(def: (generic-type^ imports type-vars)
- (-> Class-Imports (List Type-Paramameter) (Parser GenericType))
+ (-> Class-Imports (List Type-Parameter) (Parser GenericType))
($_ p.either
(do p.monad
[_ (s.this! (' ?))]
@@ -712,7 +712,7 @@
))
(def: (type-param^ imports)
- (-> Class-Imports (Parser Type-Paramameter))
+ (-> Class-Imports (Parser Type-Parameter))
(p.either (do p.monad
[param-name s.local-identifier]
(wrap [param-name (list)]))
@@ -723,7 +723,7 @@
(wrap [param-name bounds])))))
(def: (type-params^ imports)
- (-> Class-Imports (Parser (List Type-Paramameter)))
+ (-> Class-Imports (Parser (List Type-Parameter)))
(s.tuple (p.some (type-param^ imports))))
(def: (class-decl^ imports)
@@ -740,7 +740,7 @@
))
(def: (super-class-decl^ imports type-vars)
- (-> Class-Imports (List Type-Paramameter) (Parser Super-Class-Decl))
+ (-> Class-Imports (List Type-Parameter) (Parser Super-Class-Decl))
(p.either (do p.monad
[name (full-class-name^ imports)
_ (assert-no-periods name)]
@@ -776,19 +776,19 @@
(wrap (maybe.default (list) anns??))))
(def: (throws-decl'^ imports type-vars)
- (-> Class-Imports (List Type-Paramameter) (Parser (List GenericType)))
+ (-> Class-Imports (List Type-Parameter) (Parser (List GenericType)))
(do p.monad
[_ (s.this! (' #throws))]
(s.tuple (p.some (generic-type^ imports type-vars)))))
(def: (throws-decl^ imports type-vars)
- (-> Class-Imports (List Type-Paramameter) (Parser (List GenericType)))
+ (-> Class-Imports (List Type-Parameter) (Parser (List GenericType)))
(do p.monad
[exs? (p.maybe (throws-decl'^ imports type-vars))]
(wrap (maybe.default (list) exs?))))
(def: (method-decl^ imports type-vars)
- (-> Class-Imports (List Type-Paramameter) (Parser [Member-Declaration MethodDecl]))
+ (-> Class-Imports (List Type-Parameter) (Parser [Member-Declaration MethodDecl]))
(s.form (do p.monad
[tvars (p.default (list) (type-params^ imports))
name s.local-identifier
@@ -809,7 +809,7 @@
(:: p.monad wrap [])))
(def: (field-decl^ imports type-vars)
- (-> Class-Imports (List Type-Paramameter) (Parser [Member-Declaration FieldDecl]))
+ (-> Class-Imports (List Type-Parameter) (Parser [Member-Declaration FieldDecl]))
(p.either (s.form (do p.monad
[_ (s.this! (' #const))
name s.local-identifier
@@ -826,24 +826,24 @@
(wrap [[name pm anns] (#VariableField [sm type])])))))
(def: (arg-decl^ imports type-vars)
- (-> Class-Imports (List Type-Paramameter) (Parser ArgDecl))
+ (-> Class-Imports (List Type-Parameter) (Parser ArgDecl))
(s.record (p.and s.local-identifier
(generic-type^ imports type-vars))))
(def: (arg-decls^ imports type-vars)
- (-> Class-Imports (List Type-Paramameter) (Parser (List ArgDecl)))
+ (-> Class-Imports (List Type-Parameter) (Parser (List ArgDecl)))
(p.some (arg-decl^ imports type-vars)))
(def: (constructor-arg^ imports type-vars)
- (-> Class-Imports (List Type-Paramameter) (Parser ConstructorArg))
+ (-> Class-Imports (List Type-Parameter) (Parser ConstructorArg))
(s.record (p.and (generic-type^ imports type-vars) s.any)))
(def: (constructor-args^ imports type-vars)
- (-> Class-Imports (List Type-Paramameter) (Parser (List ConstructorArg)))
+ (-> Class-Imports (List Type-Parameter) (Parser (List ConstructorArg)))
(s.tuple (p.some (constructor-arg^ imports type-vars))))
(def: (constructor-method^ imports class-vars)
- (-> Class-Imports (List Type-Paramameter) (Parser [Member-Declaration Method-Definition]))
+ (-> Class-Imports (List Type-Parameter) (Parser [Member-Declaration Method-Definition]))
(s.form (do p.monad
[pm privacy-modifier^
strict-fp? (p.parses? (s.this! (' #strict)))
@@ -861,7 +861,7 @@
(#ConstructorMethod strict-fp? method-vars arg-decls constructor-args body exs)]))))
(def: (virtual-method-def^ imports class-vars)
- (-> Class-Imports (List Type-Paramameter) (Parser [Member-Declaration Method-Definition]))
+ (-> Class-Imports (List Type-Parameter) (Parser [Member-Declaration Method-Definition]))
(s.form (do p.monad
[pm privacy-modifier^
strict-fp? (p.parses? (s.this! (' #strict)))
@@ -961,7 +961,7 @@
(#NativeMethod method-vars arg-decls return-type exs)]))))
(def: (method-def^ imports class-vars)
- (-> Class-Imports (List Type-Paramameter) (Parser [Member-Declaration Method-Definition]))
+ (-> Class-Imports (List Type-Parameter) (Parser [Member-Declaration Method-Definition]))
($_ p.either
(constructor-method^ imports class-vars)
(virtual-method-def^ imports class-vars)
@@ -991,7 +991,7 @@
s.local-identifier)))
(def: (import-member-args^ imports type-vars)
- (-> Class-Imports (List Type-Paramameter) (Parser (List [Bit GenericType])))
+ (-> Class-Imports (List Type-Parameter) (Parser (List [Bit GenericType])))
(s.tuple (p.some (p.and (p.parses? (s.this! (' #?))) (generic-type^ imports type-vars)))))
(def: import-member-return-flags^
@@ -1004,7 +1004,7 @@
(s.this! (' #auto))))
(def: (import-member-decl^ imports owner-vars)
- (-> Class-Imports (List Type-Paramameter) (Parser Import-Member-Declaration))
+ (-> Class-Imports (List Type-Parameter) (Parser Import-Member-Declaration))
($_ p.either
(s.form (do p.monad
[_ (s.this! (' #enum))
@@ -1127,7 +1127,7 @@
(format (bound-kind$ bound-kind) (generic-type$ bound))))
(def: (type-param$ [name bounds])
- (-> Type-Paramameter JVM-Code)
+ (-> Type-Parameter JVM-Code)
(format "(" name " " (spaced (list@map generic-type$ bounds)) ")"))
(def: (class-decl$ (^open "."))
@@ -1518,7 +1518,7 @@
[(~+ params')]))))))
(def: (member-type-vars class-tvars member)
- (-> (List Type-Paramameter) Import-Member-Declaration (List Type-Paramameter))
+ (-> (List Type-Parameter) Import-Member-Declaration (List Type-Parameter))
(case member
(#ConstructorDecl [commons _])
(list@compose class-tvars (get@ #import-member-tvars commons))
@@ -1535,7 +1535,7 @@
class-tvars))
(def: (member-def-arg-bindings type-params class member)
- (-> (List Type-Paramameter) Class-Declaration Import-Member-Declaration (Meta [(List [Bit Code]) (List Text) (List Code)]))
+ (-> (List Type-Parameter) Class-Declaration Import-Member-Declaration (Meta [(List [Bit Code]) (List Text) (List Code)]))
(case member
(^or (#ConstructorDecl [commons _]) (#MethodDecl [commons _]))
(let [(^slots [#import-member-tvars #import-member-args]) commons]
@@ -1594,13 +1594,13 @@
)
(def: (free-type-param? [name bounds])
- (-> Type-Paramameter Bit)
+ (-> Type-Parameter Bit)
(case bounds
#.Nil #1
_ #0))
(def: (type-param->type-arg [name _])
- (-> Type-Paramameter Code)
+ (-> Type-Parameter Code)
(code.identifier ["" name]))
(template [<name> <byte> <short> <int> <float>]
@@ -1637,7 +1637,7 @@
(list@map (auto-convert-input mode))))
(def: (member-def-interop type-params kind class [arg-function-inputs arg-classes arg-types] member method-prefix)
- (-> (List Type-Paramameter) Class-Kind Class-Declaration [(List [Bit Code]) (List Text) (List Code)] Import-Member-Declaration Text (Meta (List Code)))
+ (-> (List Type-Parameter) Class-Kind Class-Declaration [(List [Bit Code]) (List Text) (List Code)] Import-Member-Declaration Text (Meta (List Code)))
(let [[full-name class-tvars] class
full-name (sanitize full-name)
all-params (|> (member-type-vars class-tvars member)
@@ -1766,7 +1766,7 @@
)))
(def: (member-import$ type-params long-name? kind class member)
- (-> (List Type-Paramameter) Bit Class-Kind Class-Declaration Import-Member-Declaration (Meta (List Code)))
+ (-> (List Type-Parameter) Bit Class-Kind Class-Declaration Import-Member-Declaration (Meta (List Code)))
(let [[full-name _] class
method-prefix (if long-name?
full-name