module std/corestd/core
pub import std/core/typesstd/core/types
import std/core/undivstd/core/undiv
import std/core/unsafestd/core/unsafe
pub import std/core/hndstd/core/hnd
pub import std/core/exnstd/core/exn
pub import std/core/boolstd/core/bool
pub import std/core/orderstd/core/order
pub import std/core/charstd/core/char
pub import std/core/intstd/core/int
pub import std/core/vectorstd/core/vector
pub import std/core/stringstd/core/string
pub import std/core/sslicestd/core/sslice
pub import std/core/liststd/core/list
pub import std/core/maybestd/core/maybe
pub import std/core/eitherstd/core/either
pub import std/core/tuplestd/core/tuple
pub import std/core/showstd/core/show
pub import std/core/debugstd/core/debug
pub import std/core/delayedstd/core/delayed
pub import std/core/consolestd/core/console
extern import
c file "core/inline/core"
cs file "core/inline/core.cs"
pub alias purestd/core/pure: E = <std/core/types/total: Eexnstd/core/exn/exn: (E, V) -> V,divstd/core/types/div: X>
pub type global-scopestd/core/global-scope: S :: S
pub type netstd/core/net: X :: X
pub type fsysstd/core/fsys: X :: X
pub type uistd/core/ui: X :: X
pub type blockingstd/core/blocking: X :: X
pub alias io-totalstd/core/io-total: E = <std/core/types/total: Endetstd/core/types/ndet: X,consolestd/core/console/console: X,netstd/core/net: X,fsysstd/core/fsys: X,uistd/core/ui: X,ststd/core/types/st: H -> E<globalstd/core/types/global: H>>
pub alias io-noexnstd/core/io-noexn: E = <std/core/types/total: Edivstd/core/types/div: X,io-totalstd/core/io-total: E>
pub alias iostd/core/io: E = <std/core/types/total: Eexnstd/core/exn/exn: (E, V) -> V,io-noexnstd/core/io-noexn: E>
pub type nmdstd/core/nmd: X :: X
pub type scopestd/core/scope: S -> X :: S -> X
pub fun applystd/core/apply: forall<a,b,e> (f : (a) -> e b, x : a) -> e b(ff: (_258) -> _259 _260,xx: _258)result: -> 271 270
ff: (_258) -> _259 _260(xx: _258)
pub fun ostd/core/o: forall<a,b,c,e> (f : (a) -> e b, g : (c) -> e a) -> ((x : c) -> e b)(ff: (_295) -> _287 _288,gg: (_286) -> _287 _295)result: -> total (x : 308) -> 309 307
fnfn: (x : _286) -> _287 _288(xx: _286) ff: (_295) -> _287 _288(gg: (_286) -> _287 _295(xx: _286))
pub fun ignorestd/core/ignore: forall<a> (x : a) -> ()( xx: $324 : aa: V )result: -> total () : (std/core/types/unit: V)std/core/types/unit: V
(std/core/types/Unit: ())std/core/types/Unit: ()
pub fun conststd/core/const: forall<a,b> (default : a) -> ((x : b) -> a)( defaultdefault: $337 : aa: V )result: -> total (x : 352) -> 351 : totalstd/core/types/total: E (( x : bb: V ) -> astd/core/types/total: E)
fnfn: ($338) -> $337(_) defaultdefault: $337
pub fun same-typestd/core/same-type: forall<a> (x : a, y : a) -> a( xx: $360 : aa: V, yy: $360 : aa: V )result: -> total 368 : astd/core/types/total: E
xx: $360
pub fun whilestd/core/while: forall<e> (predicate : () -> <div|e> bool, action : () -> <div|e> ()) -> <div|e> ()( predicatepredicate: () -> <div|$373> bool : () -> <divstd/core/types/div: X|std/core/types/effect-extend: (X, E) -> Eee: E> boolstd/core/types/bool: V, actionaction: () -> <div|$373> () : () -> <divstd/core/types/div: X|std/core/types/effect-extend: (X, E) -> Eee: E> (std/core/types/unit: V)std/core/types/unit: V )result: -> <div|391> () : <divstd/core/types/div: X|std/core/types/effect-extend: (X, E) -> Eee: E> (std/core/types/unit: V)std/core/types/unit: V
if predicatepredicate: () -> <div|$373> bool() then
actionaction: () -> <div|$373> ()()
whilestd/core/while: (predicate : () -> <div|$373> bool, action : () -> <div|$373> ()) -> <div|$373> ()(predicatepredicate: () -> <div|$373> bool, actionaction: () -> <div|$373> ())std/core/types/Unit: ()
pub fun repeatstd/core/repeat: forall<e> (n : int, action : () -> e ()) -> e ()( ^nn: int : intstd/core/types/int: V, actionaction: () -> $946 () : () -> ee: E (std/core/types/unit: V)std/core/types/unit: V )result: -> 960 () : ee: E (std/core/types/unit: V)std/core/types/unit: V
forstd/core/for: (n : int, action : (int) -> $946 ()) -> $946 ()(nn: int) fnfn: (i : int) -> $946 ()(ii: int)
actionaction: () -> $946 ()()
pub fun range/forstd/core/range/for: forall<e> (start : int, end : int, action : (int) -> e ()) -> e ()( ^startstart: int: intstd/core/types/int: V, endend: int : intstd/core/types/int: V, actionaction: (int) -> $878 () : (intstd/core/types/int: V) -> ee: E (std/core/types/unit: V)std/core/types/unit: V )result: -> 919 () : ee: E (std/core/types/unit: V)std/core/types/unit: V
fun reprep: (i : int) -> $878 ()( ^ii: int : intstd/core/types/int: V )result: -> $878 ()
if ii: int <=std/core/int/(<=): (x : int, y : int) -> $878 bool endend: int then
actionaction: (int) -> $878 ()(ii: int)
reprep: (i : int) -> $878 ()(pretend-decreasingstd/core/undiv/pretend-decreasing: (x : int) -> $878 int(ii: int.incstd/core/int/inc: (i : int) -> $878 int))std/core/types/Unit: ()
reprep: (i : int) -> $878 ()(startstart: int)
pub fun forstd/core/for: forall<e> (n : int, action : (int) -> e ()) -> e ()( ^nn: int : intstd/core/types/int: V, actionaction: (int) -> $923 () : (intstd/core/types/int: V) -> ee: E (std/core/types/unit: V)std/core/types/unit: V )result: -> 940 () : ee: E (std/core/types/unit: V)std/core/types/unit: V
range/forstd/core/range/for: (start : int, end : int, action : (int) -> $923 ()) -> $923 ()(0literal: int
dec = 0
hex8 = 0x00
bit8 = 0b00000000, nn: int -std/core/int/(-): (x : int, y : int) -> $923 int 1literal: int
dec = 1
hex8 = 0x01
bit8 = 0b00000001, actionaction: (int) -> $923 ())
pub fun range/for-whilestd/core/range/for-while: forall<a,e> (start : int, end : int, action : (int) -> e maybe<a>) -> e maybe<a>( startstart: int: intstd/core/types/int: V, endend: int : intstd/core/types/int: V, actionaction: (int) -> $965 maybe<$964> : (intstd/core/types/int: V) -> ee: E maybestd/core/types/maybe: V -> V<aa: V> )result: -> 1027 maybe<1026> : ee: E maybestd/core/types/maybe: V -> V<aa: V>
fun reprep: (i : int) -> $965 maybe<$964>( ii: int : intstd/core/types/int: V )result: -> $965 maybe<$964>
if ii: int <=std/core/int/(<=): (x : int, y : int) -> $965 bool endend: int then
match actionaction: (int) -> $965 maybe<$964>(ii: int)
Nothingstd/core/types/Nothing: forall<a> maybe<a> -> reprep: (i : int) -> $965 maybe<$964>(pretend-decreasingstd/core/undiv/pretend-decreasing: (x : int) -> $965 int(ii: int.incstd/core/int/inc: (i : int) -> $965 int))
Juststd/core/types/Just: forall<a> (value : a) -> maybe<a>(xx: $964) -> Juststd/core/types/Just: forall<a> (value : a) -> maybe<a>(xx: $964)
else Nothingstd/core/types/Nothing: forall<a> maybe<a>
reprep: (i : int) -> $965 maybe<$964>(startstart: int)
pub fun for-whilestd/core/for-while: forall<a,e> (n : int, action : (int) -> e maybe<a>) -> e maybe<a>( nn: int : intstd/core/types/int: V, actionaction: (int) -> $1035 maybe<$1034> : (intstd/core/types/int: V) -> ee: E maybestd/core/types/maybe: V -> V<aa: V> )result: -> 1060 maybe<1059> : ee: E maybestd/core/types/maybe: V -> V<aa: V>
range/for-whilestd/core/range/for-while: (start : int, end : int, action : (int) -> $1035 maybe<$1034>) -> $1035 maybe<$1034>(0literal: int
dec = 0
hex8 = 0x00
bit8 = 0b00000000, nn: int -std/core/int/(-): (x : int, y : int) -> $1035 int 1literal: int
dec = 1
hex8 = 0x01
bit8 = 0b00000001, actionaction: (int) -> $1035 maybe<$1034>)
pub fun range/foldstd/core/range/fold: forall<a,e> (start : int, end : int, init : a, f : (int, a) -> e a) -> e a( startstart: int : intstd/core/types/int: V, endend: int : intstd/core/types/int: V, initinit: $573 : aa: V, ff: (int, $573) -> $574 $573 : (intstd/core/types/int: V,aa: V) -> ee: E aa: V )result: -> 629 628 : ee: E aa: V
if startstart: int >std/core/int/(>): (x : int, y : int) -> $574 bool endend: int then initinit: $573 else
val xx: $573 = ff: (int, $573) -> $574 $573(startstart: int,initinit: $573)
foldstd/core/range/fold: (start : int, end : int, init : $573, f : (int, $573) -> $574 $573) -> $574 $573(pretend-decreasingstd/core/undiv/pretend-decreasing: (x : int) -> $574 int(startstart: int.incstd/core/int/inc: (i : int) -> $574 int), endend: int, xx: $573, ff: (int, $573) -> $574 $573)
pub fun foldstd/core/fold: forall<a,e> (upto : int, init : a, f : (int, a) -> e a) -> e a( uptoupto: int : intstd/core/types/int: V, initinit: $546 : aa: V, ff: (int, $546) -> $547 $546 : (intstd/core/types/int: V,aa: V) -> ee: E aa: V )result: -> 572 571 : ee: E aa: V
range/foldstd/core/range/fold: (start : int, end : int, init : $546, f : (int, $546) -> $547 $546) -> $547 $546( 0literal: int
dec = 0
hex8 = 0x00
bit8 = 0b00000000, uptoupto: int.decstd/core/int/dec: (i : int) -> $547 int, initinit: $546, ff: (int, $546) -> $547 $546 )
pub fun range/fold-whilestd/core/range/fold-while: forall<a,e> (start : int, end : int, init : a, f : (int, a) -> e maybe<a>) -> e a( startstart: int : intstd/core/types/int: V, endend: int : intstd/core/types/int: V, initinit: $673 : aa: V, ff: (int, $673) -> $674 maybe<$673> : (intstd/core/types/int: V,aa: V) -> ee: E maybestd/core/types/maybe: V -> V<aa: V> )result: -> 735 734 : ee: E aa: V
if startstart: int >std/core/int/(>): (x : int, y : int) -> $674 bool endend: int then initinit: $673 else
match ff: (int, $673) -> $674 maybe<$673>(startstart: int,initinit: $673)
Juststd/core/types/Just: forall<a> (value : a) -> maybe<a>(xx: $673) -> range/fold-whilestd/core/range/fold-while: (start : int, end : int, init : $673, f : (int, $673) -> $674 maybe<$673>) -> $674 $673(pretend-decreasingstd/core/undiv/pretend-decreasing: (x : int) -> $674 int(startstart: int.incstd/core/int/inc: (i : int) -> $674 int), endend: int, xx: $673, ff: (int, $673) -> $674 maybe<$673>)
Nothingstd/core/types/Nothing: forall<a> maybe<a> -> initinit: $673
pub fun fold-whilestd/core/fold-while: forall<a,e> (n : int, init : a, f : (int, a) -> e maybe<a>) -> e a( nn: int : intstd/core/types/int: V, initinit: $646 : aa: V, ff: (int, $646) -> $647 maybe<$646> : (intstd/core/types/int: V,aa: V) -> ee: E maybestd/core/types/maybe: V -> V<aa: V> )result: -> 672 671 : ee: E aa: V
range/fold-whilestd/core/range/fold-while: (start : int, end : int, init : $646, f : (int, $646) -> $647 maybe<$646>) -> $647 $646( 0literal: int
dec = 0
hex8 = 0x00
bit8 = 0b00000000, nn: int.decstd/core/int/dec: (i : int) -> $647 int, initinit: $646, ff: (int, $646) -> $647 maybe<$646> )
pub fun (!=)std/core/(!=): forall<a> (x : a, y : a, @implicit/(==) : (a, a) -> bool) -> bool(xx: $438 : aa: V, yy: $438 : aa: V, (@implicit/==)?(==): ($438, $438) -> bool : (aa: V,aa: V) -> boolstd/core/types/bool: V )result: -> total bool : boolstd/core/types/bool: V
notstd/core/types/not: (b : bool) -> bool(xx: $438==?(==): ($438, $438) -> boolyy: $438)
pub fun cmp/(==)std/core/cmp/(==): forall<a> (x : a, y : a, @implicit/cmp : (a, a) -> order) -> bool(xx: $401 : aa: V, yy: $401 : aa: V, @implicit/cmp?cmp: ($401, $401) -> order : (aa: V,aa: V) -> orderstd/core/types/order: V )result: -> total bool : boolstd/core/types/bool: V
match cmp?cmp: ($401, $401) -> order(xx: $401,yy: $401)
Eqstd/core/types/Eq: order -> Truestd/core/types/True: bool
_ -> Falsestd/core/types/False: bool
pub fun (>)std/core/(>): forall<a> (x : a, y : a, @implicit/cmp : (a, a) -> order) -> bool(xx: $484 : aa: V, yy: $484 : aa: V, @implicit/cmp?cmp: ($484, $484) -> order : (aa: V,aa: V) -> orderstd/core/types/order: V )result: -> total bool : boolstd/core/types/bool: V
cmp?cmp: ($484, $484) -> order(xx: $484,yy: $484) ==std/core/order/(==): (x : order, y : order) -> bool Gtstd/core/types/Gt: order
pub fun (<)std/core/(<): forall<a> (x : a, y : a, @implicit/cmp : (a, a) -> order) -> bool(xx: $752 : aa: V, yy: $752 : aa: V, @implicit/cmp?cmp: ($752, $752) -> order : (aa: V,aa: V) -> orderstd/core/types/order: V )result: -> total bool : boolstd/core/types/bool: V
cmp?cmp: ($752, $752) -> order(xx: $752,yy: $752) ==std/core/order/(==): (x : order, y : order) -> bool Ltstd/core/types/Lt: order
pub fun (>=)std/core/(>=): forall<a> (x : a, y : a, @implicit/cmp : (a, a) -> order) -> bool(xx: $814 : aa: V, yy: $814 : aa: V, @implicit/cmp?cmp: ($814, $814) -> order : (aa: V,aa: V) -> orderstd/core/types/order: V )result: -> total bool : boolstd/core/types/bool: V
yy: $814 <std/core/(<): (x : $814, y : $814, @implicit/cmp : ($814, $814) -> order) -> bool
?cmp=?cmp xx: $814
pub fun (<=)std/core/(<=): forall<a> (x : a, y : a, @implicit/cmp : (a, a) -> order) -> bool(xx: $846 : aa: V, yy: $846 : aa: V, @implicit/cmp?cmp: ($846, $846) -> order : (aa: V,aa: V) -> orderstd/core/types/order: V )result: -> total bool : boolstd/core/types/bool: V
yy: $846 >std/core/(>): (x : $846, y : $846, @implicit/cmp : ($846, $846) -> order) -> bool
?cmp=?cmp xx: $846
pub extern main-consolestd/core/main-console: forall<a,e> (main : () -> e a) -> e a : forall<aa: V,ee: E> ( main : () -> ee: E aa: V ) -> ee: E aa: V
c "kk_main_console"
cs inline "Primitive.MainConsole<##1>(#1)"
js inline "(#1)()"
pub extern hoststd/core/host: () -> ndet string() : ndetstd/core/types/ndet: X stringstd/core/types/string: V
c "kk_get_host"
cs inline "\"dotnet\""
js inline "$std_core_console._host"
pub fun @default-exn(actionaction: () -> <exn,console|$1104> () : () -> <exnstd/core/exn/exn: (E, V) -> V,consolestd/core/console/console: X|std/core/types/effect-extend: (X, E) -> Eee: E> (std/core/types/unit: V)std/core/types/unit: V )result: -> <console|1257> () : <consolestd/core/console/console: X|std/core/types/effect-extend: (X, E) -> Eee: E> (std/core/types/unit: V)std/core/types/unit: V
handlehandler: (() -> <exn,console|$1104> ()) -> <console|$1104> ()( actionaction: () -> <exn,console|$1104> () )
final ctl throw-exnthrow-exn: (exn : exception) -> <console|$1104> ()( exnexn: exception : exceptionstd/core/exn/exception: V )
"uncaught exception: "literal: string
count= 20.printstd/core/console/string/print: (s : string) -> <console|$1104> ()
exnexn: exception.printlnstd/core/console/show/println: (x : exception, @implicit/show : (exception) -> string) -> <console|$1104> ()
?show=show
noinline val unique-countstd/core/unique-count: ref<global,int> : refstd/core/types/ref: (H, V) -> V<globalstd/core/types/global: H,intstd/core/types/int: V> = unsafe-totalstd/core/unsafe/unsafe-total: (action : () -> <alloc<global>|_1278> ref<global,int>) -> ref<global,int>{ refstd/core/types/ref: (value : int) -> <alloc<global>|_1278> ref<global,int>(0literal: int
dec = 0
hex8 = 0x00
bit8 = 0b00000000) }
pub fun uniquestd/core/unique: () -> ndet int()result: -> ndet int : ndetstd/core/types/ndet: X intstd/core/types/int: V
unsafe-totalstd/core/unsafe/unsafe-total: (action : () -> <read<global>,write<global>|_1326> int) -> ndet int
val uu: int = !std/core/types/ref/(!): (ref : ref<global,int>) -> <read<global>,write<global>|_1326> intunique-countstd/core/unique-count: ref<global,int>
unique-countstd/core/unique-count: ref<global,int> :=std/core/types/set: (ref : ref<global,int>, assigned : int) -> <write<global>,read<global>|_1326> () uu: int+std/core/int/(+): (x : int, y : int) -> <write<global>,read<global>|_1326> int1literal: int
dec = 1
hex8 = 0x01
bit8 = 0b00000001
uu: int
pub co type streamstd/core/stream: V -> V<aa: V>
con Nextstd/core/Next: forall<a> (head : a, tail : stream<a>) -> stream<a>(headstd/core/stream/head: forall<a> (stream : stream<a>) -> a:aa: V, tailstd/core/stream/tail: forall<a> (stream : stream<a>) -> stream<a>: streamstd/core/stream: V -> V<aa: V> )