Record new/get/set syntax

This commit is contained in:
MaiaVictor 2021-05-08 01:54:11 -03:00
parent 9146d6ce02
commit 5dbcecece4
47 changed files with 14433 additions and 22246 deletions

15
CHANGELOG.md Normal file
View File

@ -0,0 +1,15 @@
### Kind 1.0.46
- New syntax to create, get and set attributes of records
```
type Foo {
new(x: Nat, y: Nat)
}
Test: _
let foo = {1,2} // same as `Foo.new(1,2)`
let x = foo@x // same as `case foo { new: foo.x }`
let bar = foo@y <- 80 // same as `case foo { new: Foo.new(80,foo.y) }`
bar
```

View File

@ -1024,6 +1024,53 @@ case head {
This is useful to flatten your code, reducing the required identation.
Record literal
--------------
```
{1, 2}
```
When a datatype has only one constructor, it can be seen as a record. The syntax
above can be used to create an element of that type. It expands to:
```
Foo.ctor_name(1, 2)
```
Depending on where it is used, may require a type annotation: `{1, 2} :: Foo`.
Record getter
-------------
```
foo@x
```
The syntax above expands to:
```
case foo { new: foo.x }
```
It can be used to get a field of a single-constructor datatype.
Record setter
-------------
```
foo@x <- 100
```
The syntax above expands to:
```
case foo { new: Foo.new(100, foo.y) }
```
It can be used to set a field of a single-constructor datatype.
List literal
------------
@ -1324,4 +1371,4 @@ Nat.gtn(3, 2)
```
Note that spaces are required before and after operators, also that operators in Kind have no precedence and are always right associative. That
means, for example, `a * b + c - d` is parsed as `(((a * b) + c) - d)`.
means, for example, `a * b + c - d` is parsed as `(((a * b) + c) - d)`.

View File

@ -56,10 +56,6 @@ Kind.Comp.compile(
none: {Kind.Comp.nil, Kind.Term.typ}
some: {Kind.Comp.ref(term.name), open got.value; got.value.type}
}
typ: {
Kind.Comp.nil
Kind.Term.typ
}
app:
let {func_cmp, func_typ} = Kind.Comp.compile(term.func, none, defs, size)
case Kind.Term.reduce(func_typ, defs) as func_typ {
@ -86,8 +82,6 @@ Kind.Comp.compile(
{Kind.Comp.let(name_uid, expr_cmp, body_cmp), body_typ}
def:
Kind.Comp.compile(term.body(term.expr), none, defs, size)
all:
{Kind.Comp.nil, Kind.Term.typ}
ann:
Kind.Comp.compile(term.term, some(term.type), defs, size)
loc:
@ -98,8 +92,6 @@ Kind.Comp.compile(
{Kind.Comp.chr(term.chrx), Kind.Term.ref("Char")}
str:
{Kind.Comp.str(term.strx), Kind.Term.ref("String")}
cse:
{Kind.Comp.nil, Kind.Term.typ}
ori:
Kind.Comp.compile(term.expr, none, defs, size)
} default {Kind.Comp.nil, Kind.Term.typ}

View File

@ -65,6 +65,12 @@ Kind.Core.show.go(term: Kind.Term, indx: Nat, vars: List<Kind.Name>): String
String.flatten(["\"", Kind.Code.escape(term.strx), "\""])
cse:
"<CSE>"
new:
"<NEW>"
get:
"<GET>"
set:
"<SET>"
ori:
Kind.Core.show.go(term.expr, indx, vars)
}

View File

@ -0,0 +1,6 @@
Kind.Parser.field_get(term: Kind.Term): Parser(Kind.Term)
Parser {
Kind.Parser.text_now("@")
get fkey = Kind.Parser.name1
return Kind.Term.get(term, fkey)
}

View File

@ -0,0 +1,8 @@
Kind.Parser.field_set(term: Kind.Term): Parser(Kind.Term)
Parser {
Kind.Parser.text_now("@")
get fkey = Kind.Parser.name1
Kind.Parser.text("<-")
get fval = Kind.Parser.term
return Kind.Term.set(term, fkey, fval)
}

View File

@ -0,0 +1,5 @@
Kind.Parser.new: Parser(Kind.Term)
Kind.Parser.block("new-struct", Parser {
get args = Kind.Parser.items!("{", Kind.Parser.term, "}")
return Kind.Term.new(args)
})

View File

@ -1,15 +0,0 @@
Kind.Parser.pair: Parser(Kind.Term)
Kind.Parser.block("pair", Parser {
Kind.Parser.text("{")
get val0 = Kind.Parser.term
Parser.maybe!(Kind.Parser.text(","))
get val1 = Kind.Parser.term
Parser.maybe!(Kind.Parser.text(","))
Kind.Parser.text("}")
let term = Kind.Term.ref("Pair.new")
let term = Kind.Term.app(term, Kind.Term.hol(Bits.e))
let term = Kind.Term.app(term, Kind.Term.hol(Bits.e))
let term = Kind.Term.app(term, val0)
let term = Kind.Term.app(term, val1)
return term
})

View File

@ -25,7 +25,7 @@ Kind.Parser.term: Parser(Kind.Term)
Kind.Parser.char
Kind.Parser.string('"')
Kind.Parser.string('`')
Kind.Parser.pair
Kind.Parser.new
Kind.Parser.sigma.type
Kind.Parser.some
Kind.Parser.not
@ -84,6 +84,8 @@ Kind.Parser.term.suffix(term: Kind.Term): Parser(Kind.Term)
Kind.Parser.list_get(term)
Kind.Parser.map_set(term)
Kind.Parser.map_get(term)
Kind.Parser.field_set(term)
Kind.Parser.field_get(term)
Kind.Parser.arrow(term)
Kind.Parser.concat(term)
Kind.Parser.equality(term)

View File

@ -77,6 +77,21 @@ type Kind.Term {
cses: BitsMap<Kind.Term>,
moti: Maybe<Kind.Term>,
),
// A record maker
new(
args: List(Kind.Term)
),
// A field-get expression
get(
expr: Kind.Term,
fkey: String,
),
// A field-set expression
set(
expr: Kind.Term,
fkey: String,
fval: Kind.Term,
),
// An origin
ori(
orig: Pair<Nat,Nat>,

View File

@ -36,18 +36,6 @@ Kind.Term.SmartMotive.replace(term: Kind.Term, from: Kind.Term, to: Kind.Term, l
let term = Kind.Term.SmartMotive.replace(term.term, from, to, lv);
let type = Kind.Term.SmartMotive.replace(term.type, from, to, lv);
Kind.Term.ann(term.done, term, type),
gol:
term,
hol:
term,
nat:
term,
chr:
term,
str:
term,
cse:
term,
ori:
Kind.Term.SmartMotive.replace(term.expr, from, to, lv),
}
} default term

View File

@ -76,6 +76,19 @@ Kind.Term.bind(vars: Kind.Context, path: Kind.Path, term: Kind.Term): Kind.Term
let cses = term.cses; // TODO
let moti = term.moti; // TODO
Kind.Term.cse(Kind.Path.to_bits(path), expr, name, wyth, cses, moti),
new:
let args = List.fold!(term.args)!(
((path) []) :: Kind.Path -> List(Kind.Term),
(arg,res,path) List.cons!(Kind.Term.bind(vars, path, arg), res(Kind.Path.o(path))),
path);
Kind.Term.new(args)
get:
let expr = Kind.Term.bind(vars, Kind.Path.o(path), term.expr);
Kind.Term.get(expr, term.fkey)
set:
let expr = Kind.Term.bind(vars, Kind.Path.o(path), term.expr);
let fval = Kind.Term.bind(vars, Kind.Path.i(path), term.fval);
Kind.Term.set(expr, term.fkey, fval)
ori:
Kind.Term.ori(term.orig, Kind.Term.bind(vars, path, term.expr)),
}

View File

@ -128,32 +128,38 @@ Kind.Term.check(
cse: do Kind.Check {
let expr = term.expr;
get etyp = Kind.Term.check(expr, Maybe.none!, defs, ctx, Kind.MPath.o(path), orig);
// If cse has no moti and we have an inferred type, then we guess it
// with the information we have, substituting selfs and indices.
// Otherwise, we just replace it by a normal hole.
//let dsug = case term.moti {
//none:
//let moti = case type {
//none:
//Kind.Term.hol(Bits.e),
//some:
//let size = List.length!(ctx);
//let typv = Kind.Term.normalize(type.value, Kind.Map.new!);
//let moti = Kind.Term.SmartMotive.make(term.name, term.expr, etyp, typv, size, defs);
//moti,
//};
//Maybe.some!(Kind.Term.cse(term.path, term.expr, term.name, term.with, term.cses, Maybe.some!(moti))),
//some:
//Kind.Term.desugar_cse(term.expr, term.name, term.with, term.cses, term.moti.value, etyp, defs, ctx),
//};
get wyth = Kind.Term.check.infer_with_types(term.with, defs, ctx, path, orig)
let dsug = Kind.Term.desugar_cse(term.expr, term.name, wyth, term.cses, term.moti, etyp, type, defs, ctx)
get wyth = Kind.Term.check.infer_types_of_with(term.with, defs, ctx, path, orig)
let dsug = Kind.Term.check.expand.cse(term.expr, term.name, wyth, term.cses, term.moti, etyp, type, defs, ctx)
case dsug {
none: Kind.Check.result!(type, [Kind.Error.cant_infer(orig, term, ctx)]),
some: Kind.Check.result!(type, [Kind.Error.patch(Kind.MPath.to_bits(path),dsug.value)]),
};
},
new: do Kind.Check {
let dsug = Kind.Term.check.expand.new(term.args, type, defs)
case dsug {
none: Kind.Check.result!(type, [Kind.Error.cant_infer(orig, term, ctx)])
some: Kind.Check.result!(type, [Kind.Error.patch(Kind.MPath.to_bits(path),dsug.value)])
}
},
get: do Kind.Check {
let expr = term.expr;
get etyp = Kind.Term.check(expr, Maybe.none!, defs, ctx, Kind.MPath.o(path), orig);
let dsug = Kind.Term.check.expand.get(term.expr, term.fkey, etyp, defs)
case dsug {
none: Kind.Check.result!(type, [Kind.Error.cant_infer(orig, term, ctx)])
some: Kind.Check.result!(type, [Kind.Error.patch(Kind.MPath.to_bits(path),dsug.value)])
}
},
set: do Kind.Check {
let expr = term.expr;
get etyp = Kind.Term.check(expr, Maybe.none!, defs, ctx, Kind.MPath.o(path), orig);
let dsug = Kind.Term.check.expand.set(term.expr, term.fkey, term.fval, etyp, defs)
case dsug {
none: Kind.Check.result!(type, [Kind.Error.cant_infer(orig, term, ctx)])
some: Kind.Check.result!(type, [Kind.Error.patch(Kind.MPath.to_bits(path),dsug.value)])
}
},
gol: do Kind.Check {
Kind.Check.result!(type, [
Kind.Error.show_goal(term.name, term.dref, term.verb, type, ctx)
@ -186,8 +192,112 @@ Kind.Term.check(
};
}
// Expands `{a,b,c}` into `Foo.new(a,b,c)`
Kind.Term.check.expand.new(
args: List(Kind.Term)
type: Maybe(Kind.Term)
defs: Kind.Defs
): Maybe<Kind.Term>
case type {
none:
// TODO: make Triple, Quadruple, etc.
if Nat.eql(List.length!(args), 2) then
let term = Kind.Term.ref("Pair.new")
let term = Kind.Term.app(term, Kind.Term.hol(Bits.e))
let term = Kind.Term.app(term, Kind.Term.hol(Bits.e))
let term = Kind.Term.app(term, args[0] <> Kind.Term.ref("pair_fst"))
let term = Kind.Term.app(term, args[1] <> Kind.Term.ref("pair_snd"))
some(term)
else
none
some: case Kind.Term.reduce(type.value, defs) as type {
all: case Kind.Term.reduce(type.body(Kind.Term.typ,Kind.Term.typ), defs) as ctor {
all:
let tnam = String.slice(0, Nat.sub(String.length(type.self),5), type.self)
let term = Kind.Term.ref(tnam | "." | ctor.name)
let pars = Kind.Term.check.expand.set.count_params(type.xtyp)
let term = for i from 0 to pars: Kind.Term.app(term, Kind.Term.hol(Bits.e))
let term = for arg in args: Kind.Term.app(term, arg)
some(term)
} default none
} default none
}
// Expands `term@a` into `term(() _)((a) (b) (c) a)
Kind.Term.check.expand.get(
expr: Kind.Term
fkey: String
etyp: Kind.Term
defs: Kind.Defs
): Maybe<Kind.Term>
case Kind.Term.reduce(etyp, defs) as etyp {
all: case Kind.term.reduce(etyp.body(Kind.Term.typ,Kind.Term.typ), defs) as ctor {
all:
let term = Kind.Term.app(expr, Kind.Term.lam("", () Kind.Term.hol(Bits.e)))
let rett = Kind.Term.ref(fkey|"_field")
let sele = Kind.Term.check.expand.get.selector(fkey, ctor.xtyp, defs, rett)
some(Kind.Term.app(term, sele))
} default none
} default none
Kind.Term.check.expand.get.selector(
fkey: String
ctor: Kind.Term
defs: Kind.Defs
rett: Kind.Term
): Kind.Term
case Kind.Term.reduce(ctor, defs) as ctor {
all: Kind.Term.lam(ctor.name, (x)
let body = ctor.body(Kind.Term.typ, Kind.Term.typ)
let rett = if String.eql(ctor.name, fkey) then x else rett
Kind.Term.check.expand.get.selector(fkey, body, defs, rett))
} default rett
// Expands `term@a <- val` into `term(() _)((a) (b) (c) Foo.new(val,b,c))`
Kind.Term.check.expand.set(
expr: Kind.Term
fkey: String
fval: Kind.Term
etyp: Kind.Term
defs: Kind.Defs
): Maybe<Kind.Term>
case Kind.Term.reduce(etyp, defs) as etyp {
all: case Kind.term.reduce(etyp.body(Kind.Term.typ,Kind.Term.typ), defs) as ctor {
all:
let term = Kind.Term.app(expr, Kind.Term.lam("", () Kind.Term.hol(Bits.e)))
let tnam = String.slice(0, Nat.sub(String.length(etyp.self),5), etyp.self)
let rett = Kind.Term.ref(tnam | "." | ctor.name)
let pars = Kind.Term.check.expand.set.count_params(etyp.xtyp)
let rett = for i from 0 to pars: Kind.Term.app(rett, Kind.Term.hol(Bits.e))
let sele = Kind.Term.check.expand.set.selector(fkey, fval, ctor.xtyp, defs, rett)
some(Kind.Term.app(term, sele))
} default none
} default none
Kind.Term.check.expand.set.selector(
fkey: String
fval: Kind.Term
ctor: Kind.Term
defs: Kind.Defs
rett: Kind.Term
): Kind.Term
case Kind.Term.reduce(ctor, defs) as ctor {
all: Kind.Term.lam(ctor.name, (x)
let body = ctor.body(Kind.Term.typ, Kind.Term.typ)
let rett = Kind.Term.app(rett, if String.eql(ctor.name, fkey) then fval else x)
Kind.Term.check.expand.set.selector(fkey, fval, body, defs, rett))
} default rett
// foo(() _)((a) (b) (c) Foo.new(a)(b)(c))
Kind.Term.check.expand.set.count_params(xtyp: Kind.Term): Nat
let {bnds,body} = Kind.Term.get_bnds(xtyp, 0)
let {func,args} = Kind.Term.get_args(Pair.snd!!(List.last!(bnds) <> {"",Kind.Term.typ}))
let indexs = Nat.pred(List.length!(bnds))
let params = Nat.sub(List.length!(args), indexs)
params
// Infers the type of the variables on the 'with' field of Kind.Term.cse
Kind.Term.check.infer_with_types(
Kind.Term.check.infer_types_of_with(
vars: List<Kind.Ann>,
defs: Kind.Defs,
ctx: Kind.Context,
@ -210,7 +320,126 @@ Kind.Term.check.infer_with_types(
return some(vars.head.type.value)
}
}
get rest = Kind.Term.check.infer_with_types(vars.tail, defs, ctx, path, orig)
get rest = Kind.Term.check.infer_types_of_with(vars.tail, defs, ctx, path, orig)
return Kind.Ann.new(vars.head.name, vars.head.term, type) & rest
}
}
Kind.Term.check.expand.cse(
expr: Kind.Term,
name: Kind.Name,
wyth: List<Kind.Ann>,
cses: BitsMap<Kind.Term>,
moti: Maybe<Kind.Term>,
etyp: Kind.Term, // type of expr
rtyp: Maybe<Kind.Term>, // inferred return type
defs: Kind.Defs,
ctxt: Kind.Context,
): Maybe<Kind.Term>
case Kind.Term.reduce(etyp, defs) as etyp {
all:
let moti = Kind.Term.check.expand.cse.motive(wyth, moti, name, expr, etyp, rtyp, defs, List.length!(ctxt));
let argm = Kind.Term.check.expand.cse.argument(name, [], etyp.xtyp, moti, defs);
let expr = Kind.Term.app(expr, argm);
let type = etyp.body(Kind.Term.var(etyp.self,0), Kind.Term.var(etyp.name,0));
Maybe.some!(Kind.Term.check.expand.cse.cases(expr, name, wyth, cses, type, defs, ctxt))
_:
Maybe.none!
}: Maybe<Kind.Term>
Kind.Term.check.expand.cse.argument(
name: Kind.Name,
wyth: List<Kind.Ann>,
type: Kind.Term,
body: Kind.Term,
defs: Kind.Defs,
): Kind.Term
case Kind.Term.reduce(type, defs) as type {
all:
def type = type.body(Kind.Term.var(type.self,0), Kind.Term.var(type.name,0));
def lam_name =
if String.is_empty(type.name) then
name
else
String.flatten([name, ".", type.name]);
def lam_body = (x) Kind.Term.check.expand.cse.argument(name, wyth, type, body, defs);
Kind.Term.lam(lam_name, lam_body),
_: case wyth {
cons:
open wyth.head
def lam_name = wyth.head.name;
def lam_body = (x) Kind.Term.check.expand.cse.argument(name, wyth.tail, type, body, defs);
Kind.Term.lam(lam_name, lam_body)
nil:
body
}
}
Kind.Term.check.expand.cse.cases(
expr: Kind.Term,
name: Kind.Name,
wyth: List<Kind.Ann>,
cses: BitsMap<Kind.Term>,
type: Kind.Term,
defs: Kind.Defs,
ctxt: Kind.Context,
): Kind.Term
case Kind.Term.reduce(type, defs) as type {
all:
let argm = Maybe.or!(Kind.Map.get!(type.name, cses), Kind.Map.get!("_", cses));
let argm = argm <> Kind.Term.ref(name | "_" | type.name | "_case");
let argm = Kind.Term.check.expand.cse.argument(name, wyth, type.xtyp, argm, defs)
let expr = Kind.Term.app(expr, argm);
let type = type.body(Kind.Term.var(type.self,0), Kind.Term.var(type.name,0));
Kind.Term.check.expand.cse.cases(expr, name, wyth, cses, type, defs, ctxt),
_:
let expr = for defn in wyth:
Kind.Term.app(expr, case defn { new: defn.term })
expr
}
Kind.Term.check.expand.cse.motive.go(
wyth: List<Kind.Ann>,
moti: Maybe<Kind.Term>,
name: String,
expr: Kind.Term,
etyp: Kind.Term,
rtyp: Maybe<Kind.Term>,
defs: Kind.Defs,
size: Nat,
): Kind.Term
case wyth {
cons:
open wyth.head
def all_name = wyth.head.name;
def all_xtyp = wyth.head.type <> Kind.Term.hol(Bits.e);
def all_body = (s,x) Kind.Term.check.expand.cse.motive(wyth.tail, moti, name, expr, etyp, rtyp, defs, Nat.succ(Nat.succ(size)));
Kind.Term.all(Bool.false, "", all_name, all_xtyp, all_body)
nil: case moti {
none:
case rtyp {
none:
Kind.Term.hol(Bits.e)
some:
Kind.Term.normalize(rtyp.value, Kind.Map.new!)
}
some:
moti.value
}
}
Kind.Term.check.expand.cse.motive(
wyth: List<Kind.Ann>,
moti: Maybe<Kind.Term>,
name: String,
expr: Kind.Term,
etyp: Kind.Term,
rtyp: Maybe<Kind.Term>,
defs: Kind.Defs,
size: Nat,
): Kind.Term
let done = Kind.Term.check.expand.cse.motive.go(wyth, moti, name, expr, etyp, rtyp, defs, size)
case moti {
none: Kind.Term.SmartMotive.make(name, expr, etyp, done, size, defs)
some: done
}

View File

@ -1,21 +0,0 @@
Kind.Term.desugar_cse(
expr: Kind.Term,
name: Kind.Name,
wyth: List<Kind.Ann>,
cses: BitsMap<Kind.Term>,
moti: Maybe<Kind.Term>,
etyp: Kind.Term, // type of expr
rtyp: Maybe<Kind.Term>, // inferred return type
defs: Kind.Defs,
ctxt: Kind.Context,
): Maybe<Kind.Term>
case Kind.Term.reduce(etyp, defs) as etyp {
all:
let moti = Kind.Term.desugar_cse.motive(wyth, moti, name, expr, etyp, rtyp, defs, List.length!(ctxt));
let argm = Kind.Term.desugar_cse.argument(name, [], etyp.xtyp, moti, defs);
let expr = Kind.Term.app(expr, argm);
let type = etyp.body(Kind.Term.var(etyp.self,0), Kind.Term.var(etyp.name,0));
Maybe.some!(Kind.Term.desugar_cse.cases(expr, name, wyth, cses, type, defs, ctxt))
_:
Maybe.none!
}: Maybe<Kind.Term>

View File

@ -1,27 +0,0 @@
Kind.Term.desugar_cse.argument(
name: Kind.Name,
wyth: List<Kind.Ann>,
type: Kind.Term,
body: Kind.Term,
defs: Kind.Defs,
): Kind.Term
case Kind.Term.reduce(type, defs) as type {
all:
def type = type.body(Kind.Term.var(type.self,0), Kind.Term.var(type.name,0));
def lam_name =
if String.is_empty(type.name) then
name
else
String.flatten([name, ".", type.name]);
def lam_body = (x) Kind.Term.desugar_cse.argument(name, wyth, type, body, defs);
Kind.Term.lam(lam_name, lam_body),
_: case wyth {
cons:
open wyth.head
def lam_name = wyth.head.name;
def lam_body = (x) Kind.Term.desugar_cse.argument(name, wyth.tail, type, body, defs);
Kind.Term.lam(lam_name, lam_body)
nil:
body
}
}

View File

@ -1,22 +0,0 @@
Kind.Term.desugar_cse.cases(
expr: Kind.Term,
name: Kind.Name,
wyth: List<Kind.Ann>,
cses: BitsMap<Kind.Term>,
type: Kind.Term,
defs: Kind.Defs,
ctxt: Kind.Context,
): Kind.Term
case Kind.Term.reduce(type, defs) as type {
all:
let argm = Maybe.or!(Kind.Map.get!(type.name, cses), Kind.Map.get!("_", cses));
let argm = argm <> Kind.Term.ref(name | "_" | type.name | "_case");
let argm = Kind.Term.desugar_cse.argument(name, wyth, type.xtyp, argm, defs)
let expr = Kind.Term.app(expr, argm);
let type = type.body(Kind.Term.var(type.self,0), Kind.Term.var(type.name,0));
Kind.Term.desugar_cse.cases(expr, name, wyth, cses, type, defs, ctxt),
_:
let expr = for defn in wyth:
Kind.Term.app(expr, case defn { new: defn.term })
expr
}

View File

@ -1,45 +0,0 @@
Kind.Term.desugar_cse.motive.go(
wyth: List<Kind.Ann>,
moti: Maybe<Kind.Term>,
name: String,
expr: Kind.Term,
etyp: Kind.Term,
rtyp: Maybe<Kind.Term>,
defs: Kind.Defs,
size: Nat,
): Kind.Term
case wyth {
cons:
open wyth.head
def all_name = wyth.head.name;
def all_xtyp = wyth.head.type <> Kind.Term.hol(Bits.e);
def all_body = (s,x) Kind.Term.desugar_cse.motive(wyth.tail, moti, name, expr, etyp, rtyp, defs, Nat.succ(Nat.succ(size)));
Kind.Term.all(Bool.false, "", all_name, all_xtyp, all_body)
nil: case moti {
none:
case rtyp {
none:
Kind.Term.hol(Bits.e)
some:
Kind.Term.normalize(rtyp.value, Kind.Map.new!)
}
some:
moti.value
}
}
Kind.Term.desugar_cse.motive(
wyth: List<Kind.Ann>,
moti: Maybe<Kind.Term>,
name: String,
expr: Kind.Term,
etyp: Kind.Term,
rtyp: Maybe<Kind.Term>,
defs: Kind.Defs,
size: Nat,
): Kind.Term
let done = Kind.Term.desugar_cse.motive.go(wyth, moti, name, expr, etyp, rtyp, defs, size)
case moti {
none: Kind.Term.SmartMotive.make(name, expr, etyp, done, size, defs)
some: done
}

View File

@ -48,9 +48,7 @@ Kind.Term.expand_ct(term: Kind.Term, defs: Kind.Defs, arity: Nat): Kind.Term
Kind.Term.chr(term.chrx),
str:
Kind.Term.str(term.strx),
cse:
term,
ori:
def expr = Kind.Term.expand_ct(term.expr, defs, 0);
Kind.Term.ori(term.orig, term.expr),
}
} default term

View File

@ -0,0 +1,9 @@
// Gets all arguments of a sequence of applications, returns function.
// - get_args(`(((f x) y) z)`) == {`f`, [`x`,`y`,`z`]}
Kind.Term.get_args(term: Kind.Term): Pair(Kind.Term, List(Kind.Term))
Kind.Term.get_args.go(term, [])
Kind.Term.get_args.go(term: Kind.Term, args: List(Kind.Term)): Pair(Kind.Term, List(Kind.Term))
case term {
app: Kind.Term.get_args.go(term.func, term.argm & args)
} default {term, args}

View File

@ -0,0 +1,9 @@
// Gets all the binders of a sequence of foralls, returns the body.
// - get_bnds(`∀(x:A). ∀(y:B). f`) == {[{"x",A},{"y",B}], `f`}
Kind.Term.get_bnds(term: Kind.Term, depth: Nat): Pair(List(Pair(String,Kind.Term)), Kind.Term)
case term {
all:
let b = term.body(Kind.Term.var(term.self,depth), Kind.Term.var(term.name,Nat.succ(depth)))
let {vars, body} = Kind.Term.get_bnds(b, Nat.succ(Nat.succ(depth)))
{{term.name,term.xtyp} & vars, body}
} default {[], term}

View File

@ -0,0 +1,8 @@
// Gets all the vars of a sequence of lambdas, returns the body.
// - get_vars(`λx. λy. λz. f`) == {["x","y","z"], `f`}
Kind.Term.get_vars(term: Kind.Term, depth: Nat): Pair(List(String), Kind.Term)
case term {
lam:
let {vars, body} = Kind.Term.get_vars(term.body(Kind.Term.var(term.name,depth)), Nat.succ(depth))
{term.name & vars, body}
} default {[], term}

View File

@ -1,19 +1,11 @@
Kind.Term.has_holes(term: Kind.Term): Bool
case term {
ref: false,
var: false,
typ: false,
all: Bool.or(Kind.Term.has_holes(term.xtyp), Kind.Term.has_holes(term.body(Kind.Term.typ,Kind.Term.typ))),
lam: Kind.Term.has_holes(term.body(Kind.Term.typ)),
app: Bool.or(Kind.Term.has_holes(term.func), Kind.Term.has_holes(term.argm)),
let: Bool.or(Kind.Term.has_holes(term.expr), Kind.Term.has_holes(term.body(Kind.Term.typ))),
def: Bool.or(Kind.Term.has_holes(term.expr), Kind.Term.has_holes(term.body(Kind.Term.typ))),
ann: Bool.or(Kind.Term.has_holes(term.term), Kind.Term.has_holes(term.type)),
gol: false,
hol: true,
nat: false,
chr: false,
str: false,
cse: false,
ori: Kind.Term.has_holes(term.expr),
}
} default false

View File

@ -39,8 +39,6 @@ Kind.Term.inline(term: Kind.Term, defs: Kind.Defs): Kind.Term
Kind.Term.chr(term.chrx),
str:
Kind.Term.str(term.strx),
cse:
term,
ori:
Kind.Term.inline(term.expr, defs),
}
} default term

View File

@ -39,8 +39,6 @@ Kind.Term.normalize(term: Kind.Term, defs: Kind.Defs): Kind.Term
Kind.Term.chr(term.chrx),
str:
Kind.Term.str(term.strx),
cse:
term,
ori:
Kind.Term.normalize(term.expr, defs),
}
} default term

View File

@ -58,12 +58,9 @@ Kind.Term.serialize.go(term: Kind.Term, depth: Nat, init: Nat, diff: Bits -> Bit
Kind.Term.serialize.go(Kind.Term.unroll_chr(term.chrx), depth, init, diff, x),
str:
Kind.Term.serialize.go(Kind.Term.unroll_str(term.strx), depth, init, diff, x),
cse:
diff(x),
ori:
Kind.Term.serialize.go(term.expr, depth, init, diff, x),
}
} default diff(x)
Kind.Term.serialize(term: Kind.Term, depth: Nat, side: Bool): Bits
let diff = if side then Bits.o else Bits.i

View File

@ -86,6 +86,19 @@ Kind.Term.show.go(term: Kind.Term, path: Maybe<Bits -> Bits>): String
some: String.flatten([": ", Kind.Term.show.go(term.moti.value, Maybe.none!)]),
};
String.flatten(["case ",expr," as ",name,wyth," { ",cses,"}",moti]),
new:
let args = List.fold!(term.args)!(
((path) []) :: Kind.MPath -> List(String),
(arg,res,path) List.cons!(Kind.Term.show.go(arg, path), res(Kind.MPath.o(path))),
path);
String.flatten(["{", String.join(",",args), "}"])
get:
let expr = Kind.Term.show.go(term.expr, Kind.MPath.o(path));
String.flatten([expr,"@",term.fkey])
set:
let expr = Kind.Term.show.go(term.expr, Kind.MPath.o(path));
let fval = Kind.Term.show.go(term.fval, Kind.MPath.i(path));
String.flatten([expr,"@",term.fkey," <- ",fval])
ori:
Kind.Term.show.go(term.expr, path),
}

8
base/List/last.kind Normal file
View File

@ -0,0 +1,8 @@
List.last<A: Type>(xs: List<A>): Maybe<A>
List.last.go<A>(xs, none)
List.last.go<A: Type>(xs: List<A>, last: Maybe<A>): Maybe<A>
case xs {
nil: last
cons: List.last.go<A>(xs.tail, some(xs.head))
}

View File

@ -1,3 +1,10 @@
Test: _
Vector3D.new(1.0#64, 2.0#64, 3.0#64)
type Foo {
new(x: Nat, y: Nat, z: Nat)
}
ata(a: Foo): Nat
a@x
Test: _
let foo = {1,2,3} :: Foo
foo@x + foo@y

View File

@ -2,4 +2,4 @@ Vector.from_list<A: Type>(xs: List<A>): Vector<A, List.length<A>(xs)>
case xs {
nil : Vector.nil<A>
cons : Vector.ext<A>(_, xs.head, Vector.from_list<A>(xs.tail))
}!
}!

View File

@ -2,4 +2,4 @@ Vector.head<A: Type, size: Nat>(vector: Vector<A, Nat.succ(size)>): A
case vector {
nil: Unit.new
ext: vector.head
}: case vector.size { zero: Unit, succ: A }
}: case vector.size { zero: Unit, succ: A }

View File

@ -1,2 +1,2 @@
Vector.main: Nat
Vector.head<Nat,_>(Vector.from_list<Nat>([1, 2, 3]))
Vector.head<Nat,_>(Vector.from_list<Nat>([1, 2, 3]))

View File

@ -2,4 +2,4 @@ Vector.tail<A: Type, size: Nat>(vector: Vector<A, Nat.succ(size)>): Vector<A, si
case vector {
nil: Unit.new
ext: vector.tail
}: case vector.size { zero: Unit, succ: Vector<A, Nat.pred(vector.size)> }
}: case vector.size { zero: Unit, succ: Vector<A, Nat.pred(vector.size)> }

285
base/Vector3D.kind Normal file
View File

@ -0,0 +1,285 @@
type V3 {
new(x: F64, y: F64, z: F64)
}
V3.map(fn: F64 -> F64, v: V3): V3
open v
V3.new(fn(v.x), fn(v.y), fn(v.z))
V3.get_x(v: V3): F64
open v
v.x
V3.get_y(v: V3): F64
open v
v.y
V3.get_z(v: V3): F64
open v
v.z
V3.map_x(f: F64 -> F64, v: V3): V3
open v
V3.new(f(v.x), v.y, v.z)
V3.map_y(f: F64 -> F64, v: V3): V3
open v
V3.new(v.x, f(v.y), v.z)
V3.map_z(f: F64 -> F64, v: V3)
open v
V3.new(v.x, v.y, f(v.z))
//map_x(fn: Number -> Number, v: V3)
//v <= v3(x = fn(x))
//map_y(fn: Number -> Number, v: V3)
//v <= v3(y = fn(y))
//map_z(fn: Number -> Number, v: V3)
//v <= v3(z = fn(z))
//sub_v3(a: V3, b: V3) : V3
//case a |v3
//case b |v3
//v3(a.x - b.x, a.y - b.y, a.z - b.z)
//add_v3(a: V3, b: V3) : V3
//case a |v3
//case b |v3
//v3(a.x + b.x, a.y + b.y, a.z + b.z)
//mul_v3(a: V3, b: V3) : V3
//case a |v3
//case b |v3
//v3(a.x * b.x, a.y * b.y, a.z * b.z)
//len_v3(a: V3) : Number
//case a |v3
//let sqr = 0
//let sqr = sqr + (a.x * a.x)
//let sqr = sqr + (a.y * a.y)
//let sqr = sqr + (a.z * a.z)
//let sqr = sqr ** 0.5
//sqr
//rot90_v3(a: V3) : V3
//case a |v3
//v3(a.y, 0 - a.x, 0)
//eql_v3(a: V3, b: V3) : Number
//case a |v3
//case b |v3
//(a.x === b.x) && (a.y === b.y) && (a.z === b.z)
//norm_v3(a: V3) : V3
//let l = len_v3(a)
//case a |v3
//v3(a.x \ l, a.y \ l, a.z \ l)
//scale_v3(x: Number, a: V3)
//case a
//| v3 => v3(a.x * x, a.y * x, a.z * x)
//dot_v3(a: V3, b: V3) : Number
//case a |v3
//case b |v3
//let d = 0
//let d = d + (a.x * b.x)
//let d = d + (a.y * b.y)
//let d = d + (a.z * b.z)
//d
//lookat_v3(a: V3, b: V3, c: V3) : V3
//if eql_v3(a, b) then
//c
//else
//norm_v3(sub_v3(b, a))
//sqrdist_v3(a: V3, b: V3) : Number
//case a |v3
//case b |v3
//let d = 0
//let d = d + ((a.x - b.x) ** 2)
//let d = d + ((a.y - b.y) ** 2)
//let d = d + ((a.z - b.z) ** 2)
//d
//dist_v3(a: V3, b: V3) : Number
//sqrdist_v3(a, b) ** 0.5
//// Rotates a vector around an arbitrary point
//// - theta : the angle (in degrees) to rotate,
//// positive values rotate clockwise,
//// while negative rotate counterclockwise
////
//// - v : the vector you want to rotate
////
//// - piv : pivot to be used, if piv = v3(0,0,0)
//// it rotates a vector around the origin
//// center of the screen
//rotate_v3(theta: Number, v: V3, piv: V3) : V3
//case v |v3
//case piv|v3
//let rad = theta * (pi\180)
//let s = sin(rad)
//let c = cos(rad)
//let x = piv.x + ((v.x - piv.x) * c) - ((v.y - piv.y) * s)
//let y = piv.y + ((v.x - piv.x) * s) + ((v.y - piv.y) * c)
//let z = 0
//v3(x, y, z)
//// A finite line segment between two points
//T Segment
//| segment(a: V3, b: V3)
//// An infinite line
//T Line
//| line(pos: V3, dir: V3)
//// A circle/sphere
//T Circle
//| circle(pos: V3, rad: Number)
//// The boundary of a polygon
//T Boundary
//| boundary(points: List(V3))
//// Squared distance between a point and a segment
//point_segment_sqrdist(p: V3, s: Segment) : Number
//case s |segment
//case s.a as a |v3
//case s.b as b |v3
//case p |v3
//let l = 0
//let l = l + ((a.x - b.x) ** 2)
//let l = l + ((a.y - b.y) ** 2)
//let t = 0
//let t = t + ((p.x - a.x) * (b.x - a.x))
//let t = t + ((p.y - a.y) * (b.y - a.y))
//let t = t \ l
//let t = max(0, min(1, t))
//let d = 0
//let k = (p.x - (a.x + (t * (b.x - a.x)))) ** 2
//let d = d + k
//let k = (p.y - (a.y + (t * (b.y - a.y)))) ** 2
//let d = d + k
//d
//// Distance between a point and a segment
//point_segment_dist(p: V3, s: Segment): Number
//point_segment_sqrdist(p, s) ** 0.5
//// The two intersection points of a circle and a line
//circle_line_intersection(circle: Circle, line: Line)
//: Maybe(Pair(V3,V3))
//case circle |circle
//case line |line
//case circle.pos |v3
//case line.pos |v3
//case line.dir |v3
//let cx = circle.pos.x
//let cy = circle.pos.y
//let dx = line.dir.x
//let dy = line.dir.y
//let x1 = line.pos.x - cx
//let y1 = line.pos.y - cy
//let x2 = (line.pos.x + dx) - cx
//let y2 = (line.pos.y + dy) - cy
//let dd = (x1 * y2) - (x2 * y1)
//let de = (circle.rad * circle.rad) - (dd * dd)
//if (de < 0) || (de === 0) then
//none(_)
//else
//let sx = if dy < 0 then 0 - dx else dx
//let sy = if dy < 0 then 0 - dy else dy
//let px = sx * (de ** 0.5)
//let py = sy * (de ** 0.5)
//let qx = dd * dy
//let qy = (0 - dd) * dx
//let ax = qx - px
//let ay = qy - py
//let bx = qx + px
//let by = qy + py
//let ux = ax + cx
//let uy = ay + cy
//let vx = bx + cx
//let vy = by + cy
//some(_ pair(__ v3(ux,uy,0), v3(vx,vy,0)))
//circle_to_circle_hit_dist(a: Circle, d: V3, b: Circle)
//: Maybe(Number)
//case a |circle
//case b |circle
//let r = a.rad
//let c = circle(b.pos, a.rad + b.rad)
//let l = line(a.pos, norm_v3(d))
//let p = circle_line_intersection(c, l)
//case p
//| none => none(_)
//| some =>
//case p.value as p |pair
//let d0 = sqrdist_v3(a.pos, p.fst)
//let d1 = sqrdist_v3(a.pos, p.snd)
//let hp = if d0 < d1 then p.fst else p.snd
//let dt = dot_v3(d, sub_v3(hp, a.pos))
//let ds = sqrdist_v3(hp, a.pos)
//if dt > 0 then
//some(_ ds ** 0.5)
//else
//none(_)
//// Circle-boundary intersection test
//circle_boundary_intersects(c: Circle, b: Boundary): Number
//case b |boundary
//case c |circle
//case b.points as l0
//| nil => 0
//| cons => case l0.tail as l1
//| nil => 0
//| cons =>
//let p0 = l0.head
//let p1 = l1.head
//let sg = segment(p0, p1)
//let cd = point_segment_sqrdist(c.pos, sg)
//if cd < (c.rad * c.rad) then
//1
//else
//let boun = boundary(cons(_ l1.head, l1.tail))
//circle_boundary_intersects(c, boun)
//// Polygon to segments
//polygon_to_segments(pos: V3, dir: V3, pts: List(V3)) : List(Segment)
//let transform = (pnt: V3) =>
//case pnt |v3
//case dir |v3
//let a = atan(dir.y, dir.x)
//let x = (pnt.x * cos(a)) - (pnt.y * sin(a))
//let y = (pnt.x * sin(a)) + (pnt.y * cos(a))
//let z = pnt.z
//add_v3(pos, v3(x,y,z))
//let nil = (pt_a, pt_0) =>
//case pt_0
//|none => nil(_)
//|some => case pt_a
//|none => nil(_)
//|some =>
//let p0 = transform(pt_a.value)
//let p1 = transform(pt_0.value)
//let sg = segment(p0, p1)
//cons(_ sg, nil(_))
//let cons = (pt_b, segs, pt_a, pt_0) =>
//case pt_a
//with pt_b : V3
//with pt_0 : Maybe(V3)
//|none =>
//segs(some(_ pt_b), some(_ pt_b))
//|some =>
//let pt_0 = case pt_0 |none some(_ pt_b) |some pt_0
//let p0 = transform(pt_a.value)
//let p1 = transform(pt_b)
//let sg = segment(p0, p1)
//cons(_ sg, segs(some(_ pt_b), pt_0))
//fold(V3; Maybe(V3) -> Maybe(V3) -> List(Segment);
//nil, cons, pts, none(_), none(_))

16
base/Web/ColD.kind Normal file
View File

@ -0,0 +1,16 @@
Web.ColD: App<Nat>
img = VoxBox.alloc_capacity(65536#32)
init = 0
draw = (state)
let img = VoxBox.Draw.square(10#32, 10#32, 0#32, 5#32, 5#32, (x,y) Col32.new(255#32,0#32,0#32,255#32), img)
DOM.node("div", {}, {}, [
DOM.text("Welcome to ColD :)")
DOM.vbox({}, {}, img)
])
when = (event, state)
App.pass
App.new!(init, draw, when)

View File

@ -1,6 +1,6 @@
{
"name": "kind-lang",
"version": "1.0.45",
"version": "1.0.46",
"description": "Kind-Lang in JavaScript",
"main": "src/kind.js",
"scripts": {

File diff suppressed because it is too large Load Diff

View File

@ -202,7 +202,7 @@ function display_error(name, error){
} catch (e) {
console.log("Sorry, KindJS couldn't handle your input. :( ");
console.log("Try Haskell/Scheme releases!")
//console.log(e);
console.log(e);
}
}
})();

View File

@ -8,8 +8,8 @@ var code_dir = __dirname+"/src";
var kind_dir = __dirname+"/../base";
process.chdir(kind_dir);
//var files = fs.readdirSync("Web").filter(x => x.slice(-5) === ".kind");
var files = ["ColD.kind"]
var files = fs.readdirSync("Web").filter(x => x.slice(-5) === ".kind");
//var files = ["ColD.kind"]
var apps = [];

1938
web/docs/401.index.js Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

3
web/src/apps/Web.ColD.js Normal file
View File

@ -0,0 +1,3 @@
Compilation error.
Couldn 't find or compile term: '
Web.ColD '.

File diff suppressed because one or more lines are too long

View File

@ -366,39 +366,61 @@ module.exports = (function() {
return $34;
};
const DOM$node = x0 => x1 => x2 => x3 => DOM$node$(x0, x1, x2, x3);
function BitsMap$(_A$1) {
var $35 = null;
return $35;
};
const BitsMap = x0 => BitsMap$(x0);
function Map$(_V$1) {
var $36 = null;
return $36;
};
const Map = x0 => Map$(x0);
const BitsMap$new = ({
_: 'BitsMap.new'
});
function List$cons$(_head$2, _tail$3) {
var $35 = ({
_: 'List.cons',
'head': _head$2,
'tail': _tail$3
});
return $35;
};
const List$cons = x0 => x1 => List$cons$(x0, x1);
function DOM$text$(_value$1) {
var $36 = ({
_: 'DOM.text',
'value': _value$1
});
return $36;
};
const DOM$text = x0 => DOM$text$(x0);
const List$nil = ({
_: 'List.nil'
});
function BitsMap$(_A$1) {
var $37 = null;
return $37;
};
const BitsMap = x0 => BitsMap$(x0);
function Map$(_V$1) {
var $38 = null;
return $38;
};
const Map = x0 => Map$(x0);
function BitsMap$tie$(_val$2, _lft$3, _rgt$4) {
var $37 = ({
var $39 = ({
_: 'BitsMap.tie',
'val': _val$2,
'lft': _lft$3,
'rgt': _rgt$4
});
return $37;
return $39;
};
const BitsMap$tie = x0 => x1 => x2 => BitsMap$tie$(x0, x1, x2);
function Maybe$some$(_value$2) {
var $38 = ({
var $40 = ({
_: 'Maybe.some',
'value': _value$2
});
return $38;
return $40;
};
const Maybe$some = x0 => Maybe$some$(x0);
const Maybe$none = ({
@ -414,27 +436,27 @@ module.exports = (function() {
var self = _a$2;
switch (self._) {
case 'Word.o':
var $40 = self.pred;
var $41 = (Word$to_bits$($40) + '0');
var $39 = $41;
var $42 = self.pred;
var $43 = (Word$to_bits$($42) + '0');
var $41 = $43;
break;
case 'Word.i':
var $42 = self.pred;
var $43 = (Word$to_bits$($42) + '1');
var $39 = $43;
var $44 = self.pred;
var $45 = (Word$to_bits$($44) + '1');
var $41 = $45;
break;
case 'Word.e':
var $44 = Bits$e;
var $39 = $44;
var $46 = Bits$e;
var $41 = $46;
break;
};
return $39;
return $41;
};
const Word$to_bits = x0 => Word$to_bits$(x0);
function Nat$succ$(_pred$1) {
var $45 = 1n + _pred$1;
return $45;
var $47 = 1n + _pred$1;
return $47;
};
const Nat$succ = x0 => Nat$succ$(x0);
const Nat$zero = 0n;
@ -443,15 +465,15 @@ module.exports = (function() {
function String$to_bits$(_str$1) {
var self = _str$1;
if (self.length === 0) {
var $47 = Bits$e;
var $46 = $47;
var $49 = Bits$e;
var $48 = $49;
} else {
var $48 = self.charCodeAt(0);
var $49 = self.slice(1);
var $50 = (String$to_bits$($49) + (u16_to_bits($48)));
var $46 = $50;
var $50 = self.charCodeAt(0);
var $51 = self.slice(1);
var $52 = (String$to_bits$($51) + (u16_to_bits($50)));
var $48 = $52;
};
return $46;
return $48;
};
const String$to_bits = x0 => String$to_bits$(x0);
@ -459,55 +481,33 @@ module.exports = (function() {
var self = _xs$2;
switch (self._) {
case 'List.cons':
var $52 = self.head;
var $53 = self.tail;
var self = $52;
var $54 = self.head;
var $55 = self.tail;
var self = $54;
switch (self._) {
case 'Pair.new':
var $55 = self.fst;
var $56 = self.snd;
var $57 = (bitsmap_set(String$to_bits$($55), $56, Map$from_list$($53), 'set'));
var $54 = $57;
var $57 = self.fst;
var $58 = self.snd;
var $59 = (bitsmap_set(String$to_bits$($57), $58, Map$from_list$($55), 'set'));
var $56 = $59;
break;
};
var $51 = $54;
var $53 = $56;
break;
case 'List.nil':
var $58 = BitsMap$new;
var $51 = $58;
var $60 = BitsMap$new;
var $53 = $60;
break;
};
return $51;
return $53;
};
const Map$from_list = x0 => Map$from_list$(x0);
const List$nil = ({
_: 'List.nil'
});
function Pair$(_A$1, _B$2) {
var $59 = null;
return $59;
};
const Pair = x0 => x1 => Pair$(x0, x1);
function List$cons$(_head$2, _tail$3) {
var $60 = ({
_: 'List.cons',
'head': _head$2,
'tail': _tail$3
});
return $60;
};
const List$cons = x0 => x1 => List$cons$(x0, x1);
function DOM$text$(_value$1) {
var $61 = ({
_: 'DOM.text',
'value': _value$1
});
var $61 = null;
return $61;
};
const DOM$text = x0 => DOM$text$(x0);
const Pair = x0 => x1 => Pair$(x0, x1);
function Pair$new$(_fst$3, _snd$4) {
var $62 = ({
@ -596,7 +596,7 @@ module.exports = (function() {
const Web$Kind$constant$primary_color = "#71558C";
function Web$Kind$comp$heading$(_typography$1, _title$2) {
var $79 = DOM$node$("div", Map$from_list$(List$nil), Map$union$(_typography$1, Map$from_list$(List$cons$(Pair$new$("width", "100%"), List$nil))), List$cons$(DOM$text$(_title$2), List$nil));
var $79 = DOM$node$("div", BitsMap$new, Map$union$(_typography$1, Map$from_list$(List$cons$(Pair$new$("width", "100%"), List$nil))), List$cons$(DOM$text$(_title$2), List$nil));
return $79;
};
const Web$Kind$comp$heading = x0 => x1 => Web$Kind$comp$heading$(x0, x1);
@ -1086,7 +1086,7 @@ module.exports = (function() {
const Web$Kind$typography$subtitle = Map$from_list$(List$cons$(Pair$new$("font-size", Web$Kind$typography$xxl), List$cons$(Pair$new$("font-family", Web$Kind$typography$typeface_header), List$cons$(Pair$new$("font-weight", "700"), List$cons$(Pair$new$("text-align", "center"), List$cons$(Pair$new$("line-height", "1.5"), List$nil))))));
function Web$Kind$comp$title_phone$(_title$1) {
var $182 = DOM$node$("div", Map$from_list$(List$nil), Map$union$(Web$Kind$typography$subtitle, Map$from_list$(List$cons$(Pair$new$("margin-top", "1em"), List$cons$(Pair$new$("width", "100%"), List$nil)))), List$cons$(DOM$text$(_title$1), List$nil));
var $182 = DOM$node$("div", BitsMap$new, Map$union$(Web$Kind$typography$subtitle, Map$from_list$(List$cons$(Pair$new$("margin-top", "1em"), List$cons$(Pair$new$("width", "100%"), List$nil)))), List$cons$(DOM$text$(_title$1), List$nil));
return $182;
};
const Web$Kind$comp$title_phone = x0 => Web$Kind$comp$title_phone$(x0);
@ -1094,7 +1094,7 @@ module.exports = (function() {
const Web$Kind$typography$title = Map$from_list$(List$cons$(Pair$new$("font-size", Web$Kind$typography$xxxl), List$cons$(Pair$new$("font-family", Web$Kind$typography$typeface_header), List$cons$(Pair$new$("font-weight", "700"), List$cons$(Pair$new$("text-align", "center"), List$cons$(Pair$new$("line-height", "1.5"), List$nil))))));
function Web$Kind$comp$title$(_title$1) {
var $183 = DOM$node$("div", Map$from_list$(List$nil), Map$union$(Web$Kind$typography$title, Map$from_list$(List$cons$(Pair$new$("margin-top", "1em"), List$cons$(Pair$new$("width", "100%"), List$nil)))), List$cons$(DOM$text$(_title$1), List$nil));
var $183 = DOM$node$("div", BitsMap$new, Map$union$(Web$Kind$typography$title, Map$from_list$(List$cons$(Pair$new$("margin-top", "1em"), List$cons$(Pair$new$("width", "100%"), List$nil)))), List$cons$(DOM$text$(_title$1), List$nil));
return $183;
};
const Web$Kind$comp$title = x0 => Web$Kind$comp$title$(x0);
@ -1296,7 +1296,7 @@ module.exports = (function() {
var $227 = self.page;
var $228 = self.mouse_over;
var _tabs$5 = List$cons$(Web$Kind$comp$header_tab$(Web$Kind$helper$is_eql$(Web$Kind$Page$home, $227), ("tab_home" === $228), "Home", "tab_home"), List$cons$(Web$Kind$comp$header_tab$(Web$Kind$helper$is_eql$(Web$Kind$Page$apps, $227), ("tab_apps" === $228), "Apps", "tab_apps"), List$nil));
var $229 = DOM$node$("div", Map$from_list$(List$nil), Map$union$(Web$Kind$typography$button, Map$from_list$(List$cons$(Pair$new$("padding-top", "0.5em"), List$cons$(Pair$new$("display", "flex"), List$cons$(Pair$new$("flex-direction", "row"), List$nil))))), _tabs$5);
var $229 = DOM$node$("div", BitsMap$new, Map$union$(Web$Kind$typography$button, Map$from_list$(List$cons$(Pair$new$("padding-top", "0.5em"), List$cons$(Pair$new$("display", "flex"), List$cons$(Pair$new$("flex-direction", "row"), List$nil))))), _tabs$5);
var $226 = $229;
break;
};
@ -1310,7 +1310,7 @@ module.exports = (function() {
case 'Web.Kind.State.new':
var $231 = self.device;
var _vbox$6 = VoxBox$alloc_capacity$(100);
var _line$7 = DOM$node$("div", Map$from_list$(List$nil), Map$from_list$(List$cons$(Pair$new$("margin", "auto"), List$cons$(Pair$new$("max-width", "65em"), List$cons$(Pair$new$("padding", "0.5em 0"), List$nil)))), List$cons$(DOM$node$("div", Map$from_list$(List$nil), Map$from_list$(List$cons$(Pair$new$("height", "3pt"), List$cons$(Pair$new$("border-top", (Web$Kind$constant$primary_color + " dashed 1pt")), List$cons$(Pair$new$("border-bottom", (Web$Kind$constant$primary_color + " dashed 1pt")), List$cons$(Pair$new$("margin-left", "10%"), List$cons$(Pair$new$("margin-right", "10%"), List$nil)))))), List$nil), List$nil));
var _line$7 = DOM$node$("div", BitsMap$new, Map$from_list$(List$cons$(Pair$new$("margin", "auto"), List$cons$(Pair$new$("max-width", "65em"), List$cons$(Pair$new$("padding", "0.5em 0"), List$nil)))), List$cons$(DOM$node$("div", BitsMap$new, Map$from_list$(List$cons$(Pair$new$("height", "3pt"), List$cons$(Pair$new$("border-top", (Web$Kind$constant$primary_color + " dashed 1pt")), List$cons$(Pair$new$("border-bottom", (Web$Kind$constant$primary_color + " dashed 1pt")), List$cons$(Pair$new$("margin-left", "10%"), List$cons$(Pair$new$("margin-right", "10%"), List$nil)))))), List$nil), List$nil));
var $232 = DOM$node$("div", Map$from_list$(List$cons$(Pair$new$("id", "header"), List$nil)), _container_layout$2, List$cons$((() => {
var self = $231;
switch (self._) {
@ -1351,13 +1351,13 @@ module.exports = (function() {
let _item$3;
while ($239._ === 'List.cons') {
_item$3 = $239.head;
var $238 = List$cons$(DOM$node$("li", Map$from_list$(List$nil), Map$from_list$(List$cons$(Pair$new$("line-height", "1.35"), List$nil)), List$cons$(_item$3, List$nil)), _li$4);
var $238 = List$cons$(DOM$node$("li", BitsMap$new, Map$from_list$(List$cons$(Pair$new$("line-height", "1.35"), List$nil)), List$cons$(_item$3, List$nil)), _li$4);
_li$4 = $238;
$239 = $239.tail;
}
return _li$4;
})();
var $236 = DOM$node$("ul", Map$from_list$(List$nil), Map$from_list$(List$cons$(Pair$new$("list-style-type", "none"), List$nil)), _li$3);
var $236 = DOM$node$("ul", BitsMap$new, Map$from_list$(List$cons$(Pair$new$("list-style-type", "none"), List$nil)), _li$3);
return $236;
};
const Web$Kind$comp$list = x0 => Web$Kind$comp$list$(x0);
@ -1422,11 +1422,11 @@ module.exports = (function() {
var _heading_typography$6 = $249;
break;
};
var _join_us_txt$7 = DOM$node$("div", Map$from_list$(List$nil), Map$from_list$(List$nil), List$cons$(Web$Kind$comp$heading$(_heading_typography$6, "Join Us"), List$cons$(DOM$node$("div", Map$from_list$(List$nil), Map$from_list$(List$nil), List$cons$(Web$Kind$comp$list$(List$cons$(Web$Kind$comp$link_white$("Github", _footer_font_size$4, "https://github.com/uwu-tech/Kind"), List$cons$(Web$Kind$comp$link_white$("Telegram", _footer_font_size$4, "https://t.me/formality_lang"), List$nil))), List$nil)), List$nil)));
var _join_us$8 = DOM$node$("div", Map$from_list$(List$nil), Map$union$(_container_layout$2, Map$from_list$(List$cons$(Pair$new$("display", "flex"), List$cons$(Pair$new$("flex-direction", "row"), List$cons$(Pair$new$("justify-content", "space-between"), List$cons$(Pair$new$("align-items", "flex-end"), List$nil)))))), List$cons$(_join_us_txt$7, List$cons$(DOM$node$("div", Map$from_list$(List$nil), Map$from_list$(List$cons$(Pair$new$("font-size", _footer_font_size$4), List$nil)), List$cons$(DOM$text$("\u{2764} by UwU Tech"), List$nil)), List$nil)));
var _join_us_wrapper$9 = DOM$node$("div", Map$from_list$(List$nil), Map$from_list$(List$cons$(Pair$new$("padding", _vertical_padding$3), List$cons$(Pair$new$("background-color", Web$Kind$constant$primary_color), List$nil))), List$cons$(_join_us$8, List$nil));
var _msg_footer$10 = DOM$node$("div", Map$from_list$(List$nil), Map$union$(_container_layout$2, Map$from_list$(List$cons$(Pair$new$("display", "flex"), List$cons$(Pair$new$("flex-direction", "column"), List$cons$(Pair$new$("justify-content", "center"), List$cons$(Pair$new$("align-items", "center"), List$nil)))))), List$cons$(DOM$node$("p", Map$from_list$(List$nil), Map$from_list$(List$cons$(Pair$new$("font-size", _footer_font_size_s$5), List$nil)), List$cons$(DOM$text$("This website was created using Kind!"), List$nil)), List$cons$(Web$Kind$comp$link_white$("*u* show me the code!", _footer_font_size_s$5, "https://github.com/uwu-tech/Kind/blob/master/base/Web/Kind.kind"), List$nil)));
var _msg_footer_wrapper$11 = DOM$node$("div", Map$from_list$(List$nil), Map$from_list$(List$cons$(Pair$new$("padding", "0.5em 0"), List$cons$(Pair$new$("background-color", Web$Kind$constant$dark_pri_color), List$nil))), List$cons$(_msg_footer$10, List$nil));
var _join_us_txt$7 = DOM$node$("div", BitsMap$new, BitsMap$new, List$cons$(Web$Kind$comp$heading$(_heading_typography$6, "Join Us"), List$cons$(DOM$node$("div", BitsMap$new, BitsMap$new, List$cons$(Web$Kind$comp$list$(List$cons$(Web$Kind$comp$link_white$("Github", _footer_font_size$4, "https://github.com/uwu-tech/Kind"), List$cons$(Web$Kind$comp$link_white$("Telegram", _footer_font_size$4, "https://t.me/formality_lang"), List$nil))), List$nil)), List$nil)));
var _join_us$8 = DOM$node$("div", BitsMap$new, Map$union$(_container_layout$2, Map$from_list$(List$cons$(Pair$new$("display", "flex"), List$cons$(Pair$new$("flex-direction", "row"), List$cons$(Pair$new$("justify-content", "space-between"), List$cons$(Pair$new$("align-items", "flex-end"), List$nil)))))), List$cons$(_join_us_txt$7, List$cons$(DOM$node$("div", BitsMap$new, Map$from_list$(List$cons$(Pair$new$("font-size", _footer_font_size$4), List$nil)), List$cons$(DOM$text$("\u{2764} by UwU Tech"), List$nil)), List$nil)));
var _join_us_wrapper$9 = DOM$node$("div", BitsMap$new, Map$from_list$(List$cons$(Pair$new$("padding", _vertical_padding$3), List$cons$(Pair$new$("background-color", Web$Kind$constant$primary_color), List$nil))), List$cons$(_join_us$8, List$nil));
var _msg_footer$10 = DOM$node$("div", BitsMap$new, Map$union$(_container_layout$2, Map$from_list$(List$cons$(Pair$new$("display", "flex"), List$cons$(Pair$new$("flex-direction", "column"), List$cons$(Pair$new$("justify-content", "center"), List$cons$(Pair$new$("align-items", "center"), List$nil)))))), List$cons$(DOM$node$("p", BitsMap$new, Map$from_list$(List$cons$(Pair$new$("font-size", _footer_font_size_s$5), List$nil)), List$cons$(DOM$text$("This website was created using Kind!"), List$nil)), List$cons$(Web$Kind$comp$link_white$("*u* show me the code!", _footer_font_size_s$5, "https://github.com/uwu-tech/Kind/blob/master/base/Web/Kind.kind"), List$nil)));
var _msg_footer_wrapper$11 = DOM$node$("div", BitsMap$new, Map$from_list$(List$cons$(Pair$new$("padding", "0.5em 0"), List$cons$(Pair$new$("background-color", Web$Kind$constant$dark_pri_color), List$nil))), List$cons$(_msg_footer$10, List$nil));
var $241 = DOM$node$("div", Map$from_list$(List$cons$(Pair$new$("id", "footer"), List$nil)), Map$from_list$(List$cons$(Pair$new$("display", "flex"), List$cons$(Pair$new$("flex-direction", "column"), List$cons$(Pair$new$("color", "white"), List$nil)))), List$cons$(_join_us_wrapper$9, List$cons$(_msg_footer_wrapper$11, List$nil)));
return $241;
};
@ -1478,16 +1478,16 @@ module.exports = (function() {
case 'Web.Kind.State.new':
var $258 = self.device;
var _span$5 = (_txt$5 => {
var $260 = DOM$node$("span", Map$from_list$(List$nil), Map$from_list$(List$nil), List$cons$(DOM$text$(_txt$5), List$nil));
var $260 = DOM$node$("span", BitsMap$new, BitsMap$new, List$cons$(DOM$text$(_txt$5), List$nil));
return $260;
});
var _line$6 = (_txt$6 => {
var $261 = DOM$node$("p", Map$from_list$(List$nil), Map$from_list$(List$nil), List$cons$(DOM$text$(_txt$6), List$nil));
var $261 = DOM$node$("p", BitsMap$new, BitsMap$new, List$cons$(DOM$text$(_txt$6), List$nil));
return $261;
});
var _line_break$7 = DOM$node$("br", Map$from_list$(List$nil), Map$from_list$(List$nil), List$nil);
var _line_break$7 = DOM$node$("br", BitsMap$new, BitsMap$new, List$nil);
var _span_bold$8 = (_txt$8 => {
var $262 = DOM$node$("span", Map$from_list$(List$nil), Web$Kind$typography$body_strong, List$cons$(DOM$text$(_txt$8), List$nil));
var $262 = DOM$node$("span", BitsMap$new, Web$Kind$typography$body_strong, List$cons$(DOM$text$(_txt$8), List$nil));
return $262;
});
var self = $258;
@ -1516,11 +1516,11 @@ module.exports = (function() {
var _heading_typography$10 = $266;
break;
};
var _intro$11 = DOM$node$("div", Map$from_list$(List$nil), Web$Kind$typography$body, List$cons$(_span$5("Kind is a cute "), List$cons$(_span_bold$8("proof"), List$cons$(_span$5("gramming language."), List$cons$(_line_break$7, List$cons$(_line_break$7, List$cons$(_span$5("It\'s "), List$cons$(_span_bold$8("capable of everything"), List$cons$(_line$6("from web apps to games to"), List$cons$(_line$6("advanced mathematical proofs."), List$nil))))))))));
var _croni$12 = DOM$node$("div", Map$from_list$(List$nil), Map$from_list$(List$cons$(Pair$new$("margin-left", "3em"), List$cons$(Pair$new$("display", "flex"), List$cons$(Pair$new$("justify-content", "flex-end"), List$nil)))), List$cons$(_span$5("gl hf!"), List$cons$(DOM$node$("img", Map$from_list$(List$cons$(Pair$new$("src", Web$Kind$img$croni), List$nil)), Map$from_list$(List$cons$(Pair$new$("width", "2em"), List$cons$(Pair$new$("height", "2em"), List$nil))), List$nil), List$nil)));
var _call_to_apps$12 = DOM$node$("div", Map$from_list$(List$nil), Map$from_list$(List$cons$(Pair$new$("height", _go_to_apps_height$9), List$cons$(Pair$new$("display", "flex"), List$cons$(Pair$new$("align-items", "center"), List$cons$(Pair$new$("justify-content", "center"), List$nil))))), List$cons$(Web$Kind$comp$btn_primary_solid$("GO TO APPS", "btn_pri_home_go_to_apps"), List$cons$(_croni$12, List$nil)));
var _instructions$13 = DOM$node$("div", Map$from_list$(List$nil), Map$union$(Web$Kind$typography$code, Map$from_list$(List$cons$(Pair$new$("margin-top", "0.5em"), List$cons$(Pair$new$("padding", "0.5em"), List$cons$(Pair$new$("box-shadow", (Web$Kind$constant$primary_color + " -2px 2px 1px")), List$cons$(Pair$new$("border", "1px solid"), List$nil)))))), List$cons$(_line$6("npm i -g kind-lang"), List$cons$(_line$6("git clone https://github.com/uwu-tech/Kind"), List$cons$(_line$6("cd Kind/base"), List$cons$(_line$6("kind Main"), List$cons$(_line$6("kind Main --run"), List$nil))))));
var _install$13 = DOM$node$("div", Map$from_list$(List$cons$(Pair$new$("id", "instructions"), List$nil)), Map$from_list$(List$nil), List$cons$(Web$Kind$comp$heading$(_heading_typography$10, "Install"), List$cons$(_instructions$13, List$nil)));
var _intro$11 = DOM$node$("div", BitsMap$new, Web$Kind$typography$body, List$cons$(_span$5("Kind is a cute "), List$cons$(_span_bold$8("proof"), List$cons$(_span$5("gramming language."), List$cons$(_line_break$7, List$cons$(_line_break$7, List$cons$(_span$5("It\'s "), List$cons$(_span_bold$8("capable of everything"), List$cons$(_line$6("from web apps to games to"), List$cons$(_line$6("advanced mathematical proofs."), List$nil))))))))));
var _croni$12 = DOM$node$("div", BitsMap$new, Map$from_list$(List$cons$(Pair$new$("margin-left", "3em"), List$cons$(Pair$new$("display", "flex"), List$cons$(Pair$new$("justify-content", "flex-end"), List$nil)))), List$cons$(_span$5("gl hf!"), List$cons$(DOM$node$("img", Map$from_list$(List$cons$(Pair$new$("src", Web$Kind$img$croni), List$nil)), Map$from_list$(List$cons$(Pair$new$("width", "2em"), List$cons$(Pair$new$("height", "2em"), List$nil))), List$nil), List$nil)));
var _call_to_apps$12 = DOM$node$("div", BitsMap$new, Map$from_list$(List$cons$(Pair$new$("height", _go_to_apps_height$9), List$cons$(Pair$new$("display", "flex"), List$cons$(Pair$new$("align-items", "center"), List$cons$(Pair$new$("justify-content", "center"), List$nil))))), List$cons$(Web$Kind$comp$btn_primary_solid$("GO TO APPS", "btn_pri_home_go_to_apps"), List$cons$(_croni$12, List$nil)));
var _instructions$13 = DOM$node$("div", BitsMap$new, Map$union$(Web$Kind$typography$code, Map$from_list$(List$cons$(Pair$new$("margin-top", "0.5em"), List$cons$(Pair$new$("padding", "0.5em"), List$cons$(Pair$new$("box-shadow", (Web$Kind$constant$primary_color + " -2px 2px 1px")), List$cons$(Pair$new$("border", "1px solid"), List$nil)))))), List$cons$(_line$6("npm i -g kind-lang"), List$cons$(_line$6("git clone https://github.com/uwu-tech/Kind"), List$cons$(_line$6("cd Kind/base"), List$cons$(_line$6("kind Main"), List$cons$(_line$6("kind Main --run"), List$nil))))));
var _install$13 = DOM$node$("div", Map$from_list$(List$cons$(Pair$new$("id", "instructions"), List$nil)), BitsMap$new, List$cons$(Web$Kind$comp$heading$(_heading_typography$10, "Install"), List$cons$(_instructions$13, List$nil)));
var $259 = Web$Kind$comp$page$("home", _stt$1, List$cons$(_intro$11, List$cons$(_call_to_apps$12, List$cons$(_install$13, List$nil))));
var $257 = $259;
break;
@ -1531,7 +1531,7 @@ module.exports = (function() {
function Web$Kind$comp$game_card$(_src$1, _title$2, _path$3) {
var _banner$4 = DOM$node$("img", Map$from_list$(List$cons$(Pair$new$("src", _src$1), List$nil)), Map$from_list$(List$cons$(Pair$new$("width", "100px"), List$cons$(Pair$new$("height", "100px"), List$nil))), List$nil);
var $267 = DOM$node$("a", Map$from_list$(List$cons$(Pair$new$("href", _path$3), List$cons$(Pair$new$("target", "_blank"), List$nil))), Map$from_list$(List$cons$(Pair$new$("cursor", "pointer"), List$cons$(Pair$new$("color", "black"), List$cons$(Pair$new$("text-decoration", "none"), List$nil)))), List$cons$(DOM$node$("div", Map$from_list$(List$nil), Map$from_list$(List$cons$(Pair$new$("height", "120px"), List$cons$(Pair$new$("display", "flex"), List$cons$(Pair$new$("flex-direction", "column"), List$cons$(Pair$new$("margin", "10px 20px"), List$cons$(Pair$new$("border", "solid 1px"), List$cons$(Pair$new$("padding", "2px"), List$nil))))))), List$cons$(_banner$4, List$cons$(DOM$text$(_title$2), List$nil))), List$nil));
var $267 = DOM$node$("a", Map$from_list$(List$cons$(Pair$new$("href", _path$3), List$cons$(Pair$new$("target", "_blank"), List$nil))), Map$from_list$(List$cons$(Pair$new$("cursor", "pointer"), List$cons$(Pair$new$("color", "black"), List$cons$(Pair$new$("text-decoration", "none"), List$nil)))), List$cons$(DOM$node$("div", BitsMap$new, Map$from_list$(List$cons$(Pair$new$("height", "120px"), List$cons$(Pair$new$("display", "flex"), List$cons$(Pair$new$("flex-direction", "column"), List$cons$(Pair$new$("margin", "10px 20px"), List$cons$(Pair$new$("border", "solid 1px"), List$cons$(Pair$new$("padding", "2px"), List$nil))))))), List$cons$(_banner$4, List$cons$(DOM$text$(_title$2), List$nil))), List$nil));
return $267;
};
const Web$Kind$comp$game_card = x0 => x1 => x2 => Web$Kind$comp$game_card$(x0, x1, x2);
@ -1548,9 +1548,9 @@ module.exports = (function() {
const Web$Kind$content_apps_text = Web$Kind$comp$list$(List$cons$(Web$Kind$comp$link_black$("Demo", "Web.Demo"), List$cons$(Web$Kind$comp$link_black$("Online", "Web.Online"), List$nil)));
function Web$Kind$draw_page_apps$(_stt$1) {
var _with_banner$2 = DOM$node$("div", Map$from_list$(List$nil), Map$from_list$(List$cons$(Pair$new$("display", "flex"), List$cons$(Pair$new$("justify-content", "flex-start"), List$cons$(Pair$new$("flex-direction", "row"), List$cons$(Pair$new$("flex-wrap", "wrap"), List$nil))))), Web$Kind$content_apps);
var _no_banner$3 = DOM$node$("div", Map$from_list$(List$nil), Map$from_list$(List$cons$(Pair$new$("margin-top", "2em"), List$nil)), List$cons$(Web$Kind$content_apps_text, List$nil));
var _games$2 = DOM$node$("div", Map$from_list$(List$cons$(Pair$new$("id", "game-container"), List$nil)), Map$from_list$(List$nil), List$cons$(Web$Kind$comp$heading$(Web$Kind$typography$h1, "Games"), List$cons$(_with_banner$2, List$cons$(_no_banner$3, List$nil))));
var _with_banner$2 = DOM$node$("div", BitsMap$new, Map$from_list$(List$cons$(Pair$new$("display", "flex"), List$cons$(Pair$new$("justify-content", "flex-start"), List$cons$(Pair$new$("flex-direction", "row"), List$cons$(Pair$new$("flex-wrap", "wrap"), List$nil))))), Web$Kind$content_apps);
var _no_banner$3 = DOM$node$("div", BitsMap$new, Map$from_list$(List$cons$(Pair$new$("margin-top", "2em"), List$nil)), List$cons$(Web$Kind$content_apps_text, List$nil));
var _games$2 = DOM$node$("div", Map$from_list$(List$cons$(Pair$new$("id", "game-container"), List$nil)), BitsMap$new, List$cons$(Web$Kind$comp$heading$(Web$Kind$typography$h1, "Games"), List$cons$(_with_banner$2, List$cons$(_no_banner$3, List$nil))));
var $269 = Web$Kind$comp$page$("apps", _stt$1, List$cons$(_games$2, List$nil));
return $269;
};
@ -1891,9 +1891,12 @@ module.exports = (function() {
'Device.big_desktop': Device$big_desktop,
'Web.Kind.Page.home': Web$Kind$Page$home,
'DOM.node': DOM$node,
'BitsMap.new': BitsMap$new,
'List.cons': List$cons,
'DOM.text': DOM$text,
'List.nil': List$nil,
'BitsMap': BitsMap,
'Map': Map,
'BitsMap.new': BitsMap$new,
'BitsMap.tie': BitsMap$tie,
'Maybe.some': Maybe$some,
'Maybe.none': Maybe$none,
@ -1908,10 +1911,7 @@ module.exports = (function() {
'U16.to_bits': U16$to_bits,
'String.to_bits': String$to_bits,
'Map.from_list': Map$from_list,
'List.nil': List$nil,
'Pair': Pair,
'List.cons': List$cons,
'DOM.text': DOM$text,
'Pair.new': Pair$new,
'Web.Kind.typography.body_size': Web$Kind$typography$body_size,
'Web.Kind.typography.typeface_body': Web$Kind$typography$typeface_body,

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -802,7 +802,7 @@ module.exports = (function() {
var _v02$10 = Maybe$default$(List$get$(0n, Maybe$default$(List$get$(2n, _state$3), List$nil)), "");
var _v12$11 = Maybe$default$(List$get$(1n, Maybe$default$(List$get$(2n, _state$3), List$nil)), "");
var _v22$12 = Maybe$default$(List$get$(2n, Maybe$default$(List$get$(2n, _state$3), List$nil)), "");
var $122 = DOM$node$("div", Map$from_list$(List$nil), Map$from_list$(List$nil), List$cons$(DOM$text$(("Estado: " + List$show$(String$join(","), _state$3))), List$cons$(DOM$node$("table", Map$from_list$(List$nil), Map$from_list$(List$nil), List$cons$(DOM$node$("tr", Map$from_list$(List$nil), Map$from_list$(List$nil), List$cons$(DOM$node$("td", Map$from_list$(List$cons$(Pair$new$("id", "00"), List$nil)), _place_style$1, List$cons$(DOM$text$(_v00$4), List$nil)), List$cons$(DOM$node$("td", Map$from_list$(List$cons$(Pair$new$("id", "10"), List$nil)), _place_style$1, List$cons$(DOM$text$(_v10$5), List$nil)), List$cons$(DOM$node$("td", Map$from_list$(List$cons$(Pair$new$("id", "20"), List$nil)), _place_style$1, List$cons$(DOM$text$(_v20$6), List$nil)), List$nil)))), List$cons$(DOM$node$("tr", Map$from_list$(List$nil), Map$from_list$(List$nil), List$cons$(DOM$node$("td", Map$from_list$(List$cons$(Pair$new$("id", "01"), List$nil)), _place_style$1, List$cons$(DOM$text$(_v01$7), List$nil)), List$cons$(DOM$node$("td", Map$from_list$(List$cons$(Pair$new$("id", "11"), List$nil)), _place_style$1, List$cons$(DOM$text$(_v11$8), List$nil)), List$cons$(DOM$node$("td", Map$from_list$(List$cons$(Pair$new$("id", "21"), List$nil)), _place_style$1, List$cons$(DOM$text$(_v21$9), List$nil)), List$nil)))), List$cons$(DOM$node$("tr", Map$from_list$(List$nil), Map$from_list$(List$nil), List$cons$(DOM$node$("td", Map$from_list$(List$cons$(Pair$new$("id", "02"), List$nil)), _place_style$1, List$cons$(DOM$text$(_v02$10), List$nil)), List$cons$(DOM$node$("td", Map$from_list$(List$cons$(Pair$new$("id", "12"), List$nil)), _place_style$1, List$cons$(DOM$text$(_v12$11), List$nil)), List$cons$(DOM$node$("td", Map$from_list$(List$cons$(Pair$new$("id", "22"), List$nil)), _place_style$1, List$cons$(DOM$text$(_v22$12), List$nil)), List$nil)))), List$nil)))), List$nil)));
var $122 = DOM$node$("div", BitsMap$new, BitsMap$new, List$cons$(DOM$text$(("Estado: " + List$show$(String$join(","), _state$3))), List$cons$(DOM$node$("table", BitsMap$new, BitsMap$new, List$cons$(DOM$node$("tr", BitsMap$new, BitsMap$new, List$cons$(DOM$node$("td", Map$from_list$(List$cons$(Pair$new$("id", "00"), List$nil)), _place_style$1, List$cons$(DOM$text$(_v00$4), List$nil)), List$cons$(DOM$node$("td", Map$from_list$(List$cons$(Pair$new$("id", "10"), List$nil)), _place_style$1, List$cons$(DOM$text$(_v10$5), List$nil)), List$cons$(DOM$node$("td", Map$from_list$(List$cons$(Pair$new$("id", "20"), List$nil)), _place_style$1, List$cons$(DOM$text$(_v20$6), List$nil)), List$nil)))), List$cons$(DOM$node$("tr", BitsMap$new, BitsMap$new, List$cons$(DOM$node$("td", Map$from_list$(List$cons$(Pair$new$("id", "01"), List$nil)), _place_style$1, List$cons$(DOM$text$(_v01$7), List$nil)), List$cons$(DOM$node$("td", Map$from_list$(List$cons$(Pair$new$("id", "11"), List$nil)), _place_style$1, List$cons$(DOM$text$(_v11$8), List$nil)), List$cons$(DOM$node$("td", Map$from_list$(List$cons$(Pair$new$("id", "21"), List$nil)), _place_style$1, List$cons$(DOM$text$(_v21$9), List$nil)), List$nil)))), List$cons$(DOM$node$("tr", BitsMap$new, BitsMap$new, List$cons$(DOM$node$("td", Map$from_list$(List$cons$(Pair$new$("id", "02"), List$nil)), _place_style$1, List$cons$(DOM$text$(_v02$10), List$nil)), List$cons$(DOM$node$("td", Map$from_list$(List$cons$(Pair$new$("id", "12"), List$nil)), _place_style$1, List$cons$(DOM$text$(_v12$11), List$nil)), List$cons$(DOM$node$("td", Map$from_list$(List$cons$(Pair$new$("id", "22"), List$nil)), _place_style$1, List$cons$(DOM$text$(_v22$12), List$nil)), List$nil)))), List$nil)))), List$nil)));
return $122;
});
var _when$4 = (_event$4 => _state$5 => {

View File

@ -1,3 +1,9 @@
module.exports = {
'Web.ColD': import('./Web.ColD.js'),
'Web.Demo': import('./Web.Demo.js'),
'Web.Kaelin': import('./Web.Kaelin.js'),
'Web.Kind': import('./Web.Kind.js'),
'Web.Online': import('./Web.Online.js'),
'Web.Senhas': import('./Web.Senhas.js'),
'Web.TicTacToe': import('./Web.TicTacToe.js'),
}