Origin Definitions Sections StandardLIB Doc
IF YOU CAN SEE THIS go to /sfa/Nuprl/Shared/Xindentation_hack_doc.html
prog_1
Nuprl Section: prog_1

Selected Objects
defswitch Switch(tb == b(t)
defswitch_case Case v => case cont(x) == if x=v case else cont(x) fi
defswitch_default Default => body EndSwitch(x) == body
defswitch_done EndSwitch(x) == !undefined
defcase Case(valuebody == body(value,value)
defcase_default Default => body(value,value) == body
defcase_pair <x,y> => body(x;y)(value,cont) == value/x,ybody(x;y)
defcase_inl inl(x) => body(xcont(value,contvalue)
== InjCase(valuexbody(x); _cont(contvalue,contvalue))
defcase_inr inr(x) => body(xcont(value,contvalue)
== InjCase(value_cont(contvalue,contvalue); xbody(x))
defcase_cons x::y => body(x;ycont(value,contvalue)
== Case of value; nil  cont(contvalue,contvalue) ; hd.tl  body(hd;tl)
defcase_nil [] => body cont(value,contvalue)
== Case of value; nil  body ; hd.tl  cont(contvalue,contvalue)
defcase_it  => body(value,contvalue) == body
defcase_bind x:body == body
defcase_pattern1 <<"a", b>, c, 1> => body(b;ccont(x,z)
== x/x2,x1.
== x2/x2@0,x1@0.
== InjCase(if x2@0="a"Atominl(*); inr(*) fi
== InjCasex1/x2@1,x1@1.
== InjCase; InjCase(if x1@1=1 inl(*) ; inr(*) fi ; body(x1@0;x2@1); cont(z,z))
== InjCasecont(z,z))
defpattern1 <<"a", b>, c, 1> == <<"a",b>,c,1>
defcase_pattern2 <a, inl <<"a", b>, c, 1>> => body(a;b;ccont(x,z)
== x/x2,x1.
== InjCase(x1
== InjCasex1@0x1@0/x2@0,x1@1.
== InjCase; x1@0x2@0/x2@0,x1@2.
== InjCase; x1@0InjCase(if x2@0="a"Atominl(*); inr(*) fi
== InjCase; x1@0. InjCasex1@1/x2@1,x1@1.
== InjCase; x1@0. InjCase; InjCase(if x1@1=1 inl(*) ; inr(*) fi
== InjCase; x1@0. InjCase; InjCasebody(x2;x1@2;x2@1)
== InjCase; x1@0. InjCase; InjCasecont(z))
== InjCase; x1@0. InjCasecont(z))
== InjCase_cont(z))
defpattern2 <a, inl <<"a", b>, c, 1>> == <a,inl(<<"a", b>, c, 1>)>
defunion1 union1() == +Type+()
defcase_union1_term1 union1_term1(x) => body(xcont(x1,z) == InjCase(x1x2body(x2); _cont(z,z))
defunion1_term1 union1_term1(x) == inl(x)
defcase_union1_term2 union1_term2(x) => body(xcont(x1,z)
== InjCase(x1_cont(z,z); x2. InjCase(x2x2@0body(x2@0); _cont(z,z)))
defunion1_term2 union1_term2(x) == inr(inl(x))
defcase_union1_term3 union1_term3(x) => body(xcont(x1,z)
== InjCase(x1_cont(z,z); x2. InjCase(x2_cont(z,z); x2@0body(x2@0)))
defunion1_term3 union1_term3(x) == inr(inr(x))
defenum1 enum1() == 3
defenum1_switch enum1_switch(value;el1;el2;el3)
== Switch(value)
== Case enum1_el1 => el1
== Case enum1_el2 => el2
== Case enum1_el3 => el3
== EndSwitch
defcase_enum1_el1 enum1_el1 => body cont(x,z)
== InjCase(if x=0 inl(*) ; inr(*) fi ; bodycont(z,z))
defenum1_el1 enum1_el1 == 0
defcase_enum1_el2 enum1_el2 => body cont(x,z)
== InjCase(if x=1 inl(*) ; inr(*) fi ; bodycont(z,z))
defenum1_el2 enum1_el2 == 1
defcase_enum1_el3 enum1_el3 => body cont(x,z)
== InjCase(if x=2 inl(*) ; inr(*) fi ; bodycont(z,z))
defenum1_el3 enum1_el3 == 2
COMenum1_start ------ begin enum1 ------
THMenum1_sq SQType(enum1())
THMeq_enum1_eq_true_intro i,j:enum1(). i = j  ((i=j) ~ true)
THMeq_enum1_eq_false_intro i,j:enum1(). i = j  ((i=j) ~ false)
THMenum1_cases i:enum1(). i = enum1_el1  i = enum1_el2  i = enum1_el3
COMenum1_finish ------ end enum1 ------
defmodule1_type module1_type(prop) == tag:{i:prop(i) }Unit+(module1_type(i.i = tag-1))
(recursive)
defmodule1_tag t.tag == 1of(t)
defmodule1_data t.data == 2of(t)
defcase_module1 module1(tagdata) => body(tag;data)(x,z) == x/x2,x1body(x2;x1)
defmodule1 module1(tagdata) == <tag,data>
IF YOU CAN SEE THIS go to /sfa/Nuprl/Shared/Xindentation_hack_doc.html

Origin Definitions Sections StandardLIB Doc