From 1bee9bb63ff69d672f30de6101a63d109e048f48 Mon Sep 17 00:00:00 2001 From: Alexander Bandukwala <7h3kk1d@gmail.com> Date: Fri, 18 Oct 2024 13:25:51 -0400 Subject: [PATCH] Update init --- src/haz3lweb/Init.ml | 485 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 460 insertions(+), 25 deletions(-) diff --git a/src/haz3lweb/Init.ml b/src/haz3lweb/Init.ml index e5e3defafe..5c3059642b 100644 --- a/src/haz3lweb/Init.ml +++ b/src/haz3lweb/Init.ml @@ -12189,26 +12189,26 @@ let startup : PersistentData.t = # Fold projectors cover terms with abstractions. #\n\ # 1. A simple fold roles up any term, replacing #\n\ # it with ... until it is expanded again. #\n\n\ - let fold = in\n\n\ + let fold = (((((((((((()))))))))))) in\n\n\ # 2. A semantic fold covers a term with a property: #\n\ # Click to toggle inferred & synthesized types #\n\n\ - let folds: = in\n\n\ + let folds: (Int -> Bool) = in\n\n\ # Projectors on literal data are called livelits. #\n\ # Three base types literals use inline views: #\n\n\ - let guard: Bool = in\n\ - let phase: Int = in\n\ - let float: Float = in\n\n\ + let guard: Bool = true in\n\ + let phase: Int = 44 in\n\ + let float: Float = 79.00 in\n\n\ # Inline error decorations (same as for tokens) #\n\n\ - let (a:Int, f: Float) = , in\n\n\ + let (a:Int, f: Float) = true, 28 in\n\n\ # The String base type get a multiline view: #\n\n\ - let _ = in\n\ - let __ = in\n\ - let ___ = in\n\ - let ____ = in\n\ - let _____ = in\n\ - let ______ = in\n\n\ + let _ = \"\" in\n\ + let __ = \"\\n\" in\n\ + let ___ = \"a\" in\n\ + let ____ = \"shift\\n\" in\n\ + let _____ = \"\\nmalicious\" in\n\ + let ______ = \"a\\n shift\\n malicious\" in\n\n\ # Multiline error decorations #\n\n\ - let box: Int = in\n\n\ + let box: Int = \"\\nmalicious\" in\n\n\ # ERRATA: #\n\ # The bottom toggle can also be used to remove #\n\ # projectors. Currently only bidelmited terms can #\n\ @@ -12217,7 +12217,7 @@ let startup : PersistentData.t = # currently are lost on cut/copy. Both these #\n\ # restrictions will be removed in a future update. #\n\n\ # Projectors playground #\n\n\ - if && < () \n\ + if true && 23 < int_of_float(51.00) \n\ then ______ else \"its: \" ++ box"; } ); ( "Types & static errors", @@ -17675,7 +17675,7 @@ let startup : PersistentData.t = ca0d2c33-96ef-44c6-ac6e-f8a4d7901280)(content(Whitespace\" \ \"))))(Secondary((id \ 98524bad-9684-472a-a0c8-b1204357df66)(content(Whitespace\"\\n\"))))(Secondary((id \ - 38404748-91f8-4ff9-bf3e-6079ab3a3add)(content(Whitespace\"\\n\")))))((Secondary((id \ + 38404748-91f8-4ff9-bf3e-6079ab3a3add)(content(Whitespace\"\\n\"))))(Secondary((id \ fbc19dd7-8fdb-4932-87af-5b52f6a093bb)(content(Comment\"# \ These can be encoded the types #\"))))(Secondary((id \ 312fb397-2960-419d-8012-b3844228b045)(content(Whitespace\"\\n\"))))(Tile((id \ @@ -17931,7 +17931,7 @@ let startup : PersistentData.t = Convex)(sort \ Typ))))))(shards(0))(children()))))))))(Secondary((id \ 0254047f-2d49-49da-a292-8ae1c8bd9315)(content(Whitespace\" \ - \")))))))))(Secondary((id \ + \"))))))))))((Secondary((id \ 30456699-1693-415d-a38e-b103a1d4f4ca)(content(Whitespace\"\\n\"))))(Secondary((id \ 4a35bd2e-ceac-4010-9b5e-b96baa3abef7)(content(Comment\"# \ These labels can be automatically applied based on the type \ @@ -18123,15 +18123,434 @@ let startup : PersistentData.t = 99c467af-0605-4a51-814b-6fe35edb5b59)(content(Whitespace\" \ \")))))))))(Secondary((id \ 1672c094-ce77-4a2c-a610-f352d9c00f7f)(content(Whitespace\"\\n\"))))(Secondary((id \ - 183b912f-dde9-4f06-8047-2b73d3e7ac89)(content(Whitespace\"\\n\"))))(Grout((id \ - 108cfcfd-2e17-407c-8380-ec1e63151450)(shape \ - Convex)))(Secondary((id \ - 867bbf01-916d-4d3e-9b99-1d4337659f57)(content(Whitespace\" \ + 183b912f-dde9-4f06-8047-2b73d3e7ac89)(content(Whitespace\"\\n\"))))(Secondary((id \ + 0bc5c1e3-46a7-4e8d-9cb6-6aadf34388ac)(content(Comment\"# As \ + Labeled Function Arguments#\"))))(Secondary((id \ + 5e62d069-586f-4b4a-bebd-1d85c911942e)(content(Whitespace\"\\n\"))))(Tile((id \ + 5fa063ff-949a-4aae-999a-41a6c69d6c56)(label(let = \ + in))(mold((out Exp)(in_(Pat Exp))(nibs(((shape Convex)(sort \ + Exp))((shape(Concave 18))(sort Exp))))))(shards(0 1 \ + 2))(children(((Secondary((id \ + fb4e903c-38ba-4ea6-8b32-317b1285f772)(content(Whitespace\" \ + \"))))(Tile((id \ + ec1af2af-1ed0-48ee-b453-7212541060db)(label(make_person))(mold((out \ + Pat)(in_())(nibs(((shape Convex)(sort Pat))((shape \ + Convex)(sort Pat))))))(shards(0))(children())))(Secondary((id \ + ccb12ba8-9f10-4b75-994e-5305f899a2f6)(content(Whitespace\" \ + \")))))((Secondary((id \ + cd12b638-f5e5-4404-9258-b52dcf650df7)(content(Whitespace\" \ + \"))))(Tile((id \ + 75548ddc-6a1b-40ba-9657-fd01f72ed587)(label(fun \ + ->))(mold((out Exp)(in_(Pat))(nibs(((shape Convex)(sort \ + Exp))((shape(Concave 15))(sort Exp))))))(shards(0 \ + 1))(children(((Secondary((id \ + b79f71ec-30f8-4195-9354-0438e6141369)(content(Whitespace\" \ + \"))))(Tile((id \ + 76c41ade-16f9-4118-8b93-19ee95712e29)(label(name))(mold((out \ + Pat)(in_())(nibs(((shape Convex)(sort Pat))((shape \ + Convex)(sort Pat))))))(shards(0))(children())))(Tile((id \ + 12499cf9-95f4-4b6c-b3e8-caeed4c8ac7f)(label(=))(mold((out \ + Pat)(in_())(nibs(((shape(Concave 16))(sort \ + Pat))((shape(Concave 16))(sort \ + Pat))))))(shards(0))(children())))(Tile((id \ + 6a914505-51dc-4704-b3e6-c28c64ee2192)(label(name))(mold((out \ + Pat)(in_())(nibs(((shape Convex)(sort Pat))((shape \ + Convex)(sort Pat))))))(shards(0))(children())))(Tile((id \ + 2720ae7a-5bd6-4cce-b71d-d14996d9a6ae)(label(,))(mold((out \ + Pat)(in_())(nibs(((shape(Concave 18))(sort \ + Pat))((shape(Concave 18))(sort \ + Pat))))))(shards(0))(children())))(Secondary((id \ + 592cf330-b2d5-4cab-876d-74ad562b281b)(content(Whitespace\" \ + \"))))(Tile((id \ + 9a3fa4ed-eb24-49e6-97b6-2060a725b792)(label(age))(mold((out \ + Pat)(in_())(nibs(((shape Convex)(sort Pat))((shape \ + Convex)(sort Pat))))))(shards(0))(children())))(Tile((id \ + 83ea2c01-eaa9-41dc-b613-9f8b5f28bc2a)(label(=))(mold((out \ + Pat)(in_())(nibs(((shape(Concave 16))(sort \ + Pat))((shape(Concave 16))(sort \ + Pat))))))(shards(0))(children())))(Tile((id \ + 003dc40d-5777-4d85-826e-4bc2821ed79a)(label(age))(mold((out \ + Pat)(in_())(nibs(((shape Convex)(sort Pat))((shape \ + Convex)(sort Pat))))))(shards(0))(children())))(Secondary((id \ + 20ddd665-117f-48fd-9d81-cfd0be30c3f6)(content(Whitespace\" \ + \")))))))))(Secondary((id \ + 468a44b1-08e5-4630-b83e-530908e27910)(content(Whitespace\" \ + \"))))(Tile((id \ + 87515d1a-6137-4329-adef-3447763bfeec)(label(\"(\"\")\"))(mold((out \ + Exp)(in_(Exp))(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0 1))(children(((Tile((id \ + 7e52e359-8f40-4fe8-a17e-5f3f7d2ac33e)(label(name))(mold((out \ + Exp)(in_())(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0))(children())))(Tile((id \ + 29619540-cc0d-4cc0-9981-c83c069dca20)(label(,))(mold((out \ + Exp)(in_())(nibs(((shape(Concave 18))(sort \ + Exp))((shape(Concave 18))(sort \ + Exp))))))(shards(0))(children())))(Secondary((id \ + c80ac6ac-d08a-4409-973e-5f3e18ba51b0)(content(Whitespace\" \ + \"))))(Tile((id \ + e02e1487-d3d4-4676-b336-162501ed79a6)(label(age))(mold((out \ + Exp)(in_())(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0))(children())))(Tile((id \ + 2039c996-dd01-4836-adeb-4e172e7a6fe9)(label(,))(mold((out \ + Exp)(in_())(nibs(((shape(Concave 18))(sort \ + Exp))((shape(Concave 18))(sort \ + Exp))))))(shards(0))(children())))(Secondary((id \ + 5e71d9fa-5efd-4e8e-9382-22a5ae2adfb4)(content(Whitespace\" \ + \"))))(Tile((id \ + a8d4584e-fbcb-43cf-b59f-48f6db174fd4)(label(favorite_color))(mold((out \ + Exp)(in_())(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0))(children())))(Tile((id \ + a1fc6211-064f-456a-8db6-c8853f11f3a1)(label(=))(mold((out \ + Exp)(in_())(nibs(((shape(Concave 16))(sort \ + Exp))((shape(Concave 16))(sort \ + Exp))))))(shards(0))(children())))(Tile((id \ + 6ed737e9-6dfa-49f0-b3c0-0fb5e3586ca2)(label(\"\\\"red\\\"\"))(mold((out \ + Exp)(in_())(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort \ + Exp))))))(shards(0))(children()))))))))(Secondary((id \ + 3e83623e-f633-4186-a3b5-d8b9524a4a86)(content(Whitespace\" \ + \")))))))))(Secondary((id \ + e8f3f82e-5611-4b88-863b-9a2ae9d1c21d)(content(Whitespace\"\\n\"))))(Tile((id \ + bf3c8af3-ae3a-48c6-93b4-04ac67772b08)(label(let = \ + in))(mold((out Exp)(in_(Pat Exp))(nibs(((shape Convex)(sort \ + Exp))((shape(Concave 18))(sort Exp))))))(shards(0 1 \ + 2))(children(((Secondary((id \ + 619b044c-b0e4-4e02-b5db-d15570566791)(content(Whitespace\" \ + \"))))(Tile((id \ + f934d33c-4593-4026-8ec0-5ead64be5882)(label(inconsistent_function_arg))(mold((out \ + Pat)(in_())(nibs(((shape Convex)(sort Pat))((shape \ + Convex)(sort Pat))))))(shards(0))(children())))(Secondary((id \ + 9e666317-40ce-4c94-91cc-ad967e7eb9c4)(content(Whitespace\" \ + \")))))((Secondary((id \ + 6e84d392-0a09-4e6b-b0c5-276e43ab0f4a)(content(Whitespace\" \ + \"))))(Tile((id \ + 6d4f698b-0886-4488-a1d9-559d1f453cd2)(label(\"(\"\")\"))(mold((out \ + Exp)(in_(Exp))(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0 1))(children(((Tile((id \ + ab35f30b-6f45-48c8-839b-1ef89002c759)(label(\"\\\"Invalid\\\"\"))(mold((out \ + Exp)(in_())(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0))(children())))(Tile((id \ + 91e66749-d8b1-4e70-92d1-cd07b4bf0384)(label(,))(mold((out \ + Exp)(in_())(nibs(((shape(Concave 18))(sort \ + Exp))((shape(Concave 18))(sort \ + Exp))))))(shards(0))(children())))(Secondary((id \ + 37c22349-8aa6-41c7-b125-c62afe63d0eb)(content(Whitespace\" \ + \"))))(Tile((id \ + 03cfd730-4fa8-4735-b189-b606425881af)(label(-))(mold((out \ + Exp)(in_())(nibs(((shape Convex)(sort Exp))((shape(Concave \ + 4))(sort Exp))))))(shards(0))(children())))(Tile((id \ + 12d2af65-b5c1-45f0-b3f9-6e4931addb73)(label(1))(mold((out \ + Exp)(in_())(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort \ + Exp))))))(shards(0))(children()))))))))(Secondary((id \ + 0af9bc1c-fdfc-4a69-b7d6-27bd571dcfd8)(content(Whitespace\" \ + \")))))))))(Secondary((id \ + 71ab2007-0a3a-4c9e-a3ce-569eff4c9d0d)(content(Whitespace\"\\n\"))))(Tile((id \ + 6772cdf5-3409-4b9c-8637-a24516a5c967)(label(let = \ + in))(mold((out Exp)(in_(Pat Exp))(nibs(((shape Convex)(sort \ + Exp))((shape(Concave 18))(sort Exp))))))(shards(0 1 \ + 2))(children(((Secondary((id \ + 9de2ec9f-c185-4c6d-a715-1a98df8558aa)(content(Whitespace\" \ + \"))))(Tile((id \ + 1bbb9c86-d902-4829-98d1-555dd346ef33)(label(consistent_function_arg))(mold((out \ + Pat)(in_())(nibs(((shape Convex)(sort Pat))((shape \ + Convex)(sort Pat))))))(shards(0))(children())))(Secondary((id \ + d400dbe1-4dc2-4df0-8996-86ae6b0f9c4c)(content(Whitespace\" \ + \")))))((Secondary((id \ + 16f13179-43e2-4bca-b532-62bb500c7855)(content(Whitespace\" \ + \"))))(Tile((id \ + 5142d9b7-f548-4acf-8901-2c6a902ab1eb)(label(\"(\"\")\"))(mold((out \ + Exp)(in_(Exp))(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0 1))(children(((Tile((id \ + 30f541b4-e181-44e2-887a-8db7636c3420)(label(name))(mold((out \ + Exp)(in_())(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0))(children())))(Tile((id \ + 622ecc74-32c1-4028-b39c-d8a61e1e204a)(label(=))(mold((out \ + Exp)(in_())(nibs(((shape(Concave 16))(sort \ + Exp))((shape(Concave 16))(sort \ + Exp))))))(shards(0))(children())))(Tile((id \ + 371d1add-d34b-4e00-b9ec-bda86d5c8009)(label(\"\\\"Valid\\\"\"))(mold((out \ + Exp)(in_())(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0))(children())))(Tile((id \ + 35d0418b-5000-42c5-8789-e69e0b8d602a)(label(,))(mold((out \ + Exp)(in_())(nibs(((shape(Concave 18))(sort \ + Exp))((shape(Concave 18))(sort \ + Exp))))))(shards(0))(children())))(Secondary((id \ + e04fa0dd-087b-439c-bbe3-0580927ee180)(content(Whitespace\" \ + \"))))(Tile((id \ + 27c6d19b-7e30-4502-823f-b766f0939ea4)(label(age))(mold((out \ + Exp)(in_())(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0))(children())))(Tile((id \ + 3311b98f-1230-4d42-a39c-2dd23582a839)(label(=))(mold((out \ + Exp)(in_())(nibs(((shape(Concave 16))(sort \ + Exp))((shape(Concave 16))(sort \ + Exp))))))(shards(0))(children())))(Tile((id \ + cae073b2-d9e2-4e6e-bdb9-a6506415fe25)(label(1))(mold((out \ + Exp)(in_())(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort \ + Exp))))))(shards(0))(children()))))))))(Secondary((id \ + d12a2a58-1e0f-4924-b1c4-9260ab60fd8d)(content(Whitespace\" \ + \")))))))))(Secondary((id \ + fae1053e-ed09-4559-ac80-c03838ddc7d8)(content(Whitespace\"\\n\"))))(Tile((id \ + 04747bb7-9e2f-4ebc-8ce0-7b198b5600ea)(label(let = \ + in))(mold((out Exp)(in_(Pat Exp))(nibs(((shape Convex)(sort \ + Exp))((shape(Concave 18))(sort Exp))))))(shards(0 1 \ + 2))(children(((Secondary((id \ + cf41c843-ee1e-462b-bf32-8d507355ca8f)(content(Whitespace\" \ + \"))))(Tile((id \ + 7c40a1e7-7010-494e-a909-8845d0c9326a)(label(more_people))(mold((out \ + Pat)(in_())(nibs(((shape Convex)(sort Pat))((shape \ + Convex)(sort Pat))))))(shards(0))(children())))(Secondary((id \ + fb482afa-0658-483f-9adf-70fd761b6290)(content(Whitespace\" \ + \"))))(Tile((id \ + 0c29ee28-0626-45b1-aac3-e4a78f11dcff)(label(:))(mold((out \ + Pat)(in_())(nibs(((shape(Concave 13))(sort \ + Pat))((shape(Concave 13))(sort \ + Typ))))))(shards(0))(children())))(Secondary((id \ + 49e417e5-fe4b-453a-b01a-1d293bdb25ad)(content(Whitespace\" \ + \"))))(Tile((id 5a14afa0-4406-4d67-85d8-9cfa118caf38)(label([ \ + ]))(mold((out Typ)(in_(Typ))(nibs(((shape Convex)(sort \ + Typ))((shape Convex)(sort Typ))))))(shards(0 \ + 1))(children(((Tile((id \ + b93d434d-96ca-4604-847d-b0205aeb99ed)(label(Person))(mold((out \ + Typ)(in_())(nibs(((shape Convex)(sort Typ))((shape \ + Convex)(sort \ + Typ))))))(shards(0))(children()))))))))(Secondary((id \ + 5896c5a9-156b-46ca-8e72-30f57076188f)(content(Whitespace\" \ + \")))))((Secondary((id \ + 1ade8ad4-18e3-455c-9ec2-32d45710df5e)(content(Whitespace\" \ + \"))))(Tile((id 372c347d-d19d-4e90-a425-809765a77865)(label([ \ + ]))(mold((out Exp)(in_(Exp))(nibs(((shape Convex)(sort \ + Exp))((shape Convex)(sort Exp))))))(shards(0 \ + 1))(children(((Secondary((id \ + f383ce0c-2993-4d70-bd1e-071d4b8088a3)(content(Whitespace\"\\n\"))))(Tile((id \ + e2fc05f3-ccb2-4508-bb28-1df2197fcc07)(label(make_person))(mold((out \ + Exp)(in_())(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0))(children())))(Tile((id \ + de83e03a-1b73-4386-9af3-b74e69527830)(label(\"(\"\")\"))(mold((out \ + Exp)(in_(Exp))(nibs(((shape(Concave 3))(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0 1))(children(((Tile((id \ + ca2fb28d-f718-4d00-a3a6-67f0b08fd3f4)(label(\"\\\"Bob\\\"\"))(mold((out \ + Exp)(in_())(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0))(children())))(Tile((id \ + dbe464e2-a48d-421a-b32a-d555ecb3a6a3)(label(,))(mold((out \ + Exp)(in_())(nibs(((shape(Concave 18))(sort \ + Exp))((shape(Concave 18))(sort \ + Exp))))))(shards(0))(children())))(Secondary((id \ + 5be01cd9-5138-4127-afad-6aa13115a9b0)(content(Whitespace\" \ + \"))))(Tile((id \ + 6cec742d-95b7-4cb2-9662-2761546bd130)(label(25))(mold((out \ + Exp)(in_())(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0))(children()))))))))(Tile((id \ + 86f01c66-3a10-4436-a265-ed32edc4110e)(label(,))(mold((out \ + Exp)(in_())(nibs(((shape(Concave 18))(sort \ + Exp))((shape(Concave 18))(sort \ + Exp))))))(shards(0))(children())))(Secondary((id \ + 98be2652-07fc-4b72-8306-782c815b289e)(content(Whitespace\" \ + \"))))(Secondary((id \ + 3de82faf-6b7b-463c-996d-6c80e53ea84c)(content(Comment\"# \ + Labels Elided #\"))))(Secondary((id \ + f117280d-d441-4e2e-8838-9d60abeef621)(content(Whitespace\"\\n\"))))(Tile((id \ + 65e63a67-4573-4a72-8520-4f6c92520c85)(label(make_person))(mold((out \ + Exp)(in_())(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0))(children())))(Tile((id \ + 33c997e0-df65-4c1d-96cb-d80ef2677af5)(label(\"(\"\")\"))(mold((out \ + Exp)(in_(Exp))(nibs(((shape(Concave 3))(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0 1))(children(((Tile((id \ + b77a8e85-4ff3-413a-8a3e-a53b3724b247)(label(name))(mold((out \ + Exp)(in_())(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0))(children())))(Tile((id \ + 88107447-620c-4af0-a5ae-456a20ccc1c9)(label(=))(mold((out \ + Exp)(in_())(nibs(((shape(Concave 16))(sort \ + Exp))((shape(Concave 16))(sort \ + Exp))))))(shards(0))(children())))(Tile((id \ + ab0c2887-7351-4627-b46d-a19631eed2bb)(label(\"\\\"Alice\\\"\"))(mold((out \ + Exp)(in_())(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0))(children())))(Tile((id \ + 3bfe6938-5e24-4b48-99a3-b9241d8801c5)(label(,))(mold((out \ + Exp)(in_())(nibs(((shape(Concave 18))(sort \ + Exp))((shape(Concave 18))(sort \ + Exp))))))(shards(0))(children())))(Tile((id \ + 26d948f4-1b53-407f-82e7-ce22a2ef78ae)(label(age))(mold((out \ + Exp)(in_())(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0))(children())))(Tile((id \ + 614d4f6c-a75d-4a62-ac88-a1ea39d77474)(label(=))(mold((out \ + Exp)(in_())(nibs(((shape(Concave 16))(sort \ + Exp))((shape(Concave 16))(sort \ + Exp))))))(shards(0))(children())))(Tile((id \ + b1f9b854-9e65-49c1-96e4-4d501e573920)(label(22))(mold((out \ + Exp)(in_())(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0))(children()))))))))(Tile((id \ + f7ea71cf-5d03-44ae-b4f7-efb79c1b0a80)(label(,))(mold((out \ + Exp)(in_())(nibs(((shape(Concave 18))(sort \ + Exp))((shape(Concave 18))(sort \ + Exp))))))(shards(0))(children())))(Secondary((id \ + 23ccd115-dd96-415a-b141-18a2f9c2928c)(content(Whitespace\" \ + \"))))(Secondary((id \ + 4776654a-cdec-44cf-81c0-b8246aaba138)(content(Comment\"# \ + Labels Present #\"))))(Secondary((id \ + 0b72bd36-b3ed-4b5a-877d-39863dce9106)(content(Whitespace\"\\n\"))))(Tile((id \ + 1953b9bc-fe9d-4c1f-b000-a2bf7a9a53e4)(label(make_person))(mold((out \ + Exp)(in_())(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0))(children())))(Tile((id \ + 732bdb11-adfc-48bf-a140-1eb7cd7e6c9c)(label(\"(\"\")\"))(mold((out \ + Exp)(in_(Exp))(nibs(((shape(Concave 3))(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0 1))(children(((Tile((id \ + 1b0e2070-acec-473d-a277-c7672c903619)(label(age))(mold((out \ + Exp)(in_())(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0))(children())))(Tile((id \ + 01c9c18d-dbe1-4806-a8a6-65130c91a89a)(label(=))(mold((out \ + Exp)(in_())(nibs(((shape(Concave 16))(sort \ + Exp))((shape(Concave 16))(sort \ + Exp))))))(shards(0))(children())))(Tile((id \ + b04bb7ea-7efd-453f-a197-4ab510dd0ecf)(label(23))(mold((out \ + Exp)(in_())(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0))(children())))(Tile((id \ + df81e118-f9d0-4bc1-9019-be2b08b570bd)(label(,))(mold((out \ + Exp)(in_())(nibs(((shape(Concave 18))(sort \ + Exp))((shape(Concave 18))(sort \ + Exp))))))(shards(0))(children())))(Secondary((id \ + a0408131-c052-46c9-8416-c47aed162ded)(content(Whitespace\" \ + \"))))(Tile((id \ + a7730441-3dae-4dd8-9fbd-7b6f9a6041bf)(label(\"\\\"Mallory\\\"\"))(mold((out \ + Exp)(in_())(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0))(children()))))))))(Tile((id \ + f04e07bb-b99c-4d60-b21a-d14c84ea222b)(label(,))(mold((out \ + Exp)(in_())(nibs(((shape(Concave 18))(sort \ + Exp))((shape(Concave 18))(sort \ + Exp))))))(shards(0))(children())))(Secondary((id \ + 82d777da-78dc-4090-8467-8fef0264b422)(content(Whitespace\" \ + \"))))(Secondary((id \ + 4468b1fa-3064-49f6-94ca-58e15e65db17)(content(Comment\"# \ + Labels Rearranging #\"))))(Secondary((id \ + 0a3e4609-541c-47ff-bf58-ee707e6fe045)(content(Whitespace\"\\n\"))))(Tile((id \ + 65153718-6c17-4581-9a16-00b9780bd520)(label(make_person))(mold((out \ + Exp)(in_())(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0))(children())))(Tile((id \ + 21b03f5b-15dc-49da-814b-0fce4ec86966)(label(\"(\"\")\"))(mold((out \ + Exp)(in_(Exp))(nibs(((shape(Concave 3))(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0 1))(children(((Tile((id \ + aa9bac65-bcdc-43b3-8afa-4c77a7981213)(label(inconsistent_function_arg))(mold((out \ + Exp)(in_())(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0))(children()))))))))(Tile((id \ + a8f6f87f-a708-401e-8151-bb9752e92503)(label(,))(mold((out \ + Exp)(in_())(nibs(((shape(Concave 18))(sort \ + Exp))((shape(Concave 18))(sort \ + Exp))))))(shards(0))(children())))(Secondary((id \ + 281dc9b8-8acf-4d09-b6c9-206958fd8761)(content(Whitespace\" \ + \"))))(Secondary((id \ + 6d84d30b-e4e5-49cc-ac1c-02ded4f46aba)(content(Comment\"# \ + Rearranging and label addition only happens for \ + literals#\"))))(Secondary((id \ + 7fd3a911-046b-4a06-a949-a753d4f06116)(content(Whitespace\"\\n\"))))(Tile((id \ + 61983531-9deb-4439-b41d-be9ec0ffce1a)(label(make_person))(mold((out \ + Exp)(in_())(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0))(children())))(Tile((id \ + 373f7dbf-5e4c-4f95-907a-d27240ba731b)(label(\"(\"\")\"))(mold((out \ + Exp)(in_(Exp))(nibs(((shape(Concave 3))(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0 1))(children(((Tile((id \ + 5cde39ac-556b-4891-9983-774d9c28bf97)(label(consistent_function_arg))(mold((out \ + Exp)(in_())(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort \ + Exp))))))(shards(0))(children()))))))))(Secondary((id \ + 0efb970f-68ad-4381-81c3-9fc505b74e25)(content(Whitespace\" \ + \"))))(Secondary((id \ + 2c336ab6-7ae3-45ca-9878-92ae35539fd3)(content(Comment\"# \ + Unlabeled Tuple won't be allowed#\"))))(Secondary((id \ + 5213fdf4-7566-4b50-952b-69ed2727c40a)(content(Whitespace\"\\n\")))))))))(Secondary((id \ + fae77a96-5f1b-495d-9287-f067c380eb4c)(content(Whitespace\" \ + \")))))))))(Secondary((id \ + 63c5cf47-23a5-4ad2-b4fd-70ec5cbc26e2)(content(Whitespace\" \ \"))))(Secondary((id \ - 0342f646-322c-4f68-98cf-de94b4df6e3d)(content(Whitespace\"\\n\"))))(Secondary((id \ - fa4a94d2-5955-4f8a-a958-6d8c8ebeaefb)(content(Whitespace\"\\n\"))))(Secondary((id \ - d6e2d5c6-1ac7-42ca-9894-0f26ea900668)(content(Whitespace\"\\n\")))))))(ancestors())))(caret(Inner \ - 33 13)))"; + 16bbdb76-de5c-483d-ac2a-f6e9e3da33a4)(content(Whitespace\"\\n\"))))(Secondary((id \ + f0beefad-82fb-45a3-946c-981902b26ec5)(content(Whitespace\"\\n\"))))(Secondary((id \ + ecbf23ce-4a66-4b2b-b3d2-157af8872f02)(content(Whitespace\"\\n\"))))(Tile((id \ + aaced2aa-2d0a-461d-976f-9dec83c795cd)(label(let = \ + in))(mold((out Exp)(in_(Pat Exp))(nibs(((shape Convex)(sort \ + Exp))((shape(Concave 18))(sort Exp))))))(shards(0 1 \ + 2))(children(((Secondary((id \ + 7d1e8e23-dcd9-4b1e-b822-5f842cb6bd44)(content(Whitespace\" \ + \"))))(Tile((id \ + 774d1844-2b95-4fcf-8ee8-878cf7c84151)(label(singleton_function))(mold((out \ + Pat)(in_())(nibs(((shape Convex)(sort Pat))((shape \ + Convex)(sort Pat))))))(shards(0))(children())))(Secondary((id \ + 1a9c907e-f571-4d67-81ef-4ecc4851f548)(content(Whitespace\" \ + \")))))((Secondary((id \ + f4534e76-0158-416a-b61d-c2db539c772c)(content(Whitespace\" \ + \"))))(Tile((id \ + edd442bd-46fd-4794-bb9c-5af613263d68)(label(fun \ + ->))(mold((out Exp)(in_(Pat))(nibs(((shape Convex)(sort \ + Exp))((shape(Concave 15))(sort Exp))))))(shards(0 \ + 1))(children(((Secondary((id \ + 4386d151-96f7-4f04-9f11-64c7e6b993ad)(content(Whitespace\" \ + \"))))(Tile((id \ + 9cdc3202-4783-4f18-a28a-170cf9dcb31b)(label(arg))(mold((out \ + Pat)(in_())(nibs(((shape Convex)(sort Pat))((shape \ + Convex)(sort Pat))))))(shards(0))(children())))(Tile((id \ + 560eb91c-1ae0-4403-95be-acad1d929786)(label(=))(mold((out \ + Pat)(in_())(nibs(((shape(Concave 16))(sort \ + Pat))((shape(Concave 16))(sort \ + Pat))))))(shards(0))(children())))(Tile((id \ + d747f9b6-5a31-403b-9d2e-d020d7eab3ec)(label(a))(mold((out \ + Pat)(in_())(nibs(((shape Convex)(sort Pat))((shape \ + Convex)(sort Pat))))))(shards(0))(children())))(Secondary((id \ + 4a40c3d1-4a54-44a4-ba42-0adaf192746c)(content(Whitespace\" \ + \")))))))))(Secondary((id \ + 1c961485-84a2-4344-b8ac-80e5dfb502cb)(content(Whitespace\" \ + \"))))(Tile((id \ + 205b25cf-a5e3-425c-9543-14fa3236c695)(label(\"(\"\")\"))(mold((out \ + Exp)(in_(Exp))(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0 1))(children(((Tile((id \ + 1c0b9b7b-a060-4823-ae2d-f550638e0152)(label(a))(mold((out \ + Exp)(in_())(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0))(children())))(Tile((id \ + e3b044ee-b11c-4853-804f-3aaf9ae93f05)(label(,))(mold((out \ + Exp)(in_())(nibs(((shape(Concave 18))(sort \ + Exp))((shape(Concave 18))(sort \ + Exp))))))(shards(0))(children())))(Secondary((id \ + f4118116-399b-4d85-98e8-803013328598)(content(Whitespace\" \ + \"))))(Tile((id \ + ead750da-7f4a-485a-a026-a7a4453e2f46)(label(a))(mold((out \ + Exp)(in_())(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort \ + Exp))))))(shards(0))(children()))))))))(Secondary((id \ + db57dda3-640d-4413-852c-d3425de4192e)(content(Whitespace\" \ + \")))))))))(Secondary((id \ + 2065f441-6fa2-4bcf-ac9b-033463ad1d03)(content(Whitespace\"\\n\"))))(Tile((id \ + 75c4ccaf-dfa7-43b0-8715-707079b8ba58)(label([ ]))(mold((out \ + Exp)(in_(Exp))(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0 1))(children(((Tile((id \ + bb9f8ac1-4fbd-46f6-8526-85d4dcb25dea)(label(singleton_function))(mold((out \ + Exp)(in_())(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0))(children())))(Tile((id \ + 48931dc4-c220-4d0f-808c-2bd7972ff57e)(label(\"(\"\")\"))(mold((out \ + Exp)(in_(Exp))(nibs(((shape(Concave 3))(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0 1))(children(((Tile((id \ + 87bc964a-591e-4db8-9be5-0df341bc50fb)(label(1))(mold((out \ + Exp)(in_())(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0))(children()))))))))(Tile((id \ + 70479ac6-4712-4591-b99e-d0cd8377f170)(label(,))(mold((out \ + Exp)(in_())(nibs(((shape(Concave 18))(sort \ + Exp))((shape(Concave 18))(sort \ + Exp))))))(shards(0))(children())))(Tile((id \ + cea4761f-b845-4944-85c4-af502a792bc7)(label(singleton_function))(mold((out \ + Exp)(in_())(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0))(children())))(Tile((id \ + 209793a6-3fbc-4b27-81bd-b2800716af95)(label(\"(\"\")\"))(mold((out \ + Exp)(in_(Exp))(nibs(((shape(Concave 3))(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0 1))(children(((Tile((id \ + 5d711ea8-0d2d-4afc-a3d3-f6e00203ff15)(label(arg))(mold((out \ + Exp)(in_())(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort Exp))))))(shards(0))(children())))(Tile((id \ + 9ba1426c-958a-4cfe-b6b1-e14766cabcae)(label(=))(mold((out \ + Exp)(in_())(nibs(((shape(Concave 16))(sort \ + Exp))((shape(Concave 16))(sort \ + Exp))))))(shards(0))(children())))(Tile((id \ + cbe7def1-4267-4549-b8e6-f622fd80f3ec)(label(1))(mold((out \ + Exp)(in_())(nibs(((shape Convex)(sort Exp))((shape \ + Convex)(sort \ + Exp))))))(shards(0))(children()))))))))))))))))(ancestors())))(caret \ + Outer))"; backup_text = "# Labeled Tuples #\n\n\ # Tuples can have labels#\n\ @@ -18154,7 +18573,22 @@ let startup : PersistentData.t = # Destructuring #\n\ let (bobs_name, age=bobs_age, \ favorite_color=bobs_favorite_color) = bob in\n\n\ - \ \n\n\n"; + # As Labeled Function Arguments#\n\ + let make_person = fun name=name, age=age -> (name, age, \ + favorite_color=\"red\") in\n\ + let inconsistent_function_arg = (\"Invalid\", -1) in\n\ + let consistent_function_arg = (name=\"Valid\", age=1) in\n\ + let more_people : [Person] = [\n\ + make_person(\"Bob\", 25), # Labels Elided #\n\ + make_person(name=\"Alice\",age=22), # Labels Present #\n\ + make_person(age=23, \"Mallory\"), # Labels Rearranging #\n\ + make_person(inconsistent_function_arg), # Rearranging and \ + label addition only happens for literals#\n\ + make_person(consistent_function_arg) # Unlabeled Tuple won't \ + be allowed#\n\ + ] in \n\n\n\ + let singleton_function = fun arg=a -> (a, a) in\n\ + [singleton_function(1),singleton_function(arg=1)]"; } ); ( "Expressive Programming", { @@ -18258,6 +18692,7 @@ let startup : PersistentData.t = ("scratch_Computing Equationally", Evaluation); ("scratch_Conditional Expressions", Evaluation); ("scratch_Functions", Evaluation); + ("scratch_Labeled Tuples", Evaluation); ("scratch_Polymorphism", Evaluation); ("scratch_Programming Expressively", Evaluation); ("scratch_Projectors", Evaluation);