change just Json module name

This commit is contained in:
Luke Boswell 2023-06-04 17:37:01 +10:00
parent 7b22785b2b
commit c1ff49be6c
No known key found for this signature in database
GPG key ID: F6DB3C9DB47377B0
26 changed files with 5495 additions and 5530 deletions

View file

@ -1,41 +1,6 @@
## JSON is a data format that is easy for humans to read and write. It is
## commonly used to exchange data between two systems such as a server and a
## client (e.g. web browser).
##
## This module implements functionality to serialize and de-serialize Roc types
## to and from JSON data. Using the `Encode` and `Decode` builtins this process
## can be achieved without the need to write custom encoder and decoder functions
## to parse UTF-8 strings.
##
## Here is a basic example which shows how to parse a JSON record into a Roc
## type named `Language` which includes a `name` field. The JSON string is
## decoded and then the field is encoded back into a UTF-8 string.
##
## ```
## Language : {
## name : Str,
## }
##
## jsonStr = Str.toUtf8 "{\"name\":\"Röc Lang\"}"
##
## result : Result Language _
## result =
## jsonStr
## |> Decode.fromBytes Json.json # returns `Ok {name : "Röc Lang"}`
##
## name =
## decodedValue <- Result.map result
##
## Encode.toBytes decodedValue.name Json.json
##
## expect name == Ok (Str.toUtf8 "\"Röc Lang\"")
## ```
##
## **Note:** This module is likely to be moved out of the builtins in future.
## It is currently located here to facilitate development of the Abilities
## language feature and testing. You are welcome to use this module, just note
## that it will be moved into a package in a future update.
interface Json
## THIS MODULE IS DEPRECATED AND CURRENTLY IN THE PROCESS OF BEING REMOVED
## FROM STD LIBRARY
interface TotallyNotJson
exposes [
Json,
json,

View file

@ -1,3 +1,3 @@
package "builtins"
exposes [Str, Num, Bool, Result, List, Dict, Set, Decode, Encode, Hash, Set, Box, Json]
exposes [Str, Num, Bool, Result, List, Dict, Set, Decode, Encode, Hash, Set, Box, TotallyNotJson]
packages {}

View file

@ -34,4 +34,4 @@ const BOOL: &str = include_str!("../roc/Bool.roc");
const ENCODE: &str = include_str!("../roc/Encode.roc");
const DECODE: &str = include_str!("../roc/Decode.roc");
const HASH: &str = include_str!("../roc/Hash.roc");
const JSON: &str = include_str!("../roc/Json.roc");
const JSON: &str = include_str!("../roc/TotallyNotJson.roc");

View file

@ -25,7 +25,7 @@ const MODULES: &[(ModuleId, &str)] = &[
(ModuleId::ENCODE, "Encode.roc"),
(ModuleId::DECODE, "Decode.roc"),
(ModuleId::HASH, "Hash.roc"),
(ModuleId::JSON, "Json.roc"),
(ModuleId::JSON, "TotallyNotJson.roc"),
];
fn main() {

View file

@ -3845,7 +3845,7 @@ fn load_module<'a>(
"Encode", ModuleId::ENCODE
"Decode", ModuleId::DECODE
"Hash", ModuleId::HASH
"Json", ModuleId::JSON
"TotallyNotJson", ModuleId::JSON
}
let (filename, opt_shorthand) = module_name_to_path(src_dir, &module_name, arc_shorthands);

View file

@ -23,5 +23,5 @@ pub const BUILTIN_MODULES: &[(ModuleId, &str)] = &[
(ModuleId::ENCODE, "Encode"),
(ModuleId::DECODE, "Decode"),
(ModuleId::HASH, "Hash"),
(ModuleId::JSON, "Json"),
(ModuleId::JSON, "TotallyNotJson"),
];

View file

@ -113,7 +113,7 @@ impl ModuleName {
pub const ENCODE: &'static str = "Encode";
pub const DECODE: &'static str = "Decode";
pub const HASH: &'static str = "Hash";
pub const JSON: &'static str = "Json";
pub const JSON: &'static str = "TotallyNotJson";
pub fn as_str(&self) -> &str {
self.0.as_str()

View file

@ -1574,8 +1574,8 @@ define_builtins! {
20 HASH_HASH_LIST: "hashList"
21 HASH_HASH_UNORDERED: "hashUnordered"
}
14 JSON: "Json" => {
0 JSON_JSON: "Json"
14 JSON: "TotallyNotJson" => {
0 JSON_JSON: "TotallyNotJson"
}
num_modules: 15 // Keep this count up to date by hand! (TODO: see the mut_map! macro for how we could determine this count correctly in the macro)

View file

@ -355,7 +355,7 @@ fn encode_use_stdlib() {
indoc!(
r#"
app "test"
imports [Encode, Json]
imports [Encode, TotallyNotJson]
provides [main] to "./platform"
HelloWorld := {} has [Encoding {toEncoder}]
@ -365,7 +365,7 @@ fn encode_use_stdlib() {
|> Encode.appendWith (Encode.string "Hello, World!\n") fmt
main =
result = Str.fromUtf8 (Encode.toBytes (@HelloWorld {}) Json.json)
result = Str.fromUtf8 (Encode.toBytes (@HelloWorld {}) TotallyNotJson.json)
when result is
Ok s -> s
_ -> "<bad>"
@ -383,14 +383,14 @@ fn encode_use_stdlib_without_wrapping_custom() {
indoc!(
r#"
app "test"
imports [Encode, Json]
imports [Encode, TotallyNotJson]
provides [main] to "./platform"
HelloWorld := {} has [Encoding {toEncoder}]
toEncoder = \@HelloWorld {} -> Encode.string "Hello, World!\n"
main =
result = Str.fromUtf8 (Encode.toBytes (@HelloWorld {}) Json.json)
result = Str.fromUtf8 (Encode.toBytes (@HelloWorld {}) TotallyNotJson.json)
when result is
Ok s -> s
_ -> "<bad>"
@ -409,13 +409,13 @@ fn encode_derive_to_encoder_for_opaque() {
indoc!(
r#"
app "test"
imports [Json]
imports [TotallyNotJson]
provides [main] to "./platform"
HelloWorld := { a: Str } has [Encoding]
main =
result = Str.fromUtf8 (Encode.toBytes (@HelloWorld { a: "Hello, World!" }) Json.json)
result = Str.fromUtf8 (Encode.toBytes (@HelloWorld { a: "Hello, World!" }) TotallyNotJson.json)
when result is
Ok s -> s
_ -> "<bad>"
@ -433,7 +433,7 @@ fn to_encoder_encode_custom_has_capture() {
indoc!(
r#"
app "test"
imports [Encode, Json]
imports [Encode, TotallyNotJson]
provides [main] to "./platform"
HelloWorld := Str has [Encoding {toEncoder}]
@ -443,7 +443,7 @@ fn to_encoder_encode_custom_has_capture() {
|> Encode.appendWith (Encode.string s1) fmt
main =
result = Str.fromUtf8 (Encode.toBytes (@HelloWorld "Hello, World!\n") Json.json)
result = Str.fromUtf8 (Encode.toBytes (@HelloWorld "Hello, World!\n") TotallyNotJson.json)
when result is
Ok s -> s
_ -> "<bad>"
@ -473,10 +473,10 @@ mod encode_immediate {
assert_evals_to!(
indoc!(
r#"
app "test" imports [Encode, Json] provides [main] to "./platform"
app "test" imports [Encode, TotallyNotJson] provides [main] to "./platform"
main =
when Str.fromUtf8 (Encode.toBytes "foo" Json.json) is
when Str.fromUtf8 (Encode.toBytes "foo" TotallyNotJson.json) is
Ok s -> s
_ -> "<bad>"
"#
@ -492,10 +492,10 @@ mod encode_immediate {
assert_evals_to!(
indoc!(
r#"
app "test" imports [Encode, Json] provides [main] to "./platform"
app "test" imports [Encode, TotallyNotJson] provides [main] to "./platform"
main =
when Str.fromUtf8 (Encode.toBytes [1, 2, 3] Json.json) is
when Str.fromUtf8 (Encode.toBytes [1, 2, 3] TotallyNotJson.json) is
Ok s -> s
_ -> "<bad>"
"#
@ -511,10 +511,10 @@ mod encode_immediate {
assert_evals_to!(
indoc!(
r#"
app "test" imports [Encode, Json] provides [main] to "./platform"
app "test" imports [Encode, TotallyNotJson] provides [main] to "./platform"
main =
when Str.fromUtf8 (Encode.toBytes Bool.false Json.json) is
when Str.fromUtf8 (Encode.toBytes Bool.false TotallyNotJson.json) is
Ok s -> s
_ -> "<bad>"
"#
@ -532,10 +532,10 @@ mod encode_immediate {
assert_evals_to!(
&format!(indoc!(
r#"
app "test" imports [Encode, Json] provides [main] to "./platform"
app "test" imports [Encode, TotallyNotJson] provides [main] to "./platform"
main =
when Str.fromUtf8 (Encode.toBytes {}{} Json.json) is
when Str.fromUtf8 (Encode.toBytes {}{} TotallyNotJson.json) is
Ok s -> s
_ -> "<bad>"
"#
@ -572,11 +572,11 @@ fn encode_derived_record_one_field_string() {
indoc!(
r#"
app "test"
imports [Encode, Json]
imports [Encode, TotallyNotJson]
provides [main] to "./platform"
main =
result = Str.fromUtf8 (Encode.toBytes {a: "foo"} Json.json)
result = Str.fromUtf8 (Encode.toBytes {a: "foo"} TotallyNotJson.json)
when result is
Ok s -> s
_ -> "<bad>"
@ -595,12 +595,12 @@ fn encode_derived_record_two_fields_strings() {
indoc!(
r#"
app "test"
imports [Encode, Json]
imports [Encode, TotallyNotJson]
provides [main] to "./platform"
main =
rcd = {a: "foo", b: "bar"}
result = Str.fromUtf8 (Encode.toBytes rcd Json.json)
result = Str.fromUtf8 (Encode.toBytes rcd TotallyNotJson.json)
when result is
Ok s -> s
_ -> "<bad>"
@ -619,12 +619,12 @@ fn encode_derived_nested_record_string() {
indoc!(
r#"
app "test"
imports [Encode, Json]
imports [Encode, TotallyNotJson]
provides [main] to "./platform"
main =
rcd = {a: {b: "bar"}}
encoded = Encode.toBytes rcd Json.json
encoded = Encode.toBytes rcd TotallyNotJson.json
result = Str.fromUtf8 encoded
when result is
Ok s -> s
@ -643,12 +643,12 @@ fn encode_derived_tag_one_payload_string() {
indoc!(
r#"
app "test"
imports [Encode, Json]
imports [Encode, TotallyNotJson]
provides [main] to "./platform"
main =
x = A "foo"
result = Str.fromUtf8 (Encode.toBytes x Json.json)
result = Str.fromUtf8 (Encode.toBytes x TotallyNotJson.json)
when result is
Ok s -> s
_ -> "<bad>"
@ -666,12 +666,12 @@ fn encode_derived_tag_two_payloads_string() {
indoc!(
r#"
app "test"
imports [Encode, Json]
imports [Encode, TotallyNotJson]
provides [main] to "./platform"
main =
x = A "foo" "bar"
result = Str.fromUtf8 (Encode.toBytes x Json.json)
result = Str.fromUtf8 (Encode.toBytes x TotallyNotJson.json)
when result is
Ok s -> s
_ -> "<bad>"
@ -689,12 +689,12 @@ fn encode_derived_nested_tag_string() {
indoc!(
r#"
app "test"
imports [Encode, Json]
imports [Encode, TotallyNotJson]
provides [main] to "./platform"
main =
x = A (B "foo" "bar")
encoded = Encode.toBytes x Json.json
encoded = Encode.toBytes x TotallyNotJson.json
result = Str.fromUtf8 encoded
when result is
Ok s -> s
@ -714,12 +714,12 @@ fn encode_derived_nested_record_tag_record() {
indoc!(
r#"
app "test"
imports [Encode, Json]
imports [Encode, TotallyNotJson]
provides [main] to "./platform"
main =
x = {a: (B ({c: "foo"}))}
encoded = Encode.toBytes x Json.json
encoded = Encode.toBytes x TotallyNotJson.json
result = Str.fromUtf8 encoded
when result is
Ok s -> s
@ -738,12 +738,12 @@ fn encode_derived_list_string() {
indoc!(
r#"
app "test"
imports [Encode, Json]
imports [Encode, TotallyNotJson]
provides [main] to "./platform"
main =
lst = ["foo", "bar", "baz"]
encoded = Encode.toBytes lst Json.json
encoded = Encode.toBytes lst TotallyNotJson.json
result = Str.fromUtf8 encoded
when result is
Ok s -> s
@ -763,12 +763,12 @@ fn encode_derived_list_of_records() {
indoc!(
r#"
app "test"
imports [Encode, Json]
imports [Encode, TotallyNotJson]
provides [main] to "./platform"
main =
lst = [{a: "foo"}, {a: "bar"}, {a: "baz"}]
encoded = Encode.toBytes lst Json.json
encoded = Encode.toBytes lst TotallyNotJson.json
result = Str.fromUtf8 encoded
when result is
Ok s -> s
@ -787,12 +787,12 @@ fn encode_derived_list_of_lists_of_strings() {
indoc!(
r#"
app "test"
imports [Encode, Json]
imports [Encode, TotallyNotJson]
provides [main] to "./platform"
main =
lst = [["a", "b"], ["c", "d", "e"], ["f"]]
encoded = Encode.toBytes lst Json.json
encoded = Encode.toBytes lst TotallyNotJson.json
result = Str.fromUtf8 encoded
when result is
Ok s -> s
@ -812,14 +812,14 @@ fn encode_derived_record_with_many_types() {
indoc!(
r#"
app "test"
imports [Encode, Json]
imports [Encode, TotallyNotJson]
provides [main] to "./platform"
main =
fresh : [Fresh Str, Rotten Str]
fresh = Fresh "tomatoes"
rcd = {actors: ["Idris Elba", "Mila Kunis"], year: 2004u16, rating: {average: 7u8, min: 1u8, max: 10u8, sentiment: fresh}}
result = Str.fromUtf8 (Encode.toBytes rcd Json.json)
result = Str.fromUtf8 (Encode.toBytes rcd TotallyNotJson.json)
when result is
Ok s -> s
_ -> "<bad>"
@ -839,12 +839,12 @@ fn encode_derived_tuple_two_fields() {
indoc!(
r#"
app "test"
imports [Encode, Json]
imports [Encode, TotallyNotJson]
provides [main] to "./platform"
main =
tup = ("foo", 10u8)
result = Str.fromUtf8 (Encode.toBytes tup Json.json)
result = Str.fromUtf8 (Encode.toBytes tup TotallyNotJson.json)
when result is
Ok s -> s
_ -> "<bad>"
@ -862,12 +862,12 @@ fn encode_derived_tuple_of_tuples() {
indoc!(
r#"
app "test"
imports [Encode, Json]
imports [Encode, TotallyNotJson]
provides [main] to "./platform"
main =
tup = ( ("foo", 10u8), (23u8, "bar", 15u8) )
result = Str.fromUtf8 (Encode.toBytes tup Json.json)
result = Str.fromUtf8 (Encode.toBytes tup TotallyNotJson.json)
when result is
Ok s -> s
_ -> "<bad>"
@ -886,7 +886,7 @@ fn encode_derived_generic_record_with_different_field_types() {
indoc!(
r#"
app "test"
imports [Encode, Json]
imports [Encode, TotallyNotJson]
provides [main] to "./platform"
Q a b := {a: a, b: b} has [Encoding]
@ -894,7 +894,7 @@ fn encode_derived_generic_record_with_different_field_types() {
q = @Q {a: 10u32, b: "fieldb"}
main =
result = Str.fromUtf8 (Encode.toBytes q Json.json)
result = Str.fromUtf8 (Encode.toBytes q TotallyNotJson.json)
when result is
Ok s -> s
_ -> "<bad>"
@ -912,7 +912,7 @@ fn encode_derived_generic_tag_with_different_field_types() {
indoc!(
r#"
app "test"
imports [Encode, Json]
imports [Encode, TotallyNotJson]
provides [main] to "./platform"
Q a b := [A a, B b] has [Encoding]
@ -921,7 +921,7 @@ fn encode_derived_generic_tag_with_different_field_types() {
q = @Q (B 67)
main =
result = Str.fromUtf8 (Encode.toBytes q Json.json)
result = Str.fromUtf8 (Encode.toBytes q TotallyNotJson.json)
when result is
Ok s -> s
_ -> "<bad>"
@ -939,7 +939,7 @@ fn decode_use_stdlib() {
indoc!(
r#"
app "test"
imports [Json]
imports [TotallyNotJson]
provides [main] to "./platform"
MyNum := U8 has [Decoding {decoder: myDecoder}]
@ -953,7 +953,7 @@ fn decode_use_stdlib() {
Err e -> {result: Err e, rest}
main =
when Decode.fromBytes [49, 53] Json.json is
when Decode.fromBytes [49, 53] TotallyNotJson.json is
Ok (@MyNum n) -> n
_ -> 101
"#
@ -973,13 +973,13 @@ fn decode_derive_decoder_for_opaque() {
indoc!(
r#"
app "test"
imports [Json]
imports [TotallyNotJson]
provides [main] to "./platform"
HelloWorld := { a: Str } has [Decoding]
main =
when Str.toUtf8 """{"a":"Hello, World!"}""" |> Decode.fromBytes Json.json is
when Str.toUtf8 """{"a":"Hello, World!"}""" |> Decode.fromBytes TotallyNotJson.json is
Ok (@HelloWorld {a}) -> a
_ -> "FAIL"
"#
@ -996,7 +996,7 @@ fn decode_use_stdlib_json_list() {
indoc!(
r#"
app "test"
imports [Json]
imports [TotallyNotJson]
provides [main] to "./platform"
MyNumList := List U8 has [Decoding {decoder: myDecoder}]
@ -1010,7 +1010,7 @@ fn decode_use_stdlib_json_list() {
Err e -> {result: Err e, rest}
main =
when Str.toUtf8 "[1,2,3]" |> Decode.fromBytes Json.json is
when Str.toUtf8 "[1,2,3]" |> Decode.fromBytes TotallyNotJson.json is
Ok (@MyNumList lst) -> lst
_ -> []
"#
@ -1039,10 +1039,10 @@ mod decode_immediate {
assert_evals_to!(
indoc!(
r#"
app "test" imports [Json] provides [main] to "./platform"
app "test" imports [TotallyNotJson] provides [main] to "./platform"
main =
when Str.toUtf8 "\"foo\"" |> Decode.fromBytes Json.json is
when Str.toUtf8 "\"foo\"" |> Decode.fromBytes TotallyNotJson.json is
Ok s -> s
_ -> "<bad>"
"#
@ -1058,13 +1058,13 @@ mod decode_immediate {
assert_evals_to!(
indoc!(
r#"
app "test" imports [Json] provides [main] to "./platform"
app "test" imports [TotallyNotJson] provides [main] to "./platform"
main =
input = Str.toUtf8 "[1,2,3]"
expected = [1,2,3]
actual = Decode.fromBytes input Json.json |> Result.withDefault []
actual = Decode.fromBytes input TotallyNotJson.json |> Result.withDefault []
actual == expected
"#
@ -1080,10 +1080,10 @@ mod decode_immediate {
assert_evals_to!(
indoc!(
r#"
app "test" imports [Json] provides [main] to "./platform"
app "test" imports [TotallyNotJson] provides [main] to "./platform"
main =
when Str.toUtf8 "false" |> Decode.fromBytes Json.json is
when Str.toUtf8 "false" |> Decode.fromBytes TotallyNotJson.json is
Ok s -> s
_ -> Bool.true
"#
@ -1101,10 +1101,10 @@ mod decode_immediate {
assert_evals_to!(
&format!(indoc!(
r#"
app "test" imports [Json] provides [main] to "./platform"
app "test" imports [TotallyNotJson] provides [main] to "./platform"
main =
when Num.toStr {}{} |> Str.toUtf8 |> Decode.fromBytes Json.json is
when Num.toStr {}{} |> Str.toUtf8 |> Decode.fromBytes TotallyNotJson.json is
Ok n -> n
_ -> 101{}
"#
@ -1139,10 +1139,10 @@ mod decode_immediate {
assert_evals_to!(
indoc!(
r#"
app "test" imports [Json] provides [main] to "./platform"
app "test" imports [TotallyNotJson] provides [main] to "./platform"
main =
when Num.toStr 17.23dec |> Str.toUtf8 |> Decode.fromBytes Json.json is
when Num.toStr 17.23dec |> Str.toUtf8 |> Decode.fromBytes TotallyNotJson.json is
Ok n -> n
_ -> 101dec
"#
@ -1159,10 +1159,10 @@ fn decode_list_of_strings() {
assert_evals_to!(
indoc!(
r#"
app "test" imports [Json] provides [main] to "./platform"
app "test" imports [TotallyNotJson] provides [main] to "./platform"
main =
when Str.toUtf8 "[\"a\",\"b\",\"c\"]" |> Decode.fromBytes Json.json is
when Str.toUtf8 "[\"a\",\"b\",\"c\"]" |> Decode.fromBytes TotallyNotJson.json is
Ok l -> Str.joinWith l ","
_ -> "<bad>"
"#
@ -1178,10 +1178,10 @@ fn encode_then_decode_list_of_strings() {
assert_evals_to!(
indoc!(
r#"
app "test" imports [Json] provides [main] to "./platform"
app "test" imports [TotallyNotJson] provides [main] to "./platform"
main =
when Encode.toBytes ["a", "b", "c"] Json.json |> Decode.fromBytes Json.json is
when Encode.toBytes ["a", "b", "c"] TotallyNotJson.json |> Decode.fromBytes TotallyNotJson.json is
Ok l -> Str.joinWith l ","
_ -> "something went wrong"
"#
@ -1198,10 +1198,10 @@ fn encode_then_decode_list_of_lists_of_strings() {
assert_evals_to!(
indoc!(
r#"
app "test" imports [Json] provides [main] to "./platform"
app "test" imports [TotallyNotJson] provides [main] to "./platform"
main =
when Encode.toBytes [["a", "b"], ["c", "d", "e"], ["f"]] Json.json |> Decode.fromBytes Json.json is
when Encode.toBytes [["a", "b"], ["c", "d", "e"], ["f"]] TotallyNotJson.json |> Decode.fromBytes TotallyNotJson.json is
Ok list -> (List.map list \inner -> Str.joinWith inner ",") |> Str.joinWith l ";"
_ -> "something went wrong"
"#
@ -1220,10 +1220,10 @@ fn decode_record_two_fields() {
assert_evals_to!(
indoc!(
r#"
app "test" imports [Json] provides [main] to "./platform"
app "test" imports [TotallyNotJson] provides [main] to "./platform"
main =
when Str.toUtf8 "{\"first\":\"ab\",\"second\":\"cd\"}" |> Decode.fromBytes Json.json is
when Str.toUtf8 "{\"first\":\"ab\",\"second\":\"cd\"}" |> Decode.fromBytes TotallyNotJson.json is
Ok {first: "ab", second: "cd"} -> "abcd"
_ -> "something went wrong"
"#
@ -1242,10 +1242,10 @@ fn decode_record_two_fields_string_and_int() {
assert_evals_to!(
indoc!(
r#"
app "test" imports [Json] provides [main] to "./platform"
app "test" imports [TotallyNotJson] provides [main] to "./platform"
main =
when Str.toUtf8 "{\"first\":\"ab\",\"second\":10}" |> Decode.fromBytes Json.json is
when Str.toUtf8 "{\"first\":\"ab\",\"second\":10}" |> Decode.fromBytes TotallyNotJson.json is
Ok {first: "ab", second: 10u8} -> "ab10"
_ -> "something went wrong"
"#
@ -1264,10 +1264,10 @@ fn decode_record_two_fields_string_and_string_infer() {
assert_evals_to!(
indoc!(
r#"
app "test" imports [Json] provides [main] to "./platform"
app "test" imports [TotallyNotJson] provides [main] to "./platform"
main =
when Str.toUtf8 "{\"first\":\"ab\",\"second\":\"cd\"}" |> Decode.fromBytes Json.json is
when Str.toUtf8 "{\"first\":\"ab\",\"second\":\"cd\"}" |> Decode.fromBytes TotallyNotJson.json is
Ok {first, second} -> Str.concat first second
_ -> "something went wrong"
"#
@ -1286,10 +1286,10 @@ fn decode_record_two_fields_string_and_string_infer_local_var() {
assert_evals_to!(
indoc!(
r#"
app "test" imports [Json] provides [main] to "./platform"
app "test" imports [TotallyNotJson] provides [main] to "./platform"
main =
decoded = Str.toUtf8 "{\"first\":\"ab\",\"second\":\"cd\"}" |> Decode.fromBytes Json.json
decoded = Str.toUtf8 "{\"first\":\"ab\",\"second\":\"cd\"}" |> Decode.fromBytes TotallyNotJson.json
when decoded is
Ok rcd -> Str.concat rcd.first rcd.second
_ -> "something went wrong"
@ -1309,10 +1309,10 @@ fn decode_record_two_fields_string_and_string_infer_local_var_destructured() {
assert_evals_to!(
indoc!(
r#"
app "test" imports [Json] provides [main] to "./platform"
app "test" imports [TotallyNotJson] provides [main] to "./platform"
main =
decoded = Str.toUtf8 "{\"first\":\"ab\",\"second\":\"cd\"}" |> Decode.fromBytes Json.json
decoded = Str.toUtf8 "{\"first\":\"ab\",\"second\":\"cd\"}" |> Decode.fromBytes TotallyNotJson.json
when decoded is
Ok {first, second} -> Str.concat first second
_ -> "something went wrong"
@ -1330,10 +1330,10 @@ fn decode_empty_record() {
assert_evals_to!(
indoc!(
r#"
app "test" imports [Json] provides [main] to "./platform"
app "test" imports [TotallyNotJson] provides [main] to "./platform"
main =
when Str.toUtf8 "{}" |> Decode.fromBytes Json.json is
when Str.toUtf8 "{}" |> Decode.fromBytes TotallyNotJson.json is
Ok {} -> "empty"
_ -> "something went wrong"
"#
@ -1353,10 +1353,10 @@ fn decode_record_of_record() {
assert_evals_to!(
indoc!(
r#"
app "test" imports [Json] provides [main] to "./platform"
app "test" imports [TotallyNotJson] provides [main] to "./platform"
main =
when Str.toUtf8 "{\"outer\":{\"inner\":\"a\"},\"other\":{\"one\":\"b\",\"two\":10}}" |> Decode.fromBytes Json.json is
when Str.toUtf8 "{\"outer\":{\"inner\":\"a\"},\"other\":{\"one\":\"b\",\"two\":10}}" |> Decode.fromBytes TotallyNotJson.json is
Ok {outer: {inner: "a"}, other: {one: "b", two: 10u8}} -> "ab10"
_ -> "something went wrong"
"#
@ -1375,10 +1375,10 @@ fn decode_tuple_two_elements() {
assert_evals_to!(
indoc!(
r#"
app "test" imports [Json] provides [main] to "./platform"
app "test" imports [TotallyNotJson] provides [main] to "./platform"
main =
when Str.toUtf8 "[\"ab\",10]" |> Decode.fromBytes Json.json is
when Str.toUtf8 "[\"ab\",10]" |> Decode.fromBytes TotallyNotJson.json is
Ok ("ab", 10u8) -> "abcd"
_ -> "something went wrong"
"#
@ -1397,10 +1397,10 @@ fn decode_tuple_of_tuples() {
assert_evals_to!(
indoc!(
r#"
app "test" imports [Json] provides [main] to "./platform"
app "test" imports [TotallyNotJson] provides [main] to "./platform"
main =
when Str.toUtf8 "[[\"ab\",10],[\"cd\",25]]" |> Decode.fromBytes Json.json is
when Str.toUtf8 "[[\"ab\",10],[\"cd\",25]]" |> Decode.fromBytes TotallyNotJson.json is
Ok ( ("ab", 10u8), ("cd", 25u8) ) -> "abcd"
_ -> "something went wrong"
"#
@ -2116,11 +2116,11 @@ fn issue_4772_weakened_monomorphic_destructure() {
indoc!(
r###"
app "test"
imports [Json]
imports [TotallyNotJson]
provides [main] to "./platform"
getNumber =
{ result, rest } = Decode.fromBytesPartial (Str.toUtf8 "\"1234\"") Json.json
{ result, rest } = Decode.fromBytesPartial (Str.toUtf8 "\"1234\"") TotallyNotJson.json
when result is
Ok val ->

View file

@ -6,187 +6,17 @@ procedure Encode.23 (Encode.98):
ret Encode.98;
procedure Encode.24 (Encode.99, Encode.107, Encode.101):
let Encode.111 : List U8 = CallByName Json.181 Encode.99 Encode.101 Encode.107;
let Encode.111 : List U8 = CallByName TotallyNotJson.182 Encode.99 Encode.101 Encode.107;
ret Encode.111;
procedure Encode.26 (Encode.105, Encode.106):
let Encode.109 : List U8 = Array [];
let Encode.110 : Str = CallByName Json.24 Encode.105;
let Encode.110 : Str = CallByName TotallyNotJson.25 Encode.105;
let Encode.108 : List U8 = CallByName Encode.24 Encode.109 Encode.110 Encode.106;
ret Encode.108;
procedure Json.1 ():
let Json.1171 : [C , C [], C , C , C , C ] = TagId(2) ;
ret Json.1171;
procedure Json.181 (Json.182, Json.1174, Json.180):
let Json.1177 : List U8 = CallByName Json.25 Json.180;
let Json.1176 : List U8 = CallByName List.8 Json.182 Json.1177;
ret Json.1176;
procedure Json.188 (Json.1225, Json.191):
let Json.189 : U64 = StructAtIndex 0 Json.1225;
let Json.190 : Int1 = StructAtIndex 1 Json.1225;
switch Json.191:
case 34:
let Json.1228 : Int1 = false;
let Json.1227 : {U64, Int1} = Struct {Json.189, Json.1228};
let Json.1226 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) Json.1227;
ret Json.1226;
case 92:
let Json.1231 : Int1 = false;
let Json.1230 : {U64, Int1} = Struct {Json.189, Json.1231};
let Json.1229 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) Json.1230;
ret Json.1229;
case 47:
let Json.1234 : Int1 = false;
let Json.1233 : {U64, Int1} = Struct {Json.189, Json.1234};
let Json.1232 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) Json.1233;
ret Json.1232;
case 8:
let Json.1237 : Int1 = false;
let Json.1236 : {U64, Int1} = Struct {Json.189, Json.1237};
let Json.1235 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) Json.1236;
ret Json.1235;
case 12:
let Json.1240 : Int1 = false;
let Json.1239 : {U64, Int1} = Struct {Json.189, Json.1240};
let Json.1238 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) Json.1239;
ret Json.1238;
case 10:
let Json.1243 : Int1 = false;
let Json.1242 : {U64, Int1} = Struct {Json.189, Json.1243};
let Json.1241 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) Json.1242;
ret Json.1241;
case 13:
let Json.1246 : Int1 = false;
let Json.1245 : {U64, Int1} = Struct {Json.189, Json.1246};
let Json.1244 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) Json.1245;
ret Json.1244;
case 9:
let Json.1249 : Int1 = false;
let Json.1248 : {U64, Int1} = Struct {Json.189, Json.1249};
let Json.1247 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) Json.1248;
ret Json.1247;
default:
let Json.1253 : U64 = 1i64;
let Json.1252 : U64 = CallByName Num.19 Json.189 Json.1253;
let Json.1251 : {U64, Int1} = Struct {Json.1252, Json.190};
let Json.1250 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) Json.1251;
ret Json.1250;
procedure Json.214 (Json.215, Json.216):
let Json.1196 : List U8 = CallByName Json.26 Json.216;
let Json.1195 : List U8 = CallByName List.8 Json.215 Json.1196;
ret Json.1195;
procedure Json.24 (Json.180):
let Json.1172 : Str = CallByName Encode.23 Json.180;
ret Json.1172;
procedure Json.25 (Json.183):
let Json.184 : List U8 = CallByName Str.12 Json.183;
let Json.1254 : U64 = 0i64;
let Json.1255 : Int1 = true;
let Json.185 : {U64, Int1} = Struct {Json.1254, Json.1255};
let Json.1224 : {} = Struct {};
inc Json.184;
let Json.186 : {U64, Int1} = CallByName List.26 Json.184 Json.185 Json.1224;
let Json.1178 : Int1 = StructAtIndex 1 Json.186;
let Json.1222 : Int1 = true;
let Json.1223 : Int1 = lowlevel Eq Json.1222 Json.1178;
if Json.1223 then
let Json.1188 : U64 = CallByName List.6 Json.184;
let Json.1189 : U64 = 2i64;
let Json.1187 : U64 = CallByName Num.19 Json.1188 Json.1189;
let Json.1184 : List U8 = CallByName List.68 Json.1187;
let Json.1186 : U8 = 34i64;
let Json.1185 : List U8 = Array [Json.1186];
let Json.1183 : List U8 = CallByName List.8 Json.1184 Json.1185;
let Json.1180 : List U8 = CallByName List.8 Json.1183 Json.184;
let Json.1182 : U8 = 34i64;
let Json.1181 : List U8 = Array [Json.1182];
let Json.1179 : List U8 = CallByName List.8 Json.1180 Json.1181;
ret Json.1179;
else
inc Json.184;
let Json.1221 : U64 = StructAtIndex 0 Json.186;
let Json.1220 : {List U8, List U8} = CallByName List.52 Json.184 Json.1221;
let Json.210 : List U8 = StructAtIndex 0 Json.1220;
let Json.212 : List U8 = StructAtIndex 1 Json.1220;
let Json.1218 : U64 = CallByName List.6 Json.184;
dec Json.184;
let Json.1219 : U64 = 120i64;
let Json.1216 : U64 = CallByName Num.21 Json.1218 Json.1219;
let Json.1217 : U64 = 100i64;
let Json.1215 : U64 = CallByName Num.94 Json.1216 Json.1217;
let Json.1212 : List U8 = CallByName List.68 Json.1215;
let Json.1214 : U8 = 34i64;
let Json.1213 : List U8 = Array [Json.1214];
let Json.1211 : List U8 = CallByName List.8 Json.1212 Json.1213;
let Json.213 : List U8 = CallByName List.8 Json.1211 Json.210;
let Json.1194 : {} = Struct {};
let Json.1191 : List U8 = CallByName List.18 Json.212 Json.213 Json.1194;
let Json.1193 : U8 = 34i64;
let Json.1192 : List U8 = Array [Json.1193];
let Json.1190 : List U8 = CallByName List.8 Json.1191 Json.1192;
ret Json.1190;
procedure Json.26 (Json.217):
switch Json.217:
case 34:
let Json.1197 : List U8 = Array [92i64, 34i64];
ret Json.1197;
case 92:
let Json.1198 : List U8 = Array [92i64, 92i64];
ret Json.1198;
case 47:
let Json.1199 : List U8 = Array [92i64, 47i64];
ret Json.1199;
case 8:
let Json.1201 : U8 = 98i64;
let Json.1200 : List U8 = Array [92i64, Json.1201];
ret Json.1200;
case 12:
let Json.1203 : U8 = 102i64;
let Json.1202 : List U8 = Array [92i64, Json.1203];
ret Json.1202;
case 10:
let Json.1205 : U8 = 110i64;
let Json.1204 : List U8 = Array [92i64, Json.1205];
ret Json.1204;
case 13:
let Json.1207 : U8 = 114i64;
let Json.1206 : List U8 = Array [92i64, Json.1207];
ret Json.1206;
case 9:
let Json.1209 : U8 = 114i64;
let Json.1208 : List U8 = Array [92i64, Json.1209];
ret Json.1208;
default:
let Json.1210 : List U8 = Array [Json.217];
ret Json.1210;
procedure List.145 (List.146, List.147, List.144):
let List.553 : List U8 = CallByName Json.214 List.146 List.147;
let List.553 : List U8 = CallByName TotallyNotJson.215 List.146 List.147;
ret List.553;
procedure List.18 (List.142, List.143, List.144):
@ -278,7 +108,7 @@ procedure List.80 (List.621, List.622, List.623, List.624, List.625):
let List.581 : Int1 = CallByName Num.22 List.442 List.443;
if List.581 then
let List.590 : U8 = CallByName List.66 List.439 List.442;
let List.582 : [C {U64, Int1}, C {U64, Int1}] = CallByName Json.188 List.440 List.590;
let List.582 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.440 List.590;
let List.587 : U8 = 1i64;
let List.588 : U8 = GetTagId List.582;
let List.589 : Int1 = lowlevel Eq List.587 List.588;
@ -361,9 +191,179 @@ procedure Str.9 (Str.79):
let Str.298 : [C {U64, U8}, C Str] = TagId(0) Str.299;
ret Str.298;
procedure TotallyNotJson.182 (TotallyNotJson.183, TotallyNotJson.1175, TotallyNotJson.181):
let TotallyNotJson.1178 : List U8 = CallByName TotallyNotJson.26 TotallyNotJson.181;
let TotallyNotJson.1177 : List U8 = CallByName List.8 TotallyNotJson.183 TotallyNotJson.1178;
ret TotallyNotJson.1177;
procedure TotallyNotJson.189 (TotallyNotJson.1226, TotallyNotJson.192):
let TotallyNotJson.190 : U64 = StructAtIndex 0 TotallyNotJson.1226;
let TotallyNotJson.191 : Int1 = StructAtIndex 1 TotallyNotJson.1226;
switch TotallyNotJson.192:
case 34:
let TotallyNotJson.1229 : Int1 = false;
let TotallyNotJson.1228 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1229};
let TotallyNotJson.1227 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1228;
ret TotallyNotJson.1227;
case 92:
let TotallyNotJson.1232 : Int1 = false;
let TotallyNotJson.1231 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1232};
let TotallyNotJson.1230 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1231;
ret TotallyNotJson.1230;
case 47:
let TotallyNotJson.1235 : Int1 = false;
let TotallyNotJson.1234 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1235};
let TotallyNotJson.1233 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1234;
ret TotallyNotJson.1233;
case 8:
let TotallyNotJson.1238 : Int1 = false;
let TotallyNotJson.1237 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1238};
let TotallyNotJson.1236 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1237;
ret TotallyNotJson.1236;
case 12:
let TotallyNotJson.1241 : Int1 = false;
let TotallyNotJson.1240 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1241};
let TotallyNotJson.1239 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1240;
ret TotallyNotJson.1239;
case 10:
let TotallyNotJson.1244 : Int1 = false;
let TotallyNotJson.1243 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1244};
let TotallyNotJson.1242 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1243;
ret TotallyNotJson.1242;
case 13:
let TotallyNotJson.1247 : Int1 = false;
let TotallyNotJson.1246 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1247};
let TotallyNotJson.1245 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1246;
ret TotallyNotJson.1245;
case 9:
let TotallyNotJson.1250 : Int1 = false;
let TotallyNotJson.1249 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1250};
let TotallyNotJson.1248 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1249;
ret TotallyNotJson.1248;
default:
let TotallyNotJson.1254 : U64 = 1i64;
let TotallyNotJson.1253 : U64 = CallByName Num.19 TotallyNotJson.190 TotallyNotJson.1254;
let TotallyNotJson.1252 : {U64, Int1} = Struct {TotallyNotJson.1253, TotallyNotJson.191};
let TotallyNotJson.1251 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) TotallyNotJson.1252;
ret TotallyNotJson.1251;
procedure TotallyNotJson.2 ():
let TotallyNotJson.1172 : [C , C [], C , C , C , C ] = TagId(2) ;
ret TotallyNotJson.1172;
procedure TotallyNotJson.215 (TotallyNotJson.216, TotallyNotJson.217):
let TotallyNotJson.1197 : List U8 = CallByName TotallyNotJson.27 TotallyNotJson.217;
let TotallyNotJson.1196 : List U8 = CallByName List.8 TotallyNotJson.216 TotallyNotJson.1197;
ret TotallyNotJson.1196;
procedure TotallyNotJson.25 (TotallyNotJson.181):
let TotallyNotJson.1173 : Str = CallByName Encode.23 TotallyNotJson.181;
ret TotallyNotJson.1173;
procedure TotallyNotJson.26 (TotallyNotJson.184):
let TotallyNotJson.185 : List U8 = CallByName Str.12 TotallyNotJson.184;
let TotallyNotJson.1255 : U64 = 0i64;
let TotallyNotJson.1256 : Int1 = true;
let TotallyNotJson.186 : {U64, Int1} = Struct {TotallyNotJson.1255, TotallyNotJson.1256};
let TotallyNotJson.1225 : {} = Struct {};
inc TotallyNotJson.185;
let TotallyNotJson.187 : {U64, Int1} = CallByName List.26 TotallyNotJson.185 TotallyNotJson.186 TotallyNotJson.1225;
let TotallyNotJson.1179 : Int1 = StructAtIndex 1 TotallyNotJson.187;
let TotallyNotJson.1223 : Int1 = true;
let TotallyNotJson.1224 : Int1 = lowlevel Eq TotallyNotJson.1223 TotallyNotJson.1179;
if TotallyNotJson.1224 then
let TotallyNotJson.1189 : U64 = CallByName List.6 TotallyNotJson.185;
let TotallyNotJson.1190 : U64 = 2i64;
let TotallyNotJson.1188 : U64 = CallByName Num.19 TotallyNotJson.1189 TotallyNotJson.1190;
let TotallyNotJson.1185 : List U8 = CallByName List.68 TotallyNotJson.1188;
let TotallyNotJson.1187 : U8 = 34i64;
let TotallyNotJson.1186 : List U8 = Array [TotallyNotJson.1187];
let TotallyNotJson.1184 : List U8 = CallByName List.8 TotallyNotJson.1185 TotallyNotJson.1186;
let TotallyNotJson.1181 : List U8 = CallByName List.8 TotallyNotJson.1184 TotallyNotJson.185;
let TotallyNotJson.1183 : U8 = 34i64;
let TotallyNotJson.1182 : List U8 = Array [TotallyNotJson.1183];
let TotallyNotJson.1180 : List U8 = CallByName List.8 TotallyNotJson.1181 TotallyNotJson.1182;
ret TotallyNotJson.1180;
else
inc TotallyNotJson.185;
let TotallyNotJson.1222 : U64 = StructAtIndex 0 TotallyNotJson.187;
let TotallyNotJson.1221 : {List U8, List U8} = CallByName List.52 TotallyNotJson.185 TotallyNotJson.1222;
let TotallyNotJson.211 : List U8 = StructAtIndex 0 TotallyNotJson.1221;
let TotallyNotJson.213 : List U8 = StructAtIndex 1 TotallyNotJson.1221;
let TotallyNotJson.1219 : U64 = CallByName List.6 TotallyNotJson.185;
dec TotallyNotJson.185;
let TotallyNotJson.1220 : U64 = 120i64;
let TotallyNotJson.1217 : U64 = CallByName Num.21 TotallyNotJson.1219 TotallyNotJson.1220;
let TotallyNotJson.1218 : U64 = 100i64;
let TotallyNotJson.1216 : U64 = CallByName Num.94 TotallyNotJson.1217 TotallyNotJson.1218;
let TotallyNotJson.1213 : List U8 = CallByName List.68 TotallyNotJson.1216;
let TotallyNotJson.1215 : U8 = 34i64;
let TotallyNotJson.1214 : List U8 = Array [TotallyNotJson.1215];
let TotallyNotJson.1212 : List U8 = CallByName List.8 TotallyNotJson.1213 TotallyNotJson.1214;
let TotallyNotJson.214 : List U8 = CallByName List.8 TotallyNotJson.1212 TotallyNotJson.211;
let TotallyNotJson.1195 : {} = Struct {};
let TotallyNotJson.1192 : List U8 = CallByName List.18 TotallyNotJson.213 TotallyNotJson.214 TotallyNotJson.1195;
let TotallyNotJson.1194 : U8 = 34i64;
let TotallyNotJson.1193 : List U8 = Array [TotallyNotJson.1194];
let TotallyNotJson.1191 : List U8 = CallByName List.8 TotallyNotJson.1192 TotallyNotJson.1193;
ret TotallyNotJson.1191;
procedure TotallyNotJson.27 (TotallyNotJson.218):
switch TotallyNotJson.218:
case 34:
let TotallyNotJson.1198 : List U8 = Array [92i64, 34i64];
ret TotallyNotJson.1198;
case 92:
let TotallyNotJson.1199 : List U8 = Array [92i64, 92i64];
ret TotallyNotJson.1199;
case 47:
let TotallyNotJson.1200 : List U8 = Array [92i64, 47i64];
ret TotallyNotJson.1200;
case 8:
let TotallyNotJson.1202 : U8 = 98i64;
let TotallyNotJson.1201 : List U8 = Array [92i64, TotallyNotJson.1202];
ret TotallyNotJson.1201;
case 12:
let TotallyNotJson.1204 : U8 = 102i64;
let TotallyNotJson.1203 : List U8 = Array [92i64, TotallyNotJson.1204];
ret TotallyNotJson.1203;
case 10:
let TotallyNotJson.1206 : U8 = 110i64;
let TotallyNotJson.1205 : List U8 = Array [92i64, TotallyNotJson.1206];
ret TotallyNotJson.1205;
case 13:
let TotallyNotJson.1208 : U8 = 114i64;
let TotallyNotJson.1207 : List U8 = Array [92i64, TotallyNotJson.1208];
ret TotallyNotJson.1207;
case 9:
let TotallyNotJson.1210 : U8 = 114i64;
let TotallyNotJson.1209 : List U8 = Array [92i64, TotallyNotJson.1210];
ret TotallyNotJson.1209;
default:
let TotallyNotJson.1211 : List U8 = Array [TotallyNotJson.218];
ret TotallyNotJson.1211;
procedure Test.0 ():
let Test.9 : Str = "abc";
let Test.10 : [C , C [], C , C , C , C ] = CallByName Json.1;
let Test.10 : [C , C [], C , C , C , C ] = CallByName TotallyNotJson.2;
let Test.8 : List U8 = CallByName Encode.26 Test.9 Test.10;
let Test.1 : [C {U64, U8}, C Str] = CallByName Str.9 Test.8;
let Test.5 : U8 = 1i64;

View file

@ -8,9 +8,9 @@ procedure #Derived.3 (#Derived.4, #Derived.5, #Derived.1):
ret #Derived_gen.3;
in
let #Derived_gen.7 : Str = "A";
let #Derived_gen.9 : Str = CallByName Json.24 #Derived.1;
let #Derived_gen.9 : Str = CallByName TotallyNotJson.25 #Derived.1;
let #Derived_gen.8 : List Str = Array [#Derived_gen.9];
let #Derived_gen.6 : {Str, List Str} = CallByName Json.31 #Derived_gen.7 #Derived_gen.8;
let #Derived_gen.6 : {Str, List Str} = CallByName TotallyNotJson.32 #Derived_gen.7 #Derived_gen.8;
jump #Derived_gen.5 #Derived_gen.6;
procedure Bool.11 (#Attr.2, #Attr.3):
@ -31,11 +31,11 @@ procedure Encode.24 (Encode.99, Encode.107, Encode.101):
ret Encode.111;
procedure Encode.24 (Encode.99, Encode.107, Encode.101):
let Encode.118 : List U8 = CallByName Json.263 Encode.99 Encode.101 Encode.107;
let Encode.118 : List U8 = CallByName TotallyNotJson.264 Encode.99 Encode.101 Encode.107;
ret Encode.118;
procedure Encode.24 (Encode.99, Encode.107, Encode.101):
let Encode.121 : List U8 = CallByName Json.181 Encode.99 Encode.101 Encode.107;
let Encode.121 : List U8 = CallByName TotallyNotJson.182 Encode.99 Encode.101 Encode.107;
ret Encode.121;
procedure Encode.26 (Encode.105, Encode.106):
@ -44,239 +44,12 @@ procedure Encode.26 (Encode.105, Encode.106):
let Encode.108 : List U8 = CallByName Encode.24 Encode.109 Encode.110 Encode.106;
ret Encode.108;
procedure Json.1 ():
let Json.1171 : [C , C [], C , C , C , C ] = TagId(2) ;
ret Json.1171;
procedure Json.181 (Json.182, Json.1215, Json.180):
let Json.1218 : List U8 = CallByName Json.25 Json.180;
let Json.1217 : List U8 = CallByName List.8 Json.182 Json.1218;
ret Json.1217;
procedure Json.188 (Json.1266, Json.191):
let Json.189 : U64 = StructAtIndex 0 Json.1266;
let Json.190 : Int1 = StructAtIndex 1 Json.1266;
switch Json.191:
case 34:
let Json.1269 : Int1 = false;
let Json.1268 : {U64, Int1} = Struct {Json.189, Json.1269};
let Json.1267 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) Json.1268;
ret Json.1267;
case 92:
let Json.1272 : Int1 = false;
let Json.1271 : {U64, Int1} = Struct {Json.189, Json.1272};
let Json.1270 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) Json.1271;
ret Json.1270;
case 47:
let Json.1275 : Int1 = false;
let Json.1274 : {U64, Int1} = Struct {Json.189, Json.1275};
let Json.1273 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) Json.1274;
ret Json.1273;
case 8:
let Json.1278 : Int1 = false;
let Json.1277 : {U64, Int1} = Struct {Json.189, Json.1278};
let Json.1276 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) Json.1277;
ret Json.1276;
case 12:
let Json.1281 : Int1 = false;
let Json.1280 : {U64, Int1} = Struct {Json.189, Json.1281};
let Json.1279 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) Json.1280;
ret Json.1279;
case 10:
let Json.1284 : Int1 = false;
let Json.1283 : {U64, Int1} = Struct {Json.189, Json.1284};
let Json.1282 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) Json.1283;
ret Json.1282;
case 13:
let Json.1287 : Int1 = false;
let Json.1286 : {U64, Int1} = Struct {Json.189, Json.1287};
let Json.1285 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) Json.1286;
ret Json.1285;
case 9:
let Json.1290 : Int1 = false;
let Json.1289 : {U64, Int1} = Struct {Json.189, Json.1290};
let Json.1288 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) Json.1289;
ret Json.1288;
default:
let Json.1294 : U64 = 1i64;
let Json.1293 : U64 = CallByName Num.19 Json.189 Json.1294;
let Json.1292 : {U64, Int1} = Struct {Json.1293, Json.190};
let Json.1291 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) Json.1292;
ret Json.1291;
procedure Json.214 (Json.215, Json.216):
let Json.1237 : List U8 = CallByName Json.26 Json.216;
let Json.1236 : List U8 = CallByName List.8 Json.215 Json.1237;
ret Json.1236;
procedure Json.24 (Json.180):
let Json.1213 : Str = CallByName Encode.23 Json.180;
ret Json.1213;
procedure Json.25 (Json.183):
let Json.184 : List U8 = CallByName Str.12 Json.183;
let Json.1295 : U64 = 0i64;
let Json.1296 : Int1 = true;
let Json.185 : {U64, Int1} = Struct {Json.1295, Json.1296};
let Json.1265 : {} = Struct {};
inc Json.184;
let Json.186 : {U64, Int1} = CallByName List.26 Json.184 Json.185 Json.1265;
let Json.1219 : Int1 = StructAtIndex 1 Json.186;
let Json.1263 : Int1 = true;
let Json.1264 : Int1 = lowlevel Eq Json.1263 Json.1219;
if Json.1264 then
let Json.1229 : U64 = CallByName List.6 Json.184;
let Json.1230 : U64 = 2i64;
let Json.1228 : U64 = CallByName Num.19 Json.1229 Json.1230;
let Json.1225 : List U8 = CallByName List.68 Json.1228;
let Json.1227 : U8 = 34i64;
let Json.1226 : List U8 = Array [Json.1227];
let Json.1224 : List U8 = CallByName List.8 Json.1225 Json.1226;
let Json.1221 : List U8 = CallByName List.8 Json.1224 Json.184;
let Json.1223 : U8 = 34i64;
let Json.1222 : List U8 = Array [Json.1223];
let Json.1220 : List U8 = CallByName List.8 Json.1221 Json.1222;
ret Json.1220;
else
inc Json.184;
let Json.1262 : U64 = StructAtIndex 0 Json.186;
let Json.1261 : {List U8, List U8} = CallByName List.52 Json.184 Json.1262;
let Json.210 : List U8 = StructAtIndex 0 Json.1261;
let Json.212 : List U8 = StructAtIndex 1 Json.1261;
let Json.1259 : U64 = CallByName List.6 Json.184;
dec Json.184;
let Json.1260 : U64 = 120i64;
let Json.1257 : U64 = CallByName Num.21 Json.1259 Json.1260;
let Json.1258 : U64 = 100i64;
let Json.1256 : U64 = CallByName Num.94 Json.1257 Json.1258;
let Json.1253 : List U8 = CallByName List.68 Json.1256;
let Json.1255 : U8 = 34i64;
let Json.1254 : List U8 = Array [Json.1255];
let Json.1252 : List U8 = CallByName List.8 Json.1253 Json.1254;
let Json.213 : List U8 = CallByName List.8 Json.1252 Json.210;
let Json.1235 : {} = Struct {};
let Json.1232 : List U8 = CallByName List.18 Json.212 Json.213 Json.1235;
let Json.1234 : U8 = 34i64;
let Json.1233 : List U8 = Array [Json.1234];
let Json.1231 : List U8 = CallByName List.8 Json.1232 Json.1233;
ret Json.1231;
procedure Json.26 (Json.217):
switch Json.217:
case 34:
let Json.1238 : List U8 = Array [92i64, 34i64];
ret Json.1238;
case 92:
let Json.1239 : List U8 = Array [92i64, 92i64];
ret Json.1239;
case 47:
let Json.1240 : List U8 = Array [92i64, 47i64];
ret Json.1240;
case 8:
let Json.1242 : U8 = 98i64;
let Json.1241 : List U8 = Array [92i64, Json.1242];
ret Json.1241;
case 12:
let Json.1244 : U8 = 102i64;
let Json.1243 : List U8 = Array [92i64, Json.1244];
ret Json.1243;
case 10:
let Json.1246 : U8 = 110i64;
let Json.1245 : List U8 = Array [92i64, Json.1246];
ret Json.1245;
case 13:
let Json.1248 : U8 = 114i64;
let Json.1247 : List U8 = Array [92i64, Json.1248];
ret Json.1247;
case 9:
let Json.1250 : U8 = 114i64;
let Json.1249 : List U8 = Array [92i64, Json.1250];
ret Json.1249;
default:
let Json.1251 : List U8 = Array [Json.217];
ret Json.1251;
procedure Json.263 (Json.264, Json.1174, #Attr.12):
let Json.262 : List Str = StructAtIndex 1 #Attr.12;
let Json.261 : Str = StructAtIndex 0 #Attr.12;
let Json.1212 : I64 = 123i64;
let Json.1211 : U8 = CallByName Num.127 Json.1212;
let Json.1208 : List U8 = CallByName List.4 Json.264 Json.1211;
let Json.1210 : I64 = 34i64;
let Json.1209 : U8 = CallByName Num.127 Json.1210;
let Json.1206 : List U8 = CallByName List.4 Json.1208 Json.1209;
let Json.1207 : List U8 = CallByName Str.12 Json.261;
let Json.1203 : List U8 = CallByName List.8 Json.1206 Json.1207;
let Json.1205 : I64 = 34i64;
let Json.1204 : U8 = CallByName Num.127 Json.1205;
let Json.1200 : List U8 = CallByName List.4 Json.1203 Json.1204;
let Json.1202 : I64 = 58i64;
let Json.1201 : U8 = CallByName Num.127 Json.1202;
let Json.1197 : List U8 = CallByName List.4 Json.1200 Json.1201;
let Json.1199 : I64 = 91i64;
let Json.1198 : U8 = CallByName Num.127 Json.1199;
let Json.267 : List U8 = CallByName List.4 Json.1197 Json.1198;
let Json.1196 : U64 = CallByName List.6 Json.262;
let Json.1184 : {List U8, U64} = Struct {Json.267, Json.1196};
let Json.1183 : {List U8, U64} = CallByName List.18 Json.262 Json.1184 Json.1174;
let Json.269 : List U8 = StructAtIndex 0 Json.1183;
let Json.1182 : I64 = 93i64;
let Json.1181 : U8 = CallByName Num.127 Json.1182;
let Json.1178 : List U8 = CallByName List.4 Json.269 Json.1181;
let Json.1180 : I64 = 125i64;
let Json.1179 : U8 = CallByName Num.127 Json.1180;
let Json.1177 : List U8 = CallByName List.4 Json.1178 Json.1179;
ret Json.1177;
procedure Json.266 (Json.1176, Json.272, Json.265):
let Json.270 : List U8 = StructAtIndex 0 Json.1176;
let Json.271 : U64 = StructAtIndex 1 Json.1176;
let Json.273 : List U8 = CallByName Encode.24 Json.270 Json.272 Json.265;
joinpoint Json.1190 Json.274:
let Json.1188 : U64 = 1i64;
let Json.1187 : U64 = CallByName Num.20 Json.271 Json.1188;
let Json.1186 : {List U8, U64} = Struct {Json.274, Json.1187};
ret Json.1186;
in
let Json.1194 : U64 = 1i64;
let Json.1191 : Int1 = CallByName Num.24 Json.271 Json.1194;
if Json.1191 then
let Json.1193 : I64 = 44i64;
let Json.1192 : U8 = CallByName Num.127 Json.1193;
let Json.1189 : List U8 = CallByName List.4 Json.273 Json.1192;
jump Json.1190 Json.1189;
else
jump Json.1190 Json.273;
procedure Json.31 (Json.261, Json.262):
let Json.1173 : {Str, List Str} = Struct {Json.261, Json.262};
let Json.1172 : {Str, List Str} = CallByName Encode.23 Json.1173;
ret Json.1172;
procedure List.145 (List.146, List.147, List.144):
let List.568 : {List U8, U64} = CallByName Json.266 List.146 List.147 List.144;
let List.568 : {List U8, U64} = CallByName TotallyNotJson.267 List.146 List.147 List.144;
ret List.568;
procedure List.145 (List.146, List.147, List.144):
let List.588 : List U8 = CallByName Json.214 List.146 List.147;
let List.588 : List U8 = CallByName TotallyNotJson.215 List.146 List.147;
ret List.588;
procedure List.18 (List.142, List.143, List.144):
@ -410,7 +183,7 @@ procedure List.80 (List.693, List.694, List.695, List.696, List.697):
let List.630 : Int1 = CallByName Num.22 List.442 List.443;
if List.630 then
let List.639 : U8 = CallByName List.66 List.439 List.442;
let List.631 : [C {U64, Int1}, C {U64, Int1}] = CallByName Json.188 List.440 List.639;
let List.631 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.440 List.639;
let List.636 : U8 = 1i64;
let List.637 : U8 = GetTagId List.631;
let List.638 : Int1 = lowlevel Eq List.636 List.637;
@ -503,9 +276,236 @@ procedure Str.9 (Str.79):
let Str.298 : [C {U64, U8}, C Str] = TagId(0) Str.299;
ret Str.298;
procedure TotallyNotJson.182 (TotallyNotJson.183, TotallyNotJson.1216, TotallyNotJson.181):
let TotallyNotJson.1219 : List U8 = CallByName TotallyNotJson.26 TotallyNotJson.181;
let TotallyNotJson.1218 : List U8 = CallByName List.8 TotallyNotJson.183 TotallyNotJson.1219;
ret TotallyNotJson.1218;
procedure TotallyNotJson.189 (TotallyNotJson.1267, TotallyNotJson.192):
let TotallyNotJson.190 : U64 = StructAtIndex 0 TotallyNotJson.1267;
let TotallyNotJson.191 : Int1 = StructAtIndex 1 TotallyNotJson.1267;
switch TotallyNotJson.192:
case 34:
let TotallyNotJson.1270 : Int1 = false;
let TotallyNotJson.1269 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1270};
let TotallyNotJson.1268 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1269;
ret TotallyNotJson.1268;
case 92:
let TotallyNotJson.1273 : Int1 = false;
let TotallyNotJson.1272 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1273};
let TotallyNotJson.1271 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1272;
ret TotallyNotJson.1271;
case 47:
let TotallyNotJson.1276 : Int1 = false;
let TotallyNotJson.1275 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1276};
let TotallyNotJson.1274 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1275;
ret TotallyNotJson.1274;
case 8:
let TotallyNotJson.1279 : Int1 = false;
let TotallyNotJson.1278 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1279};
let TotallyNotJson.1277 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1278;
ret TotallyNotJson.1277;
case 12:
let TotallyNotJson.1282 : Int1 = false;
let TotallyNotJson.1281 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1282};
let TotallyNotJson.1280 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1281;
ret TotallyNotJson.1280;
case 10:
let TotallyNotJson.1285 : Int1 = false;
let TotallyNotJson.1284 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1285};
let TotallyNotJson.1283 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1284;
ret TotallyNotJson.1283;
case 13:
let TotallyNotJson.1288 : Int1 = false;
let TotallyNotJson.1287 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1288};
let TotallyNotJson.1286 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1287;
ret TotallyNotJson.1286;
case 9:
let TotallyNotJson.1291 : Int1 = false;
let TotallyNotJson.1290 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1291};
let TotallyNotJson.1289 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1290;
ret TotallyNotJson.1289;
default:
let TotallyNotJson.1295 : U64 = 1i64;
let TotallyNotJson.1294 : U64 = CallByName Num.19 TotallyNotJson.190 TotallyNotJson.1295;
let TotallyNotJson.1293 : {U64, Int1} = Struct {TotallyNotJson.1294, TotallyNotJson.191};
let TotallyNotJson.1292 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) TotallyNotJson.1293;
ret TotallyNotJson.1292;
procedure TotallyNotJson.2 ():
let TotallyNotJson.1172 : [C , C [], C , C , C , C ] = TagId(2) ;
ret TotallyNotJson.1172;
procedure TotallyNotJson.215 (TotallyNotJson.216, TotallyNotJson.217):
let TotallyNotJson.1238 : List U8 = CallByName TotallyNotJson.27 TotallyNotJson.217;
let TotallyNotJson.1237 : List U8 = CallByName List.8 TotallyNotJson.216 TotallyNotJson.1238;
ret TotallyNotJson.1237;
procedure TotallyNotJson.25 (TotallyNotJson.181):
let TotallyNotJson.1214 : Str = CallByName Encode.23 TotallyNotJson.181;
ret TotallyNotJson.1214;
procedure TotallyNotJson.26 (TotallyNotJson.184):
let TotallyNotJson.185 : List U8 = CallByName Str.12 TotallyNotJson.184;
let TotallyNotJson.1296 : U64 = 0i64;
let TotallyNotJson.1297 : Int1 = true;
let TotallyNotJson.186 : {U64, Int1} = Struct {TotallyNotJson.1296, TotallyNotJson.1297};
let TotallyNotJson.1266 : {} = Struct {};
inc TotallyNotJson.185;
let TotallyNotJson.187 : {U64, Int1} = CallByName List.26 TotallyNotJson.185 TotallyNotJson.186 TotallyNotJson.1266;
let TotallyNotJson.1220 : Int1 = StructAtIndex 1 TotallyNotJson.187;
let TotallyNotJson.1264 : Int1 = true;
let TotallyNotJson.1265 : Int1 = lowlevel Eq TotallyNotJson.1264 TotallyNotJson.1220;
if TotallyNotJson.1265 then
let TotallyNotJson.1230 : U64 = CallByName List.6 TotallyNotJson.185;
let TotallyNotJson.1231 : U64 = 2i64;
let TotallyNotJson.1229 : U64 = CallByName Num.19 TotallyNotJson.1230 TotallyNotJson.1231;
let TotallyNotJson.1226 : List U8 = CallByName List.68 TotallyNotJson.1229;
let TotallyNotJson.1228 : U8 = 34i64;
let TotallyNotJson.1227 : List U8 = Array [TotallyNotJson.1228];
let TotallyNotJson.1225 : List U8 = CallByName List.8 TotallyNotJson.1226 TotallyNotJson.1227;
let TotallyNotJson.1222 : List U8 = CallByName List.8 TotallyNotJson.1225 TotallyNotJson.185;
let TotallyNotJson.1224 : U8 = 34i64;
let TotallyNotJson.1223 : List U8 = Array [TotallyNotJson.1224];
let TotallyNotJson.1221 : List U8 = CallByName List.8 TotallyNotJson.1222 TotallyNotJson.1223;
ret TotallyNotJson.1221;
else
inc TotallyNotJson.185;
let TotallyNotJson.1263 : U64 = StructAtIndex 0 TotallyNotJson.187;
let TotallyNotJson.1262 : {List U8, List U8} = CallByName List.52 TotallyNotJson.185 TotallyNotJson.1263;
let TotallyNotJson.211 : List U8 = StructAtIndex 0 TotallyNotJson.1262;
let TotallyNotJson.213 : List U8 = StructAtIndex 1 TotallyNotJson.1262;
let TotallyNotJson.1260 : U64 = CallByName List.6 TotallyNotJson.185;
dec TotallyNotJson.185;
let TotallyNotJson.1261 : U64 = 120i64;
let TotallyNotJson.1258 : U64 = CallByName Num.21 TotallyNotJson.1260 TotallyNotJson.1261;
let TotallyNotJson.1259 : U64 = 100i64;
let TotallyNotJson.1257 : U64 = CallByName Num.94 TotallyNotJson.1258 TotallyNotJson.1259;
let TotallyNotJson.1254 : List U8 = CallByName List.68 TotallyNotJson.1257;
let TotallyNotJson.1256 : U8 = 34i64;
let TotallyNotJson.1255 : List U8 = Array [TotallyNotJson.1256];
let TotallyNotJson.1253 : List U8 = CallByName List.8 TotallyNotJson.1254 TotallyNotJson.1255;
let TotallyNotJson.214 : List U8 = CallByName List.8 TotallyNotJson.1253 TotallyNotJson.211;
let TotallyNotJson.1236 : {} = Struct {};
let TotallyNotJson.1233 : List U8 = CallByName List.18 TotallyNotJson.213 TotallyNotJson.214 TotallyNotJson.1236;
let TotallyNotJson.1235 : U8 = 34i64;
let TotallyNotJson.1234 : List U8 = Array [TotallyNotJson.1235];
let TotallyNotJson.1232 : List U8 = CallByName List.8 TotallyNotJson.1233 TotallyNotJson.1234;
ret TotallyNotJson.1232;
procedure TotallyNotJson.264 (TotallyNotJson.265, TotallyNotJson.1175, #Attr.12):
let TotallyNotJson.263 : List Str = StructAtIndex 1 #Attr.12;
let TotallyNotJson.262 : Str = StructAtIndex 0 #Attr.12;
let TotallyNotJson.1213 : I64 = 123i64;
let TotallyNotJson.1212 : U8 = CallByName Num.127 TotallyNotJson.1213;
let TotallyNotJson.1209 : List U8 = CallByName List.4 TotallyNotJson.265 TotallyNotJson.1212;
let TotallyNotJson.1211 : I64 = 34i64;
let TotallyNotJson.1210 : U8 = CallByName Num.127 TotallyNotJson.1211;
let TotallyNotJson.1207 : List U8 = CallByName List.4 TotallyNotJson.1209 TotallyNotJson.1210;
let TotallyNotJson.1208 : List U8 = CallByName Str.12 TotallyNotJson.262;
let TotallyNotJson.1204 : List U8 = CallByName List.8 TotallyNotJson.1207 TotallyNotJson.1208;
let TotallyNotJson.1206 : I64 = 34i64;
let TotallyNotJson.1205 : U8 = CallByName Num.127 TotallyNotJson.1206;
let TotallyNotJson.1201 : List U8 = CallByName List.4 TotallyNotJson.1204 TotallyNotJson.1205;
let TotallyNotJson.1203 : I64 = 58i64;
let TotallyNotJson.1202 : U8 = CallByName Num.127 TotallyNotJson.1203;
let TotallyNotJson.1198 : List U8 = CallByName List.4 TotallyNotJson.1201 TotallyNotJson.1202;
let TotallyNotJson.1200 : I64 = 91i64;
let TotallyNotJson.1199 : U8 = CallByName Num.127 TotallyNotJson.1200;
let TotallyNotJson.268 : List U8 = CallByName List.4 TotallyNotJson.1198 TotallyNotJson.1199;
let TotallyNotJson.1197 : U64 = CallByName List.6 TotallyNotJson.263;
let TotallyNotJson.1185 : {List U8, U64} = Struct {TotallyNotJson.268, TotallyNotJson.1197};
let TotallyNotJson.1184 : {List U8, U64} = CallByName List.18 TotallyNotJson.263 TotallyNotJson.1185 TotallyNotJson.1175;
let TotallyNotJson.270 : List U8 = StructAtIndex 0 TotallyNotJson.1184;
let TotallyNotJson.1183 : I64 = 93i64;
let TotallyNotJson.1182 : U8 = CallByName Num.127 TotallyNotJson.1183;
let TotallyNotJson.1179 : List U8 = CallByName List.4 TotallyNotJson.270 TotallyNotJson.1182;
let TotallyNotJson.1181 : I64 = 125i64;
let TotallyNotJson.1180 : U8 = CallByName Num.127 TotallyNotJson.1181;
let TotallyNotJson.1178 : List U8 = CallByName List.4 TotallyNotJson.1179 TotallyNotJson.1180;
ret TotallyNotJson.1178;
procedure TotallyNotJson.267 (TotallyNotJson.1177, TotallyNotJson.273, TotallyNotJson.266):
let TotallyNotJson.271 : List U8 = StructAtIndex 0 TotallyNotJson.1177;
let TotallyNotJson.272 : U64 = StructAtIndex 1 TotallyNotJson.1177;
let TotallyNotJson.274 : List U8 = CallByName Encode.24 TotallyNotJson.271 TotallyNotJson.273 TotallyNotJson.266;
joinpoint TotallyNotJson.1191 TotallyNotJson.275:
let TotallyNotJson.1189 : U64 = 1i64;
let TotallyNotJson.1188 : U64 = CallByName Num.20 TotallyNotJson.272 TotallyNotJson.1189;
let TotallyNotJson.1187 : {List U8, U64} = Struct {TotallyNotJson.275, TotallyNotJson.1188};
ret TotallyNotJson.1187;
in
let TotallyNotJson.1195 : U64 = 1i64;
let TotallyNotJson.1192 : Int1 = CallByName Num.24 TotallyNotJson.272 TotallyNotJson.1195;
if TotallyNotJson.1192 then
let TotallyNotJson.1194 : I64 = 44i64;
let TotallyNotJson.1193 : U8 = CallByName Num.127 TotallyNotJson.1194;
let TotallyNotJson.1190 : List U8 = CallByName List.4 TotallyNotJson.274 TotallyNotJson.1193;
jump TotallyNotJson.1191 TotallyNotJson.1190;
else
jump TotallyNotJson.1191 TotallyNotJson.274;
procedure TotallyNotJson.27 (TotallyNotJson.218):
switch TotallyNotJson.218:
case 34:
let TotallyNotJson.1239 : List U8 = Array [92i64, 34i64];
ret TotallyNotJson.1239;
case 92:
let TotallyNotJson.1240 : List U8 = Array [92i64, 92i64];
ret TotallyNotJson.1240;
case 47:
let TotallyNotJson.1241 : List U8 = Array [92i64, 47i64];
ret TotallyNotJson.1241;
case 8:
let TotallyNotJson.1243 : U8 = 98i64;
let TotallyNotJson.1242 : List U8 = Array [92i64, TotallyNotJson.1243];
ret TotallyNotJson.1242;
case 12:
let TotallyNotJson.1245 : U8 = 102i64;
let TotallyNotJson.1244 : List U8 = Array [92i64, TotallyNotJson.1245];
ret TotallyNotJson.1244;
case 10:
let TotallyNotJson.1247 : U8 = 110i64;
let TotallyNotJson.1246 : List U8 = Array [92i64, TotallyNotJson.1247];
ret TotallyNotJson.1246;
case 13:
let TotallyNotJson.1249 : U8 = 114i64;
let TotallyNotJson.1248 : List U8 = Array [92i64, TotallyNotJson.1249];
ret TotallyNotJson.1248;
case 9:
let TotallyNotJson.1251 : U8 = 114i64;
let TotallyNotJson.1250 : List U8 = Array [92i64, TotallyNotJson.1251];
ret TotallyNotJson.1250;
default:
let TotallyNotJson.1252 : List U8 = Array [TotallyNotJson.218];
ret TotallyNotJson.1252;
procedure TotallyNotJson.32 (TotallyNotJson.262, TotallyNotJson.263):
let TotallyNotJson.1174 : {Str, List Str} = Struct {TotallyNotJson.262, TotallyNotJson.263};
let TotallyNotJson.1173 : {Str, List Str} = CallByName Encode.23 TotallyNotJson.1174;
ret TotallyNotJson.1173;
procedure Test.0 ():
let Test.12 : Str = "foo";
let Test.11 : [C , C [], C , C , C , C ] = CallByName Json.1;
let Test.11 : [C , C [], C , C , C , C ] = CallByName TotallyNotJson.2;
let Test.10 : List U8 = CallByName Encode.26 Test.12 Test.11;
let Test.2 : [C {U64, U8}, C Str] = CallByName Str.9 Test.10;
let Test.7 : U8 = 1i64;

View file

@ -10,10 +10,10 @@ procedure #Derived.4 (#Derived.5, #Derived.6, #Derived.1):
let #Derived.2 : Str = StructAtIndex 0 #Derived.1;
let #Derived.3 : Str = StructAtIndex 1 #Derived.1;
let #Derived_gen.7 : Str = "A";
let #Derived_gen.9 : Str = CallByName Json.24 #Derived.2;
let #Derived_gen.10 : Str = CallByName Json.24 #Derived.3;
let #Derived_gen.9 : Str = CallByName TotallyNotJson.25 #Derived.2;
let #Derived_gen.10 : Str = CallByName TotallyNotJson.25 #Derived.3;
let #Derived_gen.8 : List Str = Array [#Derived_gen.9, #Derived_gen.10];
let #Derived_gen.6 : {Str, List Str} = CallByName Json.31 #Derived_gen.7 #Derived_gen.8;
let #Derived_gen.6 : {Str, List Str} = CallByName TotallyNotJson.32 #Derived_gen.7 #Derived_gen.8;
jump #Derived_gen.5 #Derived_gen.6;
procedure Bool.11 (#Attr.2, #Attr.3):
@ -34,11 +34,11 @@ procedure Encode.24 (Encode.99, Encode.107, Encode.101):
ret Encode.111;
procedure Encode.24 (Encode.99, Encode.107, Encode.101):
let Encode.118 : List U8 = CallByName Json.263 Encode.99 Encode.101 Encode.107;
let Encode.118 : List U8 = CallByName TotallyNotJson.264 Encode.99 Encode.101 Encode.107;
ret Encode.118;
procedure Encode.24 (Encode.99, Encode.107, Encode.101):
let Encode.122 : List U8 = CallByName Json.181 Encode.99 Encode.101 Encode.107;
let Encode.122 : List U8 = CallByName TotallyNotJson.182 Encode.99 Encode.101 Encode.107;
ret Encode.122;
procedure Encode.26 (Encode.105, Encode.106):
@ -47,239 +47,12 @@ procedure Encode.26 (Encode.105, Encode.106):
let Encode.108 : List U8 = CallByName Encode.24 Encode.109 Encode.110 Encode.106;
ret Encode.108;
procedure Json.1 ():
let Json.1171 : [C , C [], C , C , C , C ] = TagId(2) ;
ret Json.1171;
procedure Json.181 (Json.182, Json.1215, Json.180):
let Json.1218 : List U8 = CallByName Json.25 Json.180;
let Json.1217 : List U8 = CallByName List.8 Json.182 Json.1218;
ret Json.1217;
procedure Json.188 (Json.1266, Json.191):
let Json.189 : U64 = StructAtIndex 0 Json.1266;
let Json.190 : Int1 = StructAtIndex 1 Json.1266;
switch Json.191:
case 34:
let Json.1269 : Int1 = false;
let Json.1268 : {U64, Int1} = Struct {Json.189, Json.1269};
let Json.1267 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) Json.1268;
ret Json.1267;
case 92:
let Json.1272 : Int1 = false;
let Json.1271 : {U64, Int1} = Struct {Json.189, Json.1272};
let Json.1270 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) Json.1271;
ret Json.1270;
case 47:
let Json.1275 : Int1 = false;
let Json.1274 : {U64, Int1} = Struct {Json.189, Json.1275};
let Json.1273 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) Json.1274;
ret Json.1273;
case 8:
let Json.1278 : Int1 = false;
let Json.1277 : {U64, Int1} = Struct {Json.189, Json.1278};
let Json.1276 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) Json.1277;
ret Json.1276;
case 12:
let Json.1281 : Int1 = false;
let Json.1280 : {U64, Int1} = Struct {Json.189, Json.1281};
let Json.1279 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) Json.1280;
ret Json.1279;
case 10:
let Json.1284 : Int1 = false;
let Json.1283 : {U64, Int1} = Struct {Json.189, Json.1284};
let Json.1282 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) Json.1283;
ret Json.1282;
case 13:
let Json.1287 : Int1 = false;
let Json.1286 : {U64, Int1} = Struct {Json.189, Json.1287};
let Json.1285 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) Json.1286;
ret Json.1285;
case 9:
let Json.1290 : Int1 = false;
let Json.1289 : {U64, Int1} = Struct {Json.189, Json.1290};
let Json.1288 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) Json.1289;
ret Json.1288;
default:
let Json.1294 : U64 = 1i64;
let Json.1293 : U64 = CallByName Num.19 Json.189 Json.1294;
let Json.1292 : {U64, Int1} = Struct {Json.1293, Json.190};
let Json.1291 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) Json.1292;
ret Json.1291;
procedure Json.214 (Json.215, Json.216):
let Json.1237 : List U8 = CallByName Json.26 Json.216;
let Json.1236 : List U8 = CallByName List.8 Json.215 Json.1237;
ret Json.1236;
procedure Json.24 (Json.180):
let Json.1297 : Str = CallByName Encode.23 Json.180;
ret Json.1297;
procedure Json.25 (Json.183):
let Json.184 : List U8 = CallByName Str.12 Json.183;
let Json.1295 : U64 = 0i64;
let Json.1296 : Int1 = true;
let Json.185 : {U64, Int1} = Struct {Json.1295, Json.1296};
let Json.1265 : {} = Struct {};
inc Json.184;
let Json.186 : {U64, Int1} = CallByName List.26 Json.184 Json.185 Json.1265;
let Json.1219 : Int1 = StructAtIndex 1 Json.186;
let Json.1263 : Int1 = true;
let Json.1264 : Int1 = lowlevel Eq Json.1263 Json.1219;
if Json.1264 then
let Json.1229 : U64 = CallByName List.6 Json.184;
let Json.1230 : U64 = 2i64;
let Json.1228 : U64 = CallByName Num.19 Json.1229 Json.1230;
let Json.1225 : List U8 = CallByName List.68 Json.1228;
let Json.1227 : U8 = 34i64;
let Json.1226 : List U8 = Array [Json.1227];
let Json.1224 : List U8 = CallByName List.8 Json.1225 Json.1226;
let Json.1221 : List U8 = CallByName List.8 Json.1224 Json.184;
let Json.1223 : U8 = 34i64;
let Json.1222 : List U8 = Array [Json.1223];
let Json.1220 : List U8 = CallByName List.8 Json.1221 Json.1222;
ret Json.1220;
else
inc Json.184;
let Json.1262 : U64 = StructAtIndex 0 Json.186;
let Json.1261 : {List U8, List U8} = CallByName List.52 Json.184 Json.1262;
let Json.210 : List U8 = StructAtIndex 0 Json.1261;
let Json.212 : List U8 = StructAtIndex 1 Json.1261;
let Json.1259 : U64 = CallByName List.6 Json.184;
dec Json.184;
let Json.1260 : U64 = 120i64;
let Json.1257 : U64 = CallByName Num.21 Json.1259 Json.1260;
let Json.1258 : U64 = 100i64;
let Json.1256 : U64 = CallByName Num.94 Json.1257 Json.1258;
let Json.1253 : List U8 = CallByName List.68 Json.1256;
let Json.1255 : U8 = 34i64;
let Json.1254 : List U8 = Array [Json.1255];
let Json.1252 : List U8 = CallByName List.8 Json.1253 Json.1254;
let Json.213 : List U8 = CallByName List.8 Json.1252 Json.210;
let Json.1235 : {} = Struct {};
let Json.1232 : List U8 = CallByName List.18 Json.212 Json.213 Json.1235;
let Json.1234 : U8 = 34i64;
let Json.1233 : List U8 = Array [Json.1234];
let Json.1231 : List U8 = CallByName List.8 Json.1232 Json.1233;
ret Json.1231;
procedure Json.26 (Json.217):
switch Json.217:
case 34:
let Json.1238 : List U8 = Array [92i64, 34i64];
ret Json.1238;
case 92:
let Json.1239 : List U8 = Array [92i64, 92i64];
ret Json.1239;
case 47:
let Json.1240 : List U8 = Array [92i64, 47i64];
ret Json.1240;
case 8:
let Json.1242 : U8 = 98i64;
let Json.1241 : List U8 = Array [92i64, Json.1242];
ret Json.1241;
case 12:
let Json.1244 : U8 = 102i64;
let Json.1243 : List U8 = Array [92i64, Json.1244];
ret Json.1243;
case 10:
let Json.1246 : U8 = 110i64;
let Json.1245 : List U8 = Array [92i64, Json.1246];
ret Json.1245;
case 13:
let Json.1248 : U8 = 114i64;
let Json.1247 : List U8 = Array [92i64, Json.1248];
ret Json.1247;
case 9:
let Json.1250 : U8 = 114i64;
let Json.1249 : List U8 = Array [92i64, Json.1250];
ret Json.1249;
default:
let Json.1251 : List U8 = Array [Json.217];
ret Json.1251;
procedure Json.263 (Json.264, Json.1174, #Attr.12):
let Json.262 : List Str = StructAtIndex 1 #Attr.12;
let Json.261 : Str = StructAtIndex 0 #Attr.12;
let Json.1212 : I64 = 123i64;
let Json.1211 : U8 = CallByName Num.127 Json.1212;
let Json.1208 : List U8 = CallByName List.4 Json.264 Json.1211;
let Json.1210 : I64 = 34i64;
let Json.1209 : U8 = CallByName Num.127 Json.1210;
let Json.1206 : List U8 = CallByName List.4 Json.1208 Json.1209;
let Json.1207 : List U8 = CallByName Str.12 Json.261;
let Json.1203 : List U8 = CallByName List.8 Json.1206 Json.1207;
let Json.1205 : I64 = 34i64;
let Json.1204 : U8 = CallByName Num.127 Json.1205;
let Json.1200 : List U8 = CallByName List.4 Json.1203 Json.1204;
let Json.1202 : I64 = 58i64;
let Json.1201 : U8 = CallByName Num.127 Json.1202;
let Json.1197 : List U8 = CallByName List.4 Json.1200 Json.1201;
let Json.1199 : I64 = 91i64;
let Json.1198 : U8 = CallByName Num.127 Json.1199;
let Json.267 : List U8 = CallByName List.4 Json.1197 Json.1198;
let Json.1196 : U64 = CallByName List.6 Json.262;
let Json.1184 : {List U8, U64} = Struct {Json.267, Json.1196};
let Json.1183 : {List U8, U64} = CallByName List.18 Json.262 Json.1184 Json.1174;
let Json.269 : List U8 = StructAtIndex 0 Json.1183;
let Json.1182 : I64 = 93i64;
let Json.1181 : U8 = CallByName Num.127 Json.1182;
let Json.1178 : List U8 = CallByName List.4 Json.269 Json.1181;
let Json.1180 : I64 = 125i64;
let Json.1179 : U8 = CallByName Num.127 Json.1180;
let Json.1177 : List U8 = CallByName List.4 Json.1178 Json.1179;
ret Json.1177;
procedure Json.266 (Json.1176, Json.272, Json.265):
let Json.270 : List U8 = StructAtIndex 0 Json.1176;
let Json.271 : U64 = StructAtIndex 1 Json.1176;
let Json.273 : List U8 = CallByName Encode.24 Json.270 Json.272 Json.265;
joinpoint Json.1190 Json.274:
let Json.1188 : U64 = 1i64;
let Json.1187 : U64 = CallByName Num.20 Json.271 Json.1188;
let Json.1186 : {List U8, U64} = Struct {Json.274, Json.1187};
ret Json.1186;
in
let Json.1194 : U64 = 1i64;
let Json.1191 : Int1 = CallByName Num.24 Json.271 Json.1194;
if Json.1191 then
let Json.1193 : I64 = 44i64;
let Json.1192 : U8 = CallByName Num.127 Json.1193;
let Json.1189 : List U8 = CallByName List.4 Json.273 Json.1192;
jump Json.1190 Json.1189;
else
jump Json.1190 Json.273;
procedure Json.31 (Json.261, Json.262):
let Json.1173 : {Str, List Str} = Struct {Json.261, Json.262};
let Json.1172 : {Str, List Str} = CallByName Encode.23 Json.1173;
ret Json.1172;
procedure List.145 (List.146, List.147, List.144):
let List.568 : {List U8, U64} = CallByName Json.266 List.146 List.147 List.144;
let List.568 : {List U8, U64} = CallByName TotallyNotJson.267 List.146 List.147 List.144;
ret List.568;
procedure List.145 (List.146, List.147, List.144):
let List.588 : List U8 = CallByName Json.214 List.146 List.147;
let List.588 : List U8 = CallByName TotallyNotJson.215 List.146 List.147;
ret List.588;
procedure List.18 (List.142, List.143, List.144):
@ -413,7 +186,7 @@ procedure List.80 (List.693, List.694, List.695, List.696, List.697):
let List.630 : Int1 = CallByName Num.22 List.442 List.443;
if List.630 then
let List.639 : U8 = CallByName List.66 List.439 List.442;
let List.631 : [C {U64, Int1}, C {U64, Int1}] = CallByName Json.188 List.440 List.639;
let List.631 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.440 List.639;
let List.636 : U8 = 1i64;
let List.637 : U8 = GetTagId List.631;
let List.638 : Int1 = lowlevel Eq List.636 List.637;
@ -506,11 +279,238 @@ procedure Str.9 (Str.79):
let Str.298 : [C {U64, U8}, C Str] = TagId(0) Str.299;
ret Str.298;
procedure TotallyNotJson.182 (TotallyNotJson.183, TotallyNotJson.1216, TotallyNotJson.181):
let TotallyNotJson.1219 : List U8 = CallByName TotallyNotJson.26 TotallyNotJson.181;
let TotallyNotJson.1218 : List U8 = CallByName List.8 TotallyNotJson.183 TotallyNotJson.1219;
ret TotallyNotJson.1218;
procedure TotallyNotJson.189 (TotallyNotJson.1267, TotallyNotJson.192):
let TotallyNotJson.190 : U64 = StructAtIndex 0 TotallyNotJson.1267;
let TotallyNotJson.191 : Int1 = StructAtIndex 1 TotallyNotJson.1267;
switch TotallyNotJson.192:
case 34:
let TotallyNotJson.1270 : Int1 = false;
let TotallyNotJson.1269 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1270};
let TotallyNotJson.1268 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1269;
ret TotallyNotJson.1268;
case 92:
let TotallyNotJson.1273 : Int1 = false;
let TotallyNotJson.1272 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1273};
let TotallyNotJson.1271 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1272;
ret TotallyNotJson.1271;
case 47:
let TotallyNotJson.1276 : Int1 = false;
let TotallyNotJson.1275 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1276};
let TotallyNotJson.1274 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1275;
ret TotallyNotJson.1274;
case 8:
let TotallyNotJson.1279 : Int1 = false;
let TotallyNotJson.1278 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1279};
let TotallyNotJson.1277 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1278;
ret TotallyNotJson.1277;
case 12:
let TotallyNotJson.1282 : Int1 = false;
let TotallyNotJson.1281 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1282};
let TotallyNotJson.1280 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1281;
ret TotallyNotJson.1280;
case 10:
let TotallyNotJson.1285 : Int1 = false;
let TotallyNotJson.1284 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1285};
let TotallyNotJson.1283 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1284;
ret TotallyNotJson.1283;
case 13:
let TotallyNotJson.1288 : Int1 = false;
let TotallyNotJson.1287 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1288};
let TotallyNotJson.1286 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1287;
ret TotallyNotJson.1286;
case 9:
let TotallyNotJson.1291 : Int1 = false;
let TotallyNotJson.1290 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1291};
let TotallyNotJson.1289 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1290;
ret TotallyNotJson.1289;
default:
let TotallyNotJson.1295 : U64 = 1i64;
let TotallyNotJson.1294 : U64 = CallByName Num.19 TotallyNotJson.190 TotallyNotJson.1295;
let TotallyNotJson.1293 : {U64, Int1} = Struct {TotallyNotJson.1294, TotallyNotJson.191};
let TotallyNotJson.1292 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) TotallyNotJson.1293;
ret TotallyNotJson.1292;
procedure TotallyNotJson.2 ():
let TotallyNotJson.1172 : [C , C [], C , C , C , C ] = TagId(2) ;
ret TotallyNotJson.1172;
procedure TotallyNotJson.215 (TotallyNotJson.216, TotallyNotJson.217):
let TotallyNotJson.1238 : List U8 = CallByName TotallyNotJson.27 TotallyNotJson.217;
let TotallyNotJson.1237 : List U8 = CallByName List.8 TotallyNotJson.216 TotallyNotJson.1238;
ret TotallyNotJson.1237;
procedure TotallyNotJson.25 (TotallyNotJson.181):
let TotallyNotJson.1298 : Str = CallByName Encode.23 TotallyNotJson.181;
ret TotallyNotJson.1298;
procedure TotallyNotJson.26 (TotallyNotJson.184):
let TotallyNotJson.185 : List U8 = CallByName Str.12 TotallyNotJson.184;
let TotallyNotJson.1296 : U64 = 0i64;
let TotallyNotJson.1297 : Int1 = true;
let TotallyNotJson.186 : {U64, Int1} = Struct {TotallyNotJson.1296, TotallyNotJson.1297};
let TotallyNotJson.1266 : {} = Struct {};
inc TotallyNotJson.185;
let TotallyNotJson.187 : {U64, Int1} = CallByName List.26 TotallyNotJson.185 TotallyNotJson.186 TotallyNotJson.1266;
let TotallyNotJson.1220 : Int1 = StructAtIndex 1 TotallyNotJson.187;
let TotallyNotJson.1264 : Int1 = true;
let TotallyNotJson.1265 : Int1 = lowlevel Eq TotallyNotJson.1264 TotallyNotJson.1220;
if TotallyNotJson.1265 then
let TotallyNotJson.1230 : U64 = CallByName List.6 TotallyNotJson.185;
let TotallyNotJson.1231 : U64 = 2i64;
let TotallyNotJson.1229 : U64 = CallByName Num.19 TotallyNotJson.1230 TotallyNotJson.1231;
let TotallyNotJson.1226 : List U8 = CallByName List.68 TotallyNotJson.1229;
let TotallyNotJson.1228 : U8 = 34i64;
let TotallyNotJson.1227 : List U8 = Array [TotallyNotJson.1228];
let TotallyNotJson.1225 : List U8 = CallByName List.8 TotallyNotJson.1226 TotallyNotJson.1227;
let TotallyNotJson.1222 : List U8 = CallByName List.8 TotallyNotJson.1225 TotallyNotJson.185;
let TotallyNotJson.1224 : U8 = 34i64;
let TotallyNotJson.1223 : List U8 = Array [TotallyNotJson.1224];
let TotallyNotJson.1221 : List U8 = CallByName List.8 TotallyNotJson.1222 TotallyNotJson.1223;
ret TotallyNotJson.1221;
else
inc TotallyNotJson.185;
let TotallyNotJson.1263 : U64 = StructAtIndex 0 TotallyNotJson.187;
let TotallyNotJson.1262 : {List U8, List U8} = CallByName List.52 TotallyNotJson.185 TotallyNotJson.1263;
let TotallyNotJson.211 : List U8 = StructAtIndex 0 TotallyNotJson.1262;
let TotallyNotJson.213 : List U8 = StructAtIndex 1 TotallyNotJson.1262;
let TotallyNotJson.1260 : U64 = CallByName List.6 TotallyNotJson.185;
dec TotallyNotJson.185;
let TotallyNotJson.1261 : U64 = 120i64;
let TotallyNotJson.1258 : U64 = CallByName Num.21 TotallyNotJson.1260 TotallyNotJson.1261;
let TotallyNotJson.1259 : U64 = 100i64;
let TotallyNotJson.1257 : U64 = CallByName Num.94 TotallyNotJson.1258 TotallyNotJson.1259;
let TotallyNotJson.1254 : List U8 = CallByName List.68 TotallyNotJson.1257;
let TotallyNotJson.1256 : U8 = 34i64;
let TotallyNotJson.1255 : List U8 = Array [TotallyNotJson.1256];
let TotallyNotJson.1253 : List U8 = CallByName List.8 TotallyNotJson.1254 TotallyNotJson.1255;
let TotallyNotJson.214 : List U8 = CallByName List.8 TotallyNotJson.1253 TotallyNotJson.211;
let TotallyNotJson.1236 : {} = Struct {};
let TotallyNotJson.1233 : List U8 = CallByName List.18 TotallyNotJson.213 TotallyNotJson.214 TotallyNotJson.1236;
let TotallyNotJson.1235 : U8 = 34i64;
let TotallyNotJson.1234 : List U8 = Array [TotallyNotJson.1235];
let TotallyNotJson.1232 : List U8 = CallByName List.8 TotallyNotJson.1233 TotallyNotJson.1234;
ret TotallyNotJson.1232;
procedure TotallyNotJson.264 (TotallyNotJson.265, TotallyNotJson.1175, #Attr.12):
let TotallyNotJson.263 : List Str = StructAtIndex 1 #Attr.12;
let TotallyNotJson.262 : Str = StructAtIndex 0 #Attr.12;
let TotallyNotJson.1213 : I64 = 123i64;
let TotallyNotJson.1212 : U8 = CallByName Num.127 TotallyNotJson.1213;
let TotallyNotJson.1209 : List U8 = CallByName List.4 TotallyNotJson.265 TotallyNotJson.1212;
let TotallyNotJson.1211 : I64 = 34i64;
let TotallyNotJson.1210 : U8 = CallByName Num.127 TotallyNotJson.1211;
let TotallyNotJson.1207 : List U8 = CallByName List.4 TotallyNotJson.1209 TotallyNotJson.1210;
let TotallyNotJson.1208 : List U8 = CallByName Str.12 TotallyNotJson.262;
let TotallyNotJson.1204 : List U8 = CallByName List.8 TotallyNotJson.1207 TotallyNotJson.1208;
let TotallyNotJson.1206 : I64 = 34i64;
let TotallyNotJson.1205 : U8 = CallByName Num.127 TotallyNotJson.1206;
let TotallyNotJson.1201 : List U8 = CallByName List.4 TotallyNotJson.1204 TotallyNotJson.1205;
let TotallyNotJson.1203 : I64 = 58i64;
let TotallyNotJson.1202 : U8 = CallByName Num.127 TotallyNotJson.1203;
let TotallyNotJson.1198 : List U8 = CallByName List.4 TotallyNotJson.1201 TotallyNotJson.1202;
let TotallyNotJson.1200 : I64 = 91i64;
let TotallyNotJson.1199 : U8 = CallByName Num.127 TotallyNotJson.1200;
let TotallyNotJson.268 : List U8 = CallByName List.4 TotallyNotJson.1198 TotallyNotJson.1199;
let TotallyNotJson.1197 : U64 = CallByName List.6 TotallyNotJson.263;
let TotallyNotJson.1185 : {List U8, U64} = Struct {TotallyNotJson.268, TotallyNotJson.1197};
let TotallyNotJson.1184 : {List U8, U64} = CallByName List.18 TotallyNotJson.263 TotallyNotJson.1185 TotallyNotJson.1175;
let TotallyNotJson.270 : List U8 = StructAtIndex 0 TotallyNotJson.1184;
let TotallyNotJson.1183 : I64 = 93i64;
let TotallyNotJson.1182 : U8 = CallByName Num.127 TotallyNotJson.1183;
let TotallyNotJson.1179 : List U8 = CallByName List.4 TotallyNotJson.270 TotallyNotJson.1182;
let TotallyNotJson.1181 : I64 = 125i64;
let TotallyNotJson.1180 : U8 = CallByName Num.127 TotallyNotJson.1181;
let TotallyNotJson.1178 : List U8 = CallByName List.4 TotallyNotJson.1179 TotallyNotJson.1180;
ret TotallyNotJson.1178;
procedure TotallyNotJson.267 (TotallyNotJson.1177, TotallyNotJson.273, TotallyNotJson.266):
let TotallyNotJson.271 : List U8 = StructAtIndex 0 TotallyNotJson.1177;
let TotallyNotJson.272 : U64 = StructAtIndex 1 TotallyNotJson.1177;
let TotallyNotJson.274 : List U8 = CallByName Encode.24 TotallyNotJson.271 TotallyNotJson.273 TotallyNotJson.266;
joinpoint TotallyNotJson.1191 TotallyNotJson.275:
let TotallyNotJson.1189 : U64 = 1i64;
let TotallyNotJson.1188 : U64 = CallByName Num.20 TotallyNotJson.272 TotallyNotJson.1189;
let TotallyNotJson.1187 : {List U8, U64} = Struct {TotallyNotJson.275, TotallyNotJson.1188};
ret TotallyNotJson.1187;
in
let TotallyNotJson.1195 : U64 = 1i64;
let TotallyNotJson.1192 : Int1 = CallByName Num.24 TotallyNotJson.272 TotallyNotJson.1195;
if TotallyNotJson.1192 then
let TotallyNotJson.1194 : I64 = 44i64;
let TotallyNotJson.1193 : U8 = CallByName Num.127 TotallyNotJson.1194;
let TotallyNotJson.1190 : List U8 = CallByName List.4 TotallyNotJson.274 TotallyNotJson.1193;
jump TotallyNotJson.1191 TotallyNotJson.1190;
else
jump TotallyNotJson.1191 TotallyNotJson.274;
procedure TotallyNotJson.27 (TotallyNotJson.218):
switch TotallyNotJson.218:
case 34:
let TotallyNotJson.1239 : List U8 = Array [92i64, 34i64];
ret TotallyNotJson.1239;
case 92:
let TotallyNotJson.1240 : List U8 = Array [92i64, 92i64];
ret TotallyNotJson.1240;
case 47:
let TotallyNotJson.1241 : List U8 = Array [92i64, 47i64];
ret TotallyNotJson.1241;
case 8:
let TotallyNotJson.1243 : U8 = 98i64;
let TotallyNotJson.1242 : List U8 = Array [92i64, TotallyNotJson.1243];
ret TotallyNotJson.1242;
case 12:
let TotallyNotJson.1245 : U8 = 102i64;
let TotallyNotJson.1244 : List U8 = Array [92i64, TotallyNotJson.1245];
ret TotallyNotJson.1244;
case 10:
let TotallyNotJson.1247 : U8 = 110i64;
let TotallyNotJson.1246 : List U8 = Array [92i64, TotallyNotJson.1247];
ret TotallyNotJson.1246;
case 13:
let TotallyNotJson.1249 : U8 = 114i64;
let TotallyNotJson.1248 : List U8 = Array [92i64, TotallyNotJson.1249];
ret TotallyNotJson.1248;
case 9:
let TotallyNotJson.1251 : U8 = 114i64;
let TotallyNotJson.1250 : List U8 = Array [92i64, TotallyNotJson.1251];
ret TotallyNotJson.1250;
default:
let TotallyNotJson.1252 : List U8 = Array [TotallyNotJson.218];
ret TotallyNotJson.1252;
procedure TotallyNotJson.32 (TotallyNotJson.262, TotallyNotJson.263):
let TotallyNotJson.1174 : {Str, List Str} = Struct {TotallyNotJson.262, TotallyNotJson.263};
let TotallyNotJson.1173 : {Str, List Str} = CallByName Encode.23 TotallyNotJson.1174;
ret TotallyNotJson.1173;
procedure Test.0 ():
let Test.13 : Str = "foo";
let Test.12 : Str = "foo";
let Test.1 : {Str, Str} = Struct {Test.12, Test.13};
let Test.11 : [C , C [], C , C , C , C ] = CallByName Json.1;
let Test.11 : [C , C [], C , C , C , C ] = CallByName TotallyNotJson.2;
let Test.10 : List U8 = CallByName Encode.26 Test.1 Test.11;
let Test.2 : [C {U64, U8}, C Str] = CallByName Str.9 Test.10;
let Test.7 : U8 = 1i64;

File diff suppressed because it is too large Load diff

View file

@ -20,11 +20,11 @@ procedure Encode.24 (Encode.99, Encode.107, Encode.101):
ret Encode.111;
procedure Encode.24 (Encode.99, Encode.107, Encode.101):
let Encode.118 : List U8 = CallByName Json.263 Encode.99 Encode.101 Encode.107;
let Encode.118 : List U8 = CallByName TotallyNotJson.264 Encode.99 Encode.101 Encode.107;
ret Encode.118;
procedure Encode.24 (Encode.99, Encode.107, Encode.101):
let Encode.123 : List U8 = CallByName Json.181 Encode.99 Encode.101 Encode.107;
let Encode.123 : List U8 = CallByName TotallyNotJson.182 Encode.99 Encode.101 Encode.107;
ret Encode.123;
procedure Encode.26 (Encode.105, Encode.106):
@ -33,239 +33,12 @@ procedure Encode.26 (Encode.105, Encode.106):
let Encode.108 : List U8 = CallByName Encode.24 Encode.109 Encode.110 Encode.106;
ret Encode.108;
procedure Json.1 ():
let Json.1171 : [C , C [], C , C , C , C ] = TagId(2) ;
ret Json.1171;
procedure Json.181 (Json.182, Json.1218, Json.180):
let Json.1221 : List U8 = CallByName Json.25 Json.180;
let Json.1220 : List U8 = CallByName List.8 Json.182 Json.1221;
ret Json.1220;
procedure Json.188 (Json.1269, Json.191):
let Json.189 : U64 = StructAtIndex 0 Json.1269;
let Json.190 : Int1 = StructAtIndex 1 Json.1269;
switch Json.191:
case 34:
let Json.1272 : Int1 = false;
let Json.1271 : {U64, Int1} = Struct {Json.189, Json.1272};
let Json.1270 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) Json.1271;
ret Json.1270;
case 92:
let Json.1275 : Int1 = false;
let Json.1274 : {U64, Int1} = Struct {Json.189, Json.1275};
let Json.1273 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) Json.1274;
ret Json.1273;
case 47:
let Json.1278 : Int1 = false;
let Json.1277 : {U64, Int1} = Struct {Json.189, Json.1278};
let Json.1276 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) Json.1277;
ret Json.1276;
case 8:
let Json.1281 : Int1 = false;
let Json.1280 : {U64, Int1} = Struct {Json.189, Json.1281};
let Json.1279 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) Json.1280;
ret Json.1279;
case 12:
let Json.1284 : Int1 = false;
let Json.1283 : {U64, Int1} = Struct {Json.189, Json.1284};
let Json.1282 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) Json.1283;
ret Json.1282;
case 10:
let Json.1287 : Int1 = false;
let Json.1286 : {U64, Int1} = Struct {Json.189, Json.1287};
let Json.1285 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) Json.1286;
ret Json.1285;
case 13:
let Json.1290 : Int1 = false;
let Json.1289 : {U64, Int1} = Struct {Json.189, Json.1290};
let Json.1288 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) Json.1289;
ret Json.1288;
case 9:
let Json.1293 : Int1 = false;
let Json.1292 : {U64, Int1} = Struct {Json.189, Json.1293};
let Json.1291 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) Json.1292;
ret Json.1291;
default:
let Json.1297 : U64 = 1i64;
let Json.1296 : U64 = CallByName Num.19 Json.189 Json.1297;
let Json.1295 : {U64, Int1} = Struct {Json.1296, Json.190};
let Json.1294 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) Json.1295;
ret Json.1294;
procedure Json.214 (Json.215, Json.216):
let Json.1240 : List U8 = CallByName Json.26 Json.216;
let Json.1239 : List U8 = CallByName List.8 Json.215 Json.1240;
ret Json.1239;
procedure Json.24 (Json.180):
let Json.1300 : Str = CallByName Encode.23 Json.180;
ret Json.1300;
procedure Json.25 (Json.183):
let Json.184 : List U8 = CallByName Str.12 Json.183;
let Json.1298 : U64 = 0i64;
let Json.1299 : Int1 = true;
let Json.185 : {U64, Int1} = Struct {Json.1298, Json.1299};
let Json.1268 : {} = Struct {};
inc Json.184;
let Json.186 : {U64, Int1} = CallByName List.26 Json.184 Json.185 Json.1268;
let Json.1222 : Int1 = StructAtIndex 1 Json.186;
let Json.1266 : Int1 = true;
let Json.1267 : Int1 = lowlevel Eq Json.1266 Json.1222;
if Json.1267 then
let Json.1232 : U64 = CallByName List.6 Json.184;
let Json.1233 : U64 = 2i64;
let Json.1231 : U64 = CallByName Num.19 Json.1232 Json.1233;
let Json.1228 : List U8 = CallByName List.68 Json.1231;
let Json.1230 : U8 = 34i64;
let Json.1229 : List U8 = Array [Json.1230];
let Json.1227 : List U8 = CallByName List.8 Json.1228 Json.1229;
let Json.1224 : List U8 = CallByName List.8 Json.1227 Json.184;
let Json.1226 : U8 = 34i64;
let Json.1225 : List U8 = Array [Json.1226];
let Json.1223 : List U8 = CallByName List.8 Json.1224 Json.1225;
ret Json.1223;
else
inc Json.184;
let Json.1265 : U64 = StructAtIndex 0 Json.186;
let Json.1264 : {List U8, List U8} = CallByName List.52 Json.184 Json.1265;
let Json.210 : List U8 = StructAtIndex 0 Json.1264;
let Json.212 : List U8 = StructAtIndex 1 Json.1264;
let Json.1262 : U64 = CallByName List.6 Json.184;
dec Json.184;
let Json.1263 : U64 = 120i64;
let Json.1260 : U64 = CallByName Num.21 Json.1262 Json.1263;
let Json.1261 : U64 = 100i64;
let Json.1259 : U64 = CallByName Num.94 Json.1260 Json.1261;
let Json.1256 : List U8 = CallByName List.68 Json.1259;
let Json.1258 : U8 = 34i64;
let Json.1257 : List U8 = Array [Json.1258];
let Json.1255 : List U8 = CallByName List.8 Json.1256 Json.1257;
let Json.213 : List U8 = CallByName List.8 Json.1255 Json.210;
let Json.1238 : {} = Struct {};
let Json.1235 : List U8 = CallByName List.18 Json.212 Json.213 Json.1238;
let Json.1237 : U8 = 34i64;
let Json.1236 : List U8 = Array [Json.1237];
let Json.1234 : List U8 = CallByName List.8 Json.1235 Json.1236;
ret Json.1234;
procedure Json.26 (Json.217):
switch Json.217:
case 34:
let Json.1241 : List U8 = Array [92i64, 34i64];
ret Json.1241;
case 92:
let Json.1242 : List U8 = Array [92i64, 92i64];
ret Json.1242;
case 47:
let Json.1243 : List U8 = Array [92i64, 47i64];
ret Json.1243;
case 8:
let Json.1245 : U8 = 98i64;
let Json.1244 : List U8 = Array [92i64, Json.1245];
ret Json.1244;
case 12:
let Json.1247 : U8 = 102i64;
let Json.1246 : List U8 = Array [92i64, Json.1247];
ret Json.1246;
case 10:
let Json.1249 : U8 = 110i64;
let Json.1248 : List U8 = Array [92i64, Json.1249];
ret Json.1248;
case 13:
let Json.1251 : U8 = 114i64;
let Json.1250 : List U8 = Array [92i64, Json.1251];
ret Json.1250;
case 9:
let Json.1253 : U8 = 114i64;
let Json.1252 : List U8 = Array [92i64, Json.1253];
ret Json.1252;
default:
let Json.1254 : List U8 = Array [Json.217];
ret Json.1254;
procedure Json.263 (Json.264, Json.1174, #Attr.12):
let Json.262 : List Str = StructAtIndex 1 #Attr.12;
let Json.261 : Str = StructAtIndex 0 #Attr.12;
let Json.1212 : I64 = 123i64;
let Json.1211 : U8 = CallByName Num.127 Json.1212;
let Json.1208 : List U8 = CallByName List.4 Json.264 Json.1211;
let Json.1210 : I64 = 34i64;
let Json.1209 : U8 = CallByName Num.127 Json.1210;
let Json.1206 : List U8 = CallByName List.4 Json.1208 Json.1209;
let Json.1207 : List U8 = CallByName Str.12 Json.261;
let Json.1203 : List U8 = CallByName List.8 Json.1206 Json.1207;
let Json.1205 : I64 = 34i64;
let Json.1204 : U8 = CallByName Num.127 Json.1205;
let Json.1200 : List U8 = CallByName List.4 Json.1203 Json.1204;
let Json.1202 : I64 = 58i64;
let Json.1201 : U8 = CallByName Num.127 Json.1202;
let Json.1197 : List U8 = CallByName List.4 Json.1200 Json.1201;
let Json.1199 : I64 = 91i64;
let Json.1198 : U8 = CallByName Num.127 Json.1199;
let Json.267 : List U8 = CallByName List.4 Json.1197 Json.1198;
let Json.1196 : U64 = CallByName List.6 Json.262;
let Json.1184 : {List U8, U64} = Struct {Json.267, Json.1196};
let Json.1183 : {List U8, U64} = CallByName List.18 Json.262 Json.1184 Json.1174;
let Json.269 : List U8 = StructAtIndex 0 Json.1183;
let Json.1182 : I64 = 93i64;
let Json.1181 : U8 = CallByName Num.127 Json.1182;
let Json.1178 : List U8 = CallByName List.4 Json.269 Json.1181;
let Json.1180 : I64 = 125i64;
let Json.1179 : U8 = CallByName Num.127 Json.1180;
let Json.1177 : List U8 = CallByName List.4 Json.1178 Json.1179;
ret Json.1177;
procedure Json.266 (Json.1176, Json.272, Json.265):
let Json.270 : List U8 = StructAtIndex 0 Json.1176;
let Json.271 : U64 = StructAtIndex 1 Json.1176;
let Json.273 : List U8 = CallByName Encode.24 Json.270 Json.272 Json.265;
joinpoint Json.1190 Json.274:
let Json.1188 : U64 = 1i64;
let Json.1187 : U64 = CallByName Num.20 Json.271 Json.1188;
let Json.1186 : {List U8, U64} = Struct {Json.274, Json.1187};
ret Json.1186;
in
let Json.1194 : U64 = 1i64;
let Json.1191 : Int1 = CallByName Num.24 Json.271 Json.1194;
if Json.1191 then
let Json.1193 : I64 = 44i64;
let Json.1192 : U8 = CallByName Num.127 Json.1193;
let Json.1189 : List U8 = CallByName List.4 Json.273 Json.1192;
jump Json.1190 Json.1189;
else
jump Json.1190 Json.273;
procedure Json.31 (Json.261, Json.262):
let Json.1214 : {Str, List Str} = Struct {Json.261, Json.262};
let Json.1213 : {Str, List Str} = CallByName Encode.23 Json.1214;
ret Json.1213;
procedure List.145 (List.146, List.147, List.144):
let List.566 : {List U8, U64} = CallByName Json.266 List.146 List.147 List.144;
let List.566 : {List U8, U64} = CallByName TotallyNotJson.267 List.146 List.147 List.144;
ret List.566;
procedure List.145 (List.146, List.147, List.144):
let List.586 : List U8 = CallByName Json.214 List.146 List.147;
let List.586 : List U8 = CallByName TotallyNotJson.215 List.146 List.147;
ret List.586;
procedure List.18 (List.142, List.143, List.144):
@ -399,7 +172,7 @@ procedure List.80 (List.691, List.692, List.693, List.694, List.695):
let List.628 : Int1 = CallByName Num.22 List.442 List.443;
if List.628 then
let List.637 : U8 = CallByName List.66 List.439 List.442;
let List.629 : [C {U64, Int1}, C {U64, Int1}] = CallByName Json.188 List.440 List.637;
let List.629 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.440 List.637;
let List.634 : U8 = 1i64;
let List.635 : U8 = GetTagId List.629;
let List.636 : Int1 = lowlevel Eq List.634 List.635;
@ -491,22 +264,249 @@ procedure Test.5 (Test.6, Test.7, Test.4):
let Test.29 : Str = StructAtIndex 0 Test.4;
let #Derived_gen.0 : Str = StructAtIndex 1 Test.4;
dec #Derived_gen.0;
let Test.28 : Str = CallByName Json.24 Test.29;
let Test.28 : Str = CallByName TotallyNotJson.25 Test.29;
let Test.27 : List Str = Array [Test.28];
let Test.19 : {Str, List Str} = CallByName Json.31 Test.26 Test.27;
let Test.19 : {Str, List Str} = CallByName TotallyNotJson.32 Test.26 Test.27;
jump Test.20 Test.19;
else
let Test.21 : Str = "B";
let Test.24 : Str = StructAtIndex 1 Test.4;
let #Derived_gen.1 : Str = StructAtIndex 0 Test.4;
dec #Derived_gen.1;
let Test.23 : Str = CallByName Json.24 Test.24;
let Test.23 : Str = CallByName TotallyNotJson.25 Test.24;
let Test.22 : List Str = Array [Test.23];
let Test.19 : {Str, List Str} = CallByName Json.31 Test.21 Test.22;
let Test.19 : {Str, List Str} = CallByName TotallyNotJson.32 Test.21 Test.22;
jump Test.20 Test.19;
procedure TotallyNotJson.182 (TotallyNotJson.183, TotallyNotJson.1219, TotallyNotJson.181):
let TotallyNotJson.1222 : List U8 = CallByName TotallyNotJson.26 TotallyNotJson.181;
let TotallyNotJson.1221 : List U8 = CallByName List.8 TotallyNotJson.183 TotallyNotJson.1222;
ret TotallyNotJson.1221;
procedure TotallyNotJson.189 (TotallyNotJson.1270, TotallyNotJson.192):
let TotallyNotJson.190 : U64 = StructAtIndex 0 TotallyNotJson.1270;
let TotallyNotJson.191 : Int1 = StructAtIndex 1 TotallyNotJson.1270;
switch TotallyNotJson.192:
case 34:
let TotallyNotJson.1273 : Int1 = false;
let TotallyNotJson.1272 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1273};
let TotallyNotJson.1271 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1272;
ret TotallyNotJson.1271;
case 92:
let TotallyNotJson.1276 : Int1 = false;
let TotallyNotJson.1275 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1276};
let TotallyNotJson.1274 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1275;
ret TotallyNotJson.1274;
case 47:
let TotallyNotJson.1279 : Int1 = false;
let TotallyNotJson.1278 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1279};
let TotallyNotJson.1277 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1278;
ret TotallyNotJson.1277;
case 8:
let TotallyNotJson.1282 : Int1 = false;
let TotallyNotJson.1281 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1282};
let TotallyNotJson.1280 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1281;
ret TotallyNotJson.1280;
case 12:
let TotallyNotJson.1285 : Int1 = false;
let TotallyNotJson.1284 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1285};
let TotallyNotJson.1283 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1284;
ret TotallyNotJson.1283;
case 10:
let TotallyNotJson.1288 : Int1 = false;
let TotallyNotJson.1287 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1288};
let TotallyNotJson.1286 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1287;
ret TotallyNotJson.1286;
case 13:
let TotallyNotJson.1291 : Int1 = false;
let TotallyNotJson.1290 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1291};
let TotallyNotJson.1289 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1290;
ret TotallyNotJson.1289;
case 9:
let TotallyNotJson.1294 : Int1 = false;
let TotallyNotJson.1293 : {U64, Int1} = Struct {TotallyNotJson.190, TotallyNotJson.1294};
let TotallyNotJson.1292 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) TotallyNotJson.1293;
ret TotallyNotJson.1292;
default:
let TotallyNotJson.1298 : U64 = 1i64;
let TotallyNotJson.1297 : U64 = CallByName Num.19 TotallyNotJson.190 TotallyNotJson.1298;
let TotallyNotJson.1296 : {U64, Int1} = Struct {TotallyNotJson.1297, TotallyNotJson.191};
let TotallyNotJson.1295 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) TotallyNotJson.1296;
ret TotallyNotJson.1295;
procedure TotallyNotJson.2 ():
let TotallyNotJson.1172 : [C , C [], C , C , C , C ] = TagId(2) ;
ret TotallyNotJson.1172;
procedure TotallyNotJson.215 (TotallyNotJson.216, TotallyNotJson.217):
let TotallyNotJson.1241 : List U8 = CallByName TotallyNotJson.27 TotallyNotJson.217;
let TotallyNotJson.1240 : List U8 = CallByName List.8 TotallyNotJson.216 TotallyNotJson.1241;
ret TotallyNotJson.1240;
procedure TotallyNotJson.25 (TotallyNotJson.181):
let TotallyNotJson.1301 : Str = CallByName Encode.23 TotallyNotJson.181;
ret TotallyNotJson.1301;
procedure TotallyNotJson.26 (TotallyNotJson.184):
let TotallyNotJson.185 : List U8 = CallByName Str.12 TotallyNotJson.184;
let TotallyNotJson.1299 : U64 = 0i64;
let TotallyNotJson.1300 : Int1 = true;
let TotallyNotJson.186 : {U64, Int1} = Struct {TotallyNotJson.1299, TotallyNotJson.1300};
let TotallyNotJson.1269 : {} = Struct {};
inc TotallyNotJson.185;
let TotallyNotJson.187 : {U64, Int1} = CallByName List.26 TotallyNotJson.185 TotallyNotJson.186 TotallyNotJson.1269;
let TotallyNotJson.1223 : Int1 = StructAtIndex 1 TotallyNotJson.187;
let TotallyNotJson.1267 : Int1 = true;
let TotallyNotJson.1268 : Int1 = lowlevel Eq TotallyNotJson.1267 TotallyNotJson.1223;
if TotallyNotJson.1268 then
let TotallyNotJson.1233 : U64 = CallByName List.6 TotallyNotJson.185;
let TotallyNotJson.1234 : U64 = 2i64;
let TotallyNotJson.1232 : U64 = CallByName Num.19 TotallyNotJson.1233 TotallyNotJson.1234;
let TotallyNotJson.1229 : List U8 = CallByName List.68 TotallyNotJson.1232;
let TotallyNotJson.1231 : U8 = 34i64;
let TotallyNotJson.1230 : List U8 = Array [TotallyNotJson.1231];
let TotallyNotJson.1228 : List U8 = CallByName List.8 TotallyNotJson.1229 TotallyNotJson.1230;
let TotallyNotJson.1225 : List U8 = CallByName List.8 TotallyNotJson.1228 TotallyNotJson.185;
let TotallyNotJson.1227 : U8 = 34i64;
let TotallyNotJson.1226 : List U8 = Array [TotallyNotJson.1227];
let TotallyNotJson.1224 : List U8 = CallByName List.8 TotallyNotJson.1225 TotallyNotJson.1226;
ret TotallyNotJson.1224;
else
inc TotallyNotJson.185;
let TotallyNotJson.1266 : U64 = StructAtIndex 0 TotallyNotJson.187;
let TotallyNotJson.1265 : {List U8, List U8} = CallByName List.52 TotallyNotJson.185 TotallyNotJson.1266;
let TotallyNotJson.211 : List U8 = StructAtIndex 0 TotallyNotJson.1265;
let TotallyNotJson.213 : List U8 = StructAtIndex 1 TotallyNotJson.1265;
let TotallyNotJson.1263 : U64 = CallByName List.6 TotallyNotJson.185;
dec TotallyNotJson.185;
let TotallyNotJson.1264 : U64 = 120i64;
let TotallyNotJson.1261 : U64 = CallByName Num.21 TotallyNotJson.1263 TotallyNotJson.1264;
let TotallyNotJson.1262 : U64 = 100i64;
let TotallyNotJson.1260 : U64 = CallByName Num.94 TotallyNotJson.1261 TotallyNotJson.1262;
let TotallyNotJson.1257 : List U8 = CallByName List.68 TotallyNotJson.1260;
let TotallyNotJson.1259 : U8 = 34i64;
let TotallyNotJson.1258 : List U8 = Array [TotallyNotJson.1259];
let TotallyNotJson.1256 : List U8 = CallByName List.8 TotallyNotJson.1257 TotallyNotJson.1258;
let TotallyNotJson.214 : List U8 = CallByName List.8 TotallyNotJson.1256 TotallyNotJson.211;
let TotallyNotJson.1239 : {} = Struct {};
let TotallyNotJson.1236 : List U8 = CallByName List.18 TotallyNotJson.213 TotallyNotJson.214 TotallyNotJson.1239;
let TotallyNotJson.1238 : U8 = 34i64;
let TotallyNotJson.1237 : List U8 = Array [TotallyNotJson.1238];
let TotallyNotJson.1235 : List U8 = CallByName List.8 TotallyNotJson.1236 TotallyNotJson.1237;
ret TotallyNotJson.1235;
procedure TotallyNotJson.264 (TotallyNotJson.265, TotallyNotJson.1175, #Attr.12):
let TotallyNotJson.263 : List Str = StructAtIndex 1 #Attr.12;
let TotallyNotJson.262 : Str = StructAtIndex 0 #Attr.12;
let TotallyNotJson.1213 : I64 = 123i64;
let TotallyNotJson.1212 : U8 = CallByName Num.127 TotallyNotJson.1213;
let TotallyNotJson.1209 : List U8 = CallByName List.4 TotallyNotJson.265 TotallyNotJson.1212;
let TotallyNotJson.1211 : I64 = 34i64;
let TotallyNotJson.1210 : U8 = CallByName Num.127 TotallyNotJson.1211;
let TotallyNotJson.1207 : List U8 = CallByName List.4 TotallyNotJson.1209 TotallyNotJson.1210;
let TotallyNotJson.1208 : List U8 = CallByName Str.12 TotallyNotJson.262;
let TotallyNotJson.1204 : List U8 = CallByName List.8 TotallyNotJson.1207 TotallyNotJson.1208;
let TotallyNotJson.1206 : I64 = 34i64;
let TotallyNotJson.1205 : U8 = CallByName Num.127 TotallyNotJson.1206;
let TotallyNotJson.1201 : List U8 = CallByName List.4 TotallyNotJson.1204 TotallyNotJson.1205;
let TotallyNotJson.1203 : I64 = 58i64;
let TotallyNotJson.1202 : U8 = CallByName Num.127 TotallyNotJson.1203;
let TotallyNotJson.1198 : List U8 = CallByName List.4 TotallyNotJson.1201 TotallyNotJson.1202;
let TotallyNotJson.1200 : I64 = 91i64;
let TotallyNotJson.1199 : U8 = CallByName Num.127 TotallyNotJson.1200;
let TotallyNotJson.268 : List U8 = CallByName List.4 TotallyNotJson.1198 TotallyNotJson.1199;
let TotallyNotJson.1197 : U64 = CallByName List.6 TotallyNotJson.263;
let TotallyNotJson.1185 : {List U8, U64} = Struct {TotallyNotJson.268, TotallyNotJson.1197};
let TotallyNotJson.1184 : {List U8, U64} = CallByName List.18 TotallyNotJson.263 TotallyNotJson.1185 TotallyNotJson.1175;
let TotallyNotJson.270 : List U8 = StructAtIndex 0 TotallyNotJson.1184;
let TotallyNotJson.1183 : I64 = 93i64;
let TotallyNotJson.1182 : U8 = CallByName Num.127 TotallyNotJson.1183;
let TotallyNotJson.1179 : List U8 = CallByName List.4 TotallyNotJson.270 TotallyNotJson.1182;
let TotallyNotJson.1181 : I64 = 125i64;
let TotallyNotJson.1180 : U8 = CallByName Num.127 TotallyNotJson.1181;
let TotallyNotJson.1178 : List U8 = CallByName List.4 TotallyNotJson.1179 TotallyNotJson.1180;
ret TotallyNotJson.1178;
procedure TotallyNotJson.267 (TotallyNotJson.1177, TotallyNotJson.273, TotallyNotJson.266):
let TotallyNotJson.271 : List U8 = StructAtIndex 0 TotallyNotJson.1177;
let TotallyNotJson.272 : U64 = StructAtIndex 1 TotallyNotJson.1177;
let TotallyNotJson.274 : List U8 = CallByName Encode.24 TotallyNotJson.271 TotallyNotJson.273 TotallyNotJson.266;
joinpoint TotallyNotJson.1191 TotallyNotJson.275:
let TotallyNotJson.1189 : U64 = 1i64;
let TotallyNotJson.1188 : U64 = CallByName Num.20 TotallyNotJson.272 TotallyNotJson.1189;
let TotallyNotJson.1187 : {List U8, U64} = Struct {TotallyNotJson.275, TotallyNotJson.1188};
ret TotallyNotJson.1187;
in
let TotallyNotJson.1195 : U64 = 1i64;
let TotallyNotJson.1192 : Int1 = CallByName Num.24 TotallyNotJson.272 TotallyNotJson.1195;
if TotallyNotJson.1192 then
let TotallyNotJson.1194 : I64 = 44i64;
let TotallyNotJson.1193 : U8 = CallByName Num.127 TotallyNotJson.1194;
let TotallyNotJson.1190 : List U8 = CallByName List.4 TotallyNotJson.274 TotallyNotJson.1193;
jump TotallyNotJson.1191 TotallyNotJson.1190;
else
jump TotallyNotJson.1191 TotallyNotJson.274;
procedure TotallyNotJson.27 (TotallyNotJson.218):
switch TotallyNotJson.218:
case 34:
let TotallyNotJson.1242 : List U8 = Array [92i64, 34i64];
ret TotallyNotJson.1242;
case 92:
let TotallyNotJson.1243 : List U8 = Array [92i64, 92i64];
ret TotallyNotJson.1243;
case 47:
let TotallyNotJson.1244 : List U8 = Array [92i64, 47i64];
ret TotallyNotJson.1244;
case 8:
let TotallyNotJson.1246 : U8 = 98i64;
let TotallyNotJson.1245 : List U8 = Array [92i64, TotallyNotJson.1246];
ret TotallyNotJson.1245;
case 12:
let TotallyNotJson.1248 : U8 = 102i64;
let TotallyNotJson.1247 : List U8 = Array [92i64, TotallyNotJson.1248];
ret TotallyNotJson.1247;
case 10:
let TotallyNotJson.1250 : U8 = 110i64;
let TotallyNotJson.1249 : List U8 = Array [92i64, TotallyNotJson.1250];
ret TotallyNotJson.1249;
case 13:
let TotallyNotJson.1252 : U8 = 114i64;
let TotallyNotJson.1251 : List U8 = Array [92i64, TotallyNotJson.1252];
ret TotallyNotJson.1251;
case 9:
let TotallyNotJson.1254 : U8 = 114i64;
let TotallyNotJson.1253 : List U8 = Array [92i64, TotallyNotJson.1254];
ret TotallyNotJson.1253;
default:
let TotallyNotJson.1255 : List U8 = Array [TotallyNotJson.218];
ret TotallyNotJson.1255;
procedure TotallyNotJson.32 (TotallyNotJson.262, TotallyNotJson.263):
let TotallyNotJson.1215 : {Str, List Str} = Struct {TotallyNotJson.262, TotallyNotJson.263};
let TotallyNotJson.1214 : {Str, List Str} = CallByName Encode.23 TotallyNotJson.1215;
ret TotallyNotJson.1214;
procedure Test.0 ():
let Test.12 : {Str, Str} = CallByName Test.3;
let Test.13 : [C , C [], C , C , C , C ] = CallByName Json.1;
let Test.13 : [C , C [], C , C , C , C ] = CallByName TotallyNotJson.2;
let Test.11 : List U8 = CallByName Encode.26 Test.12 Test.13;
ret Test.11;

View file

@ -11,7 +11,7 @@ procedure #Derived.2 (#Derived.3, #Derived.4, #Attr.12):
in
let #Derived_gen.16 : Str = "A";
let #Derived_gen.17 : List [] = Array [];
let #Derived_gen.15 : {Str, List []} = CallByName Json.31 #Derived_gen.16 #Derived_gen.17;
let #Derived_gen.15 : {Str, List []} = CallByName TotallyNotJson.32 #Derived_gen.16 #Derived_gen.17;
jump #Derived_gen.14 #Derived_gen.15;
procedure #Derived.5 (#Derived.6):
@ -27,7 +27,7 @@ procedure #Derived.7 (#Derived.8, #Derived.9, #Attr.12):
in
let #Derived_gen.7 : Str = "B";
let #Derived_gen.8 : List [] = Array [];
let #Derived_gen.6 : {Str, List []} = CallByName Json.31 #Derived_gen.7 #Derived_gen.8;
let #Derived_gen.6 : {Str, List []} = CallByName TotallyNotJson.32 #Derived_gen.7 #Derived_gen.8;
jump #Derived_gen.5 #Derived_gen.6;
procedure Bool.2 ():
@ -56,7 +56,7 @@ procedure Encode.24 (Encode.99, Encode.107, Encode.101):
ret Encode.111;
procedure Encode.24 (Encode.99, Encode.107, Encode.101):
let Encode.118 : List U8 = CallByName Json.263 Encode.99 Encode.101 Encode.107;
let Encode.118 : List U8 = CallByName TotallyNotJson.264 Encode.99 Encode.101 Encode.107;
ret Encode.118;
procedure Encode.24 (Encode.99, Encode.107, Encode.101):
@ -72,7 +72,7 @@ procedure Encode.24 (Encode.99, Encode.107, Encode.101):
procedure Encode.24 (Encode.99, Encode.107, Encode.101):
let Encode.134 : List U8 = CallByName Json.263 Encode.99 Encode.101 Encode.107;
let Encode.134 : List U8 = CallByName TotallyNotJson.264 Encode.99 Encode.101 Encode.107;
ret Encode.134;
procedure Encode.26 (Encode.105, Encode.106):
@ -81,130 +81,12 @@ procedure Encode.26 (Encode.105, Encode.106):
let Encode.108 : List U8 = CallByName Encode.24 Encode.109 Encode.110 Encode.106;
ret Encode.108;
procedure Json.1 ():
let Json.1171 : [C , C [], C , C , C , C ] = TagId(2) ;
ret Json.1171;
procedure Json.263 (Json.264, Json.1174, #Attr.12):
let Json.262 : List [C {}, C {}] = StructAtIndex 1 #Attr.12;
let Json.261 : Str = StructAtIndex 0 #Attr.12;
let Json.1212 : I64 = 123i64;
let Json.1211 : U8 = CallByName Num.127 Json.1212;
let Json.1208 : List U8 = CallByName List.4 Json.264 Json.1211;
let Json.1210 : I64 = 34i64;
let Json.1209 : U8 = CallByName Num.127 Json.1210;
let Json.1206 : List U8 = CallByName List.4 Json.1208 Json.1209;
let Json.1207 : List U8 = CallByName Str.12 Json.261;
let Json.1203 : List U8 = CallByName List.8 Json.1206 Json.1207;
let Json.1205 : I64 = 34i64;
let Json.1204 : U8 = CallByName Num.127 Json.1205;
let Json.1200 : List U8 = CallByName List.4 Json.1203 Json.1204;
let Json.1202 : I64 = 58i64;
let Json.1201 : U8 = CallByName Num.127 Json.1202;
let Json.1197 : List U8 = CallByName List.4 Json.1200 Json.1201;
let Json.1199 : I64 = 91i64;
let Json.1198 : U8 = CallByName Num.127 Json.1199;
let Json.267 : List U8 = CallByName List.4 Json.1197 Json.1198;
let Json.1196 : U64 = CallByName List.6 Json.262;
let Json.1184 : {List U8, U64} = Struct {Json.267, Json.1196};
let Json.1183 : {List U8, U64} = CallByName List.18 Json.262 Json.1184 Json.1174;
let Json.269 : List U8 = StructAtIndex 0 Json.1183;
let Json.1182 : I64 = 93i64;
let Json.1181 : U8 = CallByName Num.127 Json.1182;
let Json.1178 : List U8 = CallByName List.4 Json.269 Json.1181;
let Json.1180 : I64 = 125i64;
let Json.1179 : U8 = CallByName Num.127 Json.1180;
let Json.1177 : List U8 = CallByName List.4 Json.1178 Json.1179;
ret Json.1177;
procedure Json.263 (Json.264, Json.1174, #Attr.12):
let Json.262 : List [] = StructAtIndex 1 #Attr.12;
let Json.261 : Str = StructAtIndex 0 #Attr.12;
let Json.1263 : I64 = 123i64;
let Json.1262 : U8 = CallByName Num.127 Json.1263;
let Json.1259 : List U8 = CallByName List.4 Json.264 Json.1262;
let Json.1261 : I64 = 34i64;
let Json.1260 : U8 = CallByName Num.127 Json.1261;
let Json.1257 : List U8 = CallByName List.4 Json.1259 Json.1260;
let Json.1258 : List U8 = CallByName Str.12 Json.261;
let Json.1254 : List U8 = CallByName List.8 Json.1257 Json.1258;
let Json.1256 : I64 = 34i64;
let Json.1255 : U8 = CallByName Num.127 Json.1256;
let Json.1251 : List U8 = CallByName List.4 Json.1254 Json.1255;
let Json.1253 : I64 = 58i64;
let Json.1252 : U8 = CallByName Num.127 Json.1253;
let Json.1248 : List U8 = CallByName List.4 Json.1251 Json.1252;
let Json.1250 : I64 = 91i64;
let Json.1249 : U8 = CallByName Num.127 Json.1250;
let Json.267 : List U8 = CallByName List.4 Json.1248 Json.1249;
let Json.1247 : U64 = CallByName List.6 Json.262;
let Json.1235 : {List U8, U64} = Struct {Json.267, Json.1247};
let Json.1234 : {List U8, U64} = CallByName List.18 Json.262 Json.1235 Json.1174;
let Json.269 : List U8 = StructAtIndex 0 Json.1234;
let Json.1233 : I64 = 93i64;
let Json.1232 : U8 = CallByName Num.127 Json.1233;
let Json.1229 : List U8 = CallByName List.4 Json.269 Json.1232;
let Json.1231 : I64 = 125i64;
let Json.1230 : U8 = CallByName Num.127 Json.1231;
let Json.1228 : List U8 = CallByName List.4 Json.1229 Json.1230;
ret Json.1228;
procedure Json.266 (Json.1176, Json.272, Json.265):
let Json.270 : List U8 = StructAtIndex 0 Json.1176;
let Json.271 : U64 = StructAtIndex 1 Json.1176;
let Json.273 : List U8 = CallByName Encode.24 Json.270 Json.272 Json.265;
joinpoint Json.1190 Json.274:
let Json.1188 : U64 = 1i64;
let Json.1187 : U64 = CallByName Num.20 Json.271 Json.1188;
let Json.1186 : {List U8, U64} = Struct {Json.274, Json.1187};
ret Json.1186;
in
let Json.1194 : U64 = 1i64;
let Json.1191 : Int1 = CallByName Num.24 Json.271 Json.1194;
if Json.1191 then
let Json.1193 : I64 = 44i64;
let Json.1192 : U8 = CallByName Num.127 Json.1193;
let Json.1189 : List U8 = CallByName List.4 Json.273 Json.1192;
jump Json.1190 Json.1189;
else
jump Json.1190 Json.273;
procedure Json.266 (Json.1176, Json.272, Json.265):
let Json.270 : List U8 = StructAtIndex 0 Json.1176;
let Json.271 : U64 = StructAtIndex 1 Json.1176;
let Json.273 : List U8 = CallByName Encode.24 Json.270 Json.272 Json.265;
joinpoint Json.1241 Json.274:
let Json.1239 : U64 = 1i64;
let Json.1238 : U64 = CallByName Num.20 Json.271 Json.1239;
let Json.1237 : {List U8, U64} = Struct {Json.274, Json.1238};
ret Json.1237;
in
let Json.1245 : U64 = 1i64;
let Json.1242 : Int1 = CallByName Num.24 Json.271 Json.1245;
if Json.1242 then
let Json.1244 : I64 = 44i64;
let Json.1243 : U8 = CallByName Num.127 Json.1244;
let Json.1240 : List U8 = CallByName List.4 Json.273 Json.1243;
jump Json.1241 Json.1240;
else
jump Json.1241 Json.273;
procedure Json.31 (Json.261, Json.262):
let Json.1214 : {Str, List [C {}, C {}]} = Struct {Json.261, Json.262};
let Json.1213 : {Str, List [C {}, C {}]} = CallByName Encode.23 Json.1214;
ret Json.1213;
procedure Json.31 (Json.261, Json.262):
let Json.1265 : {Str, List []} = Struct {Json.261, Json.262};
let Json.1264 : {Str, List []} = CallByName Encode.23 Json.1265;
ret Json.1264;
procedure List.145 (List.146, List.147, List.144):
let List.566 : {List U8, U64} = CallByName Json.266 List.146 List.147 List.144;
let List.566 : {List U8, U64} = CallByName TotallyNotJson.267 List.146 List.147 List.144;
ret List.566;
procedure List.145 (List.146, List.147, List.144):
let List.639 : {List U8, U64} = CallByName Json.266 List.146 List.147 List.144;
let List.639 : {List U8, U64} = CallByName TotallyNotJson.267 List.146 List.147 List.144;
ret List.639;
procedure List.18 (List.142, List.143, List.144):
@ -336,18 +218,136 @@ procedure Test.5 (Test.6, Test.7, Test.4):
let Test.32 : {} = StructAtIndex 0 Test.4;
let Test.31 : [C {}, C {}] = CallByName #Derived.0 Test.32;
let Test.30 : List [C {}, C {}] = Array [Test.31];
let Test.22 : {Str, List [C {}, C {}]} = CallByName Json.31 Test.29 Test.30;
let Test.22 : {Str, List [C {}, C {}]} = CallByName TotallyNotJson.32 Test.29 Test.30;
jump Test.23 Test.22;
else
let Test.24 : Str = "B";
let Test.27 : {} = StructAtIndex 1 Test.4;
let Test.26 : [C {}, C {}] = CallByName #Derived.5 Test.27;
let Test.25 : List [C {}, C {}] = Array [Test.26];
let Test.22 : {Str, List [C {}, C {}]} = CallByName Json.31 Test.24 Test.25;
let Test.22 : {Str, List [C {}, C {}]} = CallByName TotallyNotJson.32 Test.24 Test.25;
jump Test.23 Test.22;
procedure TotallyNotJson.2 ():
let TotallyNotJson.1172 : [C , C [], C , C , C , C ] = TagId(2) ;
ret TotallyNotJson.1172;
procedure TotallyNotJson.264 (TotallyNotJson.265, TotallyNotJson.1175, #Attr.12):
let TotallyNotJson.263 : List [C {}, C {}] = StructAtIndex 1 #Attr.12;
let TotallyNotJson.262 : Str = StructAtIndex 0 #Attr.12;
let TotallyNotJson.1213 : I64 = 123i64;
let TotallyNotJson.1212 : U8 = CallByName Num.127 TotallyNotJson.1213;
let TotallyNotJson.1209 : List U8 = CallByName List.4 TotallyNotJson.265 TotallyNotJson.1212;
let TotallyNotJson.1211 : I64 = 34i64;
let TotallyNotJson.1210 : U8 = CallByName Num.127 TotallyNotJson.1211;
let TotallyNotJson.1207 : List U8 = CallByName List.4 TotallyNotJson.1209 TotallyNotJson.1210;
let TotallyNotJson.1208 : List U8 = CallByName Str.12 TotallyNotJson.262;
let TotallyNotJson.1204 : List U8 = CallByName List.8 TotallyNotJson.1207 TotallyNotJson.1208;
let TotallyNotJson.1206 : I64 = 34i64;
let TotallyNotJson.1205 : U8 = CallByName Num.127 TotallyNotJson.1206;
let TotallyNotJson.1201 : List U8 = CallByName List.4 TotallyNotJson.1204 TotallyNotJson.1205;
let TotallyNotJson.1203 : I64 = 58i64;
let TotallyNotJson.1202 : U8 = CallByName Num.127 TotallyNotJson.1203;
let TotallyNotJson.1198 : List U8 = CallByName List.4 TotallyNotJson.1201 TotallyNotJson.1202;
let TotallyNotJson.1200 : I64 = 91i64;
let TotallyNotJson.1199 : U8 = CallByName Num.127 TotallyNotJson.1200;
let TotallyNotJson.268 : List U8 = CallByName List.4 TotallyNotJson.1198 TotallyNotJson.1199;
let TotallyNotJson.1197 : U64 = CallByName List.6 TotallyNotJson.263;
let TotallyNotJson.1185 : {List U8, U64} = Struct {TotallyNotJson.268, TotallyNotJson.1197};
let TotallyNotJson.1184 : {List U8, U64} = CallByName List.18 TotallyNotJson.263 TotallyNotJson.1185 TotallyNotJson.1175;
let TotallyNotJson.270 : List U8 = StructAtIndex 0 TotallyNotJson.1184;
let TotallyNotJson.1183 : I64 = 93i64;
let TotallyNotJson.1182 : U8 = CallByName Num.127 TotallyNotJson.1183;
let TotallyNotJson.1179 : List U8 = CallByName List.4 TotallyNotJson.270 TotallyNotJson.1182;
let TotallyNotJson.1181 : I64 = 125i64;
let TotallyNotJson.1180 : U8 = CallByName Num.127 TotallyNotJson.1181;
let TotallyNotJson.1178 : List U8 = CallByName List.4 TotallyNotJson.1179 TotallyNotJson.1180;
ret TotallyNotJson.1178;
procedure TotallyNotJson.264 (TotallyNotJson.265, TotallyNotJson.1175, #Attr.12):
let TotallyNotJson.263 : List [] = StructAtIndex 1 #Attr.12;
let TotallyNotJson.262 : Str = StructAtIndex 0 #Attr.12;
let TotallyNotJson.1264 : I64 = 123i64;
let TotallyNotJson.1263 : U8 = CallByName Num.127 TotallyNotJson.1264;
let TotallyNotJson.1260 : List U8 = CallByName List.4 TotallyNotJson.265 TotallyNotJson.1263;
let TotallyNotJson.1262 : I64 = 34i64;
let TotallyNotJson.1261 : U8 = CallByName Num.127 TotallyNotJson.1262;
let TotallyNotJson.1258 : List U8 = CallByName List.4 TotallyNotJson.1260 TotallyNotJson.1261;
let TotallyNotJson.1259 : List U8 = CallByName Str.12 TotallyNotJson.262;
let TotallyNotJson.1255 : List U8 = CallByName List.8 TotallyNotJson.1258 TotallyNotJson.1259;
let TotallyNotJson.1257 : I64 = 34i64;
let TotallyNotJson.1256 : U8 = CallByName Num.127 TotallyNotJson.1257;
let TotallyNotJson.1252 : List U8 = CallByName List.4 TotallyNotJson.1255 TotallyNotJson.1256;
let TotallyNotJson.1254 : I64 = 58i64;
let TotallyNotJson.1253 : U8 = CallByName Num.127 TotallyNotJson.1254;
let TotallyNotJson.1249 : List U8 = CallByName List.4 TotallyNotJson.1252 TotallyNotJson.1253;
let TotallyNotJson.1251 : I64 = 91i64;
let TotallyNotJson.1250 : U8 = CallByName Num.127 TotallyNotJson.1251;
let TotallyNotJson.268 : List U8 = CallByName List.4 TotallyNotJson.1249 TotallyNotJson.1250;
let TotallyNotJson.1248 : U64 = CallByName List.6 TotallyNotJson.263;
let TotallyNotJson.1236 : {List U8, U64} = Struct {TotallyNotJson.268, TotallyNotJson.1248};
let TotallyNotJson.1235 : {List U8, U64} = CallByName List.18 TotallyNotJson.263 TotallyNotJson.1236 TotallyNotJson.1175;
let TotallyNotJson.270 : List U8 = StructAtIndex 0 TotallyNotJson.1235;
let TotallyNotJson.1234 : I64 = 93i64;
let TotallyNotJson.1233 : U8 = CallByName Num.127 TotallyNotJson.1234;
let TotallyNotJson.1230 : List U8 = CallByName List.4 TotallyNotJson.270 TotallyNotJson.1233;
let TotallyNotJson.1232 : I64 = 125i64;
let TotallyNotJson.1231 : U8 = CallByName Num.127 TotallyNotJson.1232;
let TotallyNotJson.1229 : List U8 = CallByName List.4 TotallyNotJson.1230 TotallyNotJson.1231;
ret TotallyNotJson.1229;
procedure TotallyNotJson.267 (TotallyNotJson.1177, TotallyNotJson.273, TotallyNotJson.266):
let TotallyNotJson.271 : List U8 = StructAtIndex 0 TotallyNotJson.1177;
let TotallyNotJson.272 : U64 = StructAtIndex 1 TotallyNotJson.1177;
let TotallyNotJson.274 : List U8 = CallByName Encode.24 TotallyNotJson.271 TotallyNotJson.273 TotallyNotJson.266;
joinpoint TotallyNotJson.1191 TotallyNotJson.275:
let TotallyNotJson.1189 : U64 = 1i64;
let TotallyNotJson.1188 : U64 = CallByName Num.20 TotallyNotJson.272 TotallyNotJson.1189;
let TotallyNotJson.1187 : {List U8, U64} = Struct {TotallyNotJson.275, TotallyNotJson.1188};
ret TotallyNotJson.1187;
in
let TotallyNotJson.1195 : U64 = 1i64;
let TotallyNotJson.1192 : Int1 = CallByName Num.24 TotallyNotJson.272 TotallyNotJson.1195;
if TotallyNotJson.1192 then
let TotallyNotJson.1194 : I64 = 44i64;
let TotallyNotJson.1193 : U8 = CallByName Num.127 TotallyNotJson.1194;
let TotallyNotJson.1190 : List U8 = CallByName List.4 TotallyNotJson.274 TotallyNotJson.1193;
jump TotallyNotJson.1191 TotallyNotJson.1190;
else
jump TotallyNotJson.1191 TotallyNotJson.274;
procedure TotallyNotJson.267 (TotallyNotJson.1177, TotallyNotJson.273, TotallyNotJson.266):
let TotallyNotJson.271 : List U8 = StructAtIndex 0 TotallyNotJson.1177;
let TotallyNotJson.272 : U64 = StructAtIndex 1 TotallyNotJson.1177;
let TotallyNotJson.274 : List U8 = CallByName Encode.24 TotallyNotJson.271 TotallyNotJson.273 TotallyNotJson.266;
joinpoint TotallyNotJson.1242 TotallyNotJson.275:
let TotallyNotJson.1240 : U64 = 1i64;
let TotallyNotJson.1239 : U64 = CallByName Num.20 TotallyNotJson.272 TotallyNotJson.1240;
let TotallyNotJson.1238 : {List U8, U64} = Struct {TotallyNotJson.275, TotallyNotJson.1239};
ret TotallyNotJson.1238;
in
let TotallyNotJson.1246 : U64 = 1i64;
let TotallyNotJson.1243 : Int1 = CallByName Num.24 TotallyNotJson.272 TotallyNotJson.1246;
if TotallyNotJson.1243 then
let TotallyNotJson.1245 : I64 = 44i64;
let TotallyNotJson.1244 : U8 = CallByName Num.127 TotallyNotJson.1245;
let TotallyNotJson.1241 : List U8 = CallByName List.4 TotallyNotJson.274 TotallyNotJson.1244;
jump TotallyNotJson.1242 TotallyNotJson.1241;
else
jump TotallyNotJson.1242 TotallyNotJson.274;
procedure TotallyNotJson.32 (TotallyNotJson.262, TotallyNotJson.263):
let TotallyNotJson.1215 : {Str, List [C {}, C {}]} = Struct {TotallyNotJson.262, TotallyNotJson.263};
let TotallyNotJson.1214 : {Str, List [C {}, C {}]} = CallByName Encode.23 TotallyNotJson.1215;
ret TotallyNotJson.1214;
procedure TotallyNotJson.32 (TotallyNotJson.262, TotallyNotJson.263):
let TotallyNotJson.1266 : {Str, List []} = Struct {TotallyNotJson.262, TotallyNotJson.263};
let TotallyNotJson.1265 : {Str, List []} = CallByName Encode.23 TotallyNotJson.1266;
ret TotallyNotJson.1265;
procedure Test.0 ():
let Test.13 : {{}, {}} = CallByName Test.3;
let Test.14 : [C , C [], C , C , C , C ] = CallByName Json.1;
let Test.14 : [C , C [], C , C , C , C ] = CallByName TotallyNotJson.2;
let Test.12 : List U8 = CallByName Encode.26 Test.13 Test.14;
ret Test.12;

View file

@ -1476,7 +1476,7 @@ fn encode_custom_type() {
indoc!(
r#"
app "test"
imports [Encode.{ toEncoder }, Json]
imports [Encode.{ toEncoder }, TotallyNotJson]
provides [main] to "./platform"
HelloWorld := {}
@ -1486,7 +1486,7 @@ fn encode_custom_type() {
|> Encode.appendWith (Encode.string "Hello, World!\n") fmt
main =
result = Str.fromUtf8 (Encode.toBytes (@HelloWorld {}) Json.json)
result = Str.fromUtf8 (Encode.toBytes (@HelloWorld {}) TotallyNotJson.json)
when result is
Ok s -> s
_ -> "<bad>"
@ -1499,11 +1499,11 @@ fn encode_derived_string() {
indoc!(
r#"
app "test"
imports [Encode.{ toEncoder }, Json]
imports [Encode.{ toEncoder }, TotallyNotJson]
provides [main] to "./platform"
main =
result = Str.fromUtf8 (Encode.toBytes "abc" Json.json)
result = Str.fromUtf8 (Encode.toBytes "abc" TotallyNotJson.json)
when result is
Ok s -> s
_ -> "<bad>"
@ -1517,11 +1517,11 @@ fn encode_derived_record() {
indoc!(
r#"
app "test"
imports [Encode.{ toEncoder }, Json]
imports [Encode.{ toEncoder }, TotallyNotJson]
provides [main] to "./platform"
main =
result = Str.fromUtf8 (Encode.toBytes {a: "a"} Json.json)
result = Str.fromUtf8 (Encode.toBytes {a: "a"} TotallyNotJson.json)
when result is
Ok s -> s
_ -> "<bad>"
@ -1860,11 +1860,11 @@ fn encode_derived_record_one_field_string() {
indoc!(
r#"
app "test"
imports [Encode.{ toEncoder }, Json]
imports [Encode.{ toEncoder }, TotallyNotJson]
provides [main] to "./platform"
main =
result = Str.fromUtf8 (Encode.toBytes {a: "foo"} Json.json)
result = Str.fromUtf8 (Encode.toBytes {a: "foo"} TotallyNotJson.json)
when result is
Ok s -> s
_ -> "<bad>"
@ -1878,11 +1878,11 @@ fn encode_derived_record_two_field_strings() {
indoc!(
r#"
app "test"
imports [Encode.{ toEncoder }, Json]
imports [Encode.{ toEncoder }, TotallyNotJson]
provides [main] to "./platform"
main =
result = Str.fromUtf8 (Encode.toBytes {a: "foo", b: "bar"} Json.json)
result = Str.fromUtf8 (Encode.toBytes {a: "foo", b: "bar"} TotallyNotJson.json)
when result is
Ok s -> s
_ -> "<bad>"
@ -1896,11 +1896,11 @@ fn encode_derived_nested_record_string() {
indoc!(
r#"
app "test"
imports [Encode.{ toEncoder }, Json]
imports [Encode.{ toEncoder }, TotallyNotJson]
provides [main] to "./platform"
main =
result = Str.fromUtf8 (Encode.toBytes {a: {b: "bar"}} Json.json)
result = Str.fromUtf8 (Encode.toBytes {a: {b: "bar"}} TotallyNotJson.json)
when result is
Ok s -> s
_ -> "<bad>"
@ -1913,13 +1913,13 @@ fn encode_derived_tag_one_field_string() {
indoc!(
r#"
app "test"
imports [Encode.{ toEncoder }, Json]
imports [Encode.{ toEncoder }, TotallyNotJson]
provides [main] to "./platform"
main =
x : [A Str]
x = A "foo"
result = Str.fromUtf8 (Encode.toBytes x Json.json)
result = Str.fromUtf8 (Encode.toBytes x TotallyNotJson.json)
when result is
Ok s -> s
_ -> "<bad>"
@ -1954,13 +1954,13 @@ fn encode_derived_tag_two_payloads_string() {
indoc!(
r#"
app "test"
imports [Encode.{ toEncoder }, Json]
imports [Encode.{ toEncoder }, TotallyNotJson]
provides [main] to "./platform"
main =
x : [A Str Str]
x = A "foo" "foo"
result = Str.fromUtf8 (Encode.toBytes x Json.json)
result = Str.fromUtf8 (Encode.toBytes x TotallyNotJson.json)
when result is
Ok s -> s
_ -> "<bad>"
@ -2227,11 +2227,11 @@ fn issue_4705() {
fn issue_4749() {
indoc!(
r###"
interface Test exposes [] imports [Json]
interface Test exposes [] imports [TotallyNotJson]
expect
input = [82, 111, 99]
got = Decode.fromBytes input Json.json
got = Decode.fromBytes input TotallyNotJson.json
got == Ok "Roc"
"###
)
@ -2467,10 +2467,10 @@ fn function_specialization_information_in_lambda_set_thunk_independent_defs() {
fn issue_4772_weakened_monomorphic_destructure() {
indoc!(
r###"
interface Test exposes [] imports [Json]
interface Test exposes [] imports [TotallyNotJson]
getNumber =
{ result, rest } = Decode.fromBytesPartial (Str.toUtf8 "-1234") Json.json
{ result, rest } = Decode.fromBytesPartial (Str.toUtf8 "-1234") TotallyNotJson.json
when result is
Ok val ->
@ -2664,7 +2664,7 @@ fn unspecialized_lambda_set_unification_keeps_all_concrete_types_without_unifica
// rather than collapsing to `[[] + [A, B]:toEncoder:1]`.
indoc!(
r#"
app "test" imports [Json] provides [main] to "./platform"
app "test" imports [TotallyNotJson] provides [main] to "./platform"
Q a b := { a: a, b: b } has [Encoding {toEncoder: toEncoderQ}]
@ -2679,7 +2679,7 @@ fn unspecialized_lambda_set_unification_keeps_all_concrete_types_without_unifica
accessor = @Q {a : A, b: B}
main =
Encode.toBytes accessor Json.json
Encode.toBytes accessor TotallyNotJson.json
"#
)
}
@ -2702,7 +2702,7 @@ fn unspecialized_lambda_set_unification_does_not_duplicate_identical_concrete_ty
// `t.a` and `t.b` are filled in.
indoc!(
r#"
app "test" imports [Json] provides [main] to "./platform"
app "test" imports [TotallyNotJson] provides [main] to "./platform"
Q a b := { a: a, b: b } has [Encoding {toEncoder: toEncoderQ}]
@ -2719,7 +2719,7 @@ fn unspecialized_lambda_set_unification_does_not_duplicate_identical_concrete_ty
@Q {a : x, b: x}
main =
Encode.toBytes accessor Json.json
Encode.toBytes accessor TotallyNotJson.json
"#
)
}

View file

@ -58,7 +58,7 @@ stringBody = \mimeType, str ->
# jsonBody : a -> Body | a has Encoding
# jsonBody = \val ->
# Body (MimeType "application/json") (Encode.toBytes val Json.format)
# Body (MimeType "application/json") (Encode.toBytes val TotallyNotJson.format)
#
# multiPartBody : List Part -> Body
# multiPartBody = \parts ->

View file

@ -2,11 +2,11 @@ platform "python-interop"
requires {} { main : arg -> ret | arg has Decoding, ret has Encoding }
exposes []
packages {}
imports [Json]
imports [TotallyNotJson]
provides [mainForHost]
mainForHost : List U8 -> List U8
mainForHost = \json ->
when Decode.fromBytes json Json.json is
Ok arg -> Encode.toBytes (main arg) Json.json
when Decode.fromBytes json TotallyNotJson.json is
Ok arg -> Encode.toBytes (main arg) TotallyNotJson.json
Err _ -> []

View file

@ -2,11 +2,11 @@ platform "ruby-interop"
requires {} { main : arg -> ret | arg has Decoding, ret has Encoding }
exposes []
packages {}
imports [Json]
imports [TotallyNotJson]
provides [mainForHost]
mainForHost : List U8 -> List U8
mainForHost = \json ->
when Decode.fromBytes json Json.json is
Ok arg -> Encode.toBytes (main arg) Json.json
when Decode.fromBytes json TotallyNotJson.json is
Ok arg -> Encode.toBytes (main arg) TotallyNotJson.json
Err _ -> [] # TODO panic so that Ruby raises an exception

View file

@ -22,7 +22,7 @@ interface Html.Internal.Client
Size,
translateStatic,
},
Json,
TotallyNotJson,
Action,
]
@ -104,7 +104,7 @@ initClientAppHelp : List U8, App state initData -> { state, rendered : RenderedT
initClientAppHelp = \json, app ->
state =
json
|> Decode.fromBytes Json.json
|> Decode.fromBytes TotallyNotJson.json
|> app.init
dynamicView =
app.render state
@ -444,7 +444,7 @@ diffAttr = \{ nodeId, attrs, patches, handlers, deletedHandlerCache }, attr ->
if accessors == newAccessors then
Tuple attrs patches
else
json = newAccessors |> Encode.toBytes Json.json
json = newAccessors |> Encode.toBytes TotallyNotJson.json
Tuple
{ attrs & eventListeners: Dict.insert attrs.eventListeners eventName { accessors, handlerId } }
@ -596,7 +596,7 @@ renderAttr = \{ nodeId, attrs, patches, handlers, deletedHandlerCache }, attr ->
newDeletedHandlerCache: deletedHandlerCache,
}
accessorsJson =
accessors |> Encode.toBytes Json.json
accessors |> Encode.toBytes TotallyNotJson.json
patch =
SetListener nodeId eventType accessorsJson handlerId
@ -774,7 +774,7 @@ expect
initJson : List U8
initJson =
{ answer: 42 } |> Encode.toBytes Json.json # panics at mono/src/ir.rs:5739:56
{ answer: 42 } |> Encode.toBytes TotallyNotJson.json # panics at mono/src/ir.rs:5739:56
expected : { state : State, rendered : RenderedTree State, patches : List Patch }
expected = {
state: { answer: 42 },

View file

@ -5,7 +5,7 @@ interface Html.Internal.Server
]
imports [
Html.Internal.Shared.{ Html, Attribute, App, translateStatic, text, element },
Json,
TotallyNotJson,
]
# -------------------------------
@ -71,7 +71,7 @@ insertRocScript = \document, initData, wasmUrl, hostJavaScript ->
encode =
\value ->
value
|> Encode.toBytes Json.json
|> Encode.toBytes TotallyNotJson.json
|> Str.fromUtf8
|> Result.withDefault ""

View file

@ -6,7 +6,7 @@ platform "server-side"
Html.Internal.Shared.{ App },
Html.Internal.Server.{ initServerApp },
Html.{ renderStatic },
Json,
TotallyNotJson,
]
provides [main]
@ -14,7 +14,7 @@ main : Str, Str -> Result Str Str
main = \initJson, hostJavaScript ->
initJson
|> Str.toUtf8
|> Decode.fromBytes Json.json
|> Decode.fromBytes TotallyNotJson.json
|> Result.try \initData -> initServerApp app initData hostJavaScript
|> Result.map renderStatic
|> Result.mapErr \err ->