Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CBOR diagnostic files for ease of code review #659

Merged
merged 4 commits into from Jul 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 24 additions & 3 deletions release.nix
Expand Up @@ -3,9 +3,9 @@
let
nixpkgs =
builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/804060ff9a79ceb0925fe9ef79ddbf564a225d47.tar.gz";
url = "https://github.com/NixOS/nixpkgs/archive/55b8860aa209e987f6f15c523811e4861d97d6af.tar.gz";

sha256 = "0ga345hgw6v2kzyhvf5kw96hf60mx5pbd9c4qj5q4nan4lr7nkxn";
sha256 = "0ri58704vwv6gnyw33vjirgnvh2f1201vbflk0ydj5ff7vpyy7hf";
};

overlay = pkgsNew: pkgsOld: {
Expand Down Expand Up @@ -62,6 +62,17 @@ let
touch $out
'';

expected-diagnostic-files =
pkgsNew.runCommand "expected-diagnostic-files" {} ''
${pkgsNew.rsync}/bin/rsync --archive ${./tests}/ "$out"

${pkgsNew.coreutils}/bin/chmod --recursive u+w "$out"

for FILE in $(${pkgsNew.findutils}/bin/find "$out" -type f -name '*.dhallb'); do
${pkgsNew.cbor-diag}/bin/cbor2diag.rb "$FILE" > "''${FILE%.dhallb}.diag"
done
'';

expected-prelude = pkgsNew.runCommand "expected-prelude" {} ''
${pkgsNew.rsync}/bin/rsync --archive ${./Prelude}/ "$out"

Expand All @@ -73,6 +84,15 @@ let
done
'';

diagnostic-files-lint = pkgsNew.runCommand "diagnostic-files-lint" {} ''
${pkgsNew.rsync}/bin/rsync --archive ${pkgsNew.expected-diagnostic-files}/ ./tests.expected
${pkgsNew.rsync}/bin/rsync --archive ${./tests}/ ./tests.actual

${pkgsNew.diffutils}/bin/diff --recursive ./tests.{actual,expected}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you need to do something here to assert that there are no differences? Or does diff exit with non-zero if there are differences?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ocharles: diff exits with a non-zero exit code if there are differences


touch $out
'';

prelude-lint = pkgsNew.runCommand "prelude-lint" {} ''
${pkgsNew.rsync}/bin/rsync --archive ${pkgsNew.expected-prelude}/ ./Prelude.expected
${pkgsNew.rsync}/bin/rsync --archive ${./Prelude}/ ./Prelude.actual
Expand Down Expand Up @@ -114,9 +134,10 @@ in
pkgs.dhall-grammar
pkgs.ensure-trailing-newlines
pkgs.prelude-lint
pkgs.diagnostic-files-lint
rev
];
};

inherit (pkgs) expected-prelude;
inherit (pkgs) expected-prelude expected-diagnostic-files;
}
5 changes: 5 additions & 0 deletions scripts/generate-diagnostic-files.sh
@@ -0,0 +1,5 @@
set -eu

nix build --file ./release.nix expected-diagnostic-files
rsync --archive --checksum --delete result/ ./tests
chmod -R u+w ./tests
8 changes: 5 additions & 3 deletions tests/README.md
Expand Up @@ -58,9 +58,11 @@ Where `A` and `B` are:
- `A`: a Dhall expression as text
- `B`: the binary representation of the Dhall-CBOR-encoded expression

*Note*: since the tests are binary-encoded, they are not the friendliest to debug.
For this reason, you might want to look at the `diff-binary.sh` script to help
with the debugging.
*Note*: Each `B.dhallb` file has a matching `B.diag` file containing the
CBOR diagnostic notation for the encoded expression. You can generate
the `.diag` file using the `./scripts/generate-diagnostic-files.sh` script
and our continuous integration will remind you to do so (by failing if you
don't keep the diagnostic file up-to-date).

### Running `normalization` tests

Expand Down
1 change: 1 addition & 0 deletions tests/binary-decode/failure/unit/ApplyNoArgs.diag
@@ -0,0 +1 @@
[0, ["f", 0]]
@@ -0,0 +1 @@
[1, "_", 0, 0]
@@ -0,0 +1 @@
[4, 0, 0]
1 change: 1 addition & 0 deletions tests/binary-decode/failure/unit/NaturalNegativeOne.diag
@@ -0,0 +1 @@
[15, -1]
1 change: 1 addition & 0 deletions tests/binary-decode/failure/unit/OperatorOrTooFewArgs.diag
@@ -0,0 +1 @@
[3, 0, 0]
@@ -0,0 +1 @@
[3, 0, 0, 0, 0]
@@ -0,0 +1 @@
[3, 12, 0, 0]
@@ -0,0 +1 @@
[2, "_", 0, 0]
@@ -0,0 +1 @@
["_", 0]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/AnnotationA.diag
@@ -0,0 +1 @@
[26, [15, 5], "Natural"]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/ApplicationA.diag
@@ -0,0 +1 @@
[0, "Natural/show", 0]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/ApplicationMultipleA.diag
@@ -0,0 +1 @@
[0, ["f", 0], ["x", 0], ["y", 0], ["z", 0]]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/BoolFalseA.diag
@@ -0,0 +1 @@
false
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/BoolIfA.diag
@@ -0,0 +1 @@
[14, true, ["x", 0], ["y", 0]]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/BoolTrueA.diag
@@ -0,0 +1 @@
true
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/BuiltinNaturalShowA.diag
@@ -0,0 +1 @@
"Natural/show"
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/DoubleDoubleA.diag
@@ -0,0 +1 @@
2.0
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/DoubleHalfA.diag
@@ -0,0 +1 @@
1.0
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/DoubleInfinityA.diag
@@ -0,0 +1 @@
Infinity
@@ -0,0 +1 @@
-Infinity
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/DoubleSingleA.diag
@@ -0,0 +1 @@
2.0
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/IntegerNegativeOneA.diag
@@ -0,0 +1 @@
[16, -1]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/IntegerZeroA.diag
@@ -0,0 +1 @@
[16, 0]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/LambdaNamedXA.diag
@@ -0,0 +1 @@
[1, "x", 0, ["x", 0]]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/LambdaUnderscoreA.diag
@@ -0,0 +1 @@
[1, "Natural", 0]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/LetMultipleA.diag
@@ -0,0 +1 @@
[25, "x", "Natural", [15, 1], "y", null, [15, 2], ["x", 0]]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/LetOneTypedA.diag
@@ -0,0 +1 @@
[25, "x", "Natural", [15, 1], ["x", 0]]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/LetOneUntypedA.diag
@@ -0,0 +1 @@
[25, "x", null, [15, 1], ["x", 0]]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/ListEmptyA.diag
@@ -0,0 +1 @@
[4, "Natural"]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/ListOneA.diag
@@ -0,0 +1 @@
[4, null, 0]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/MergeAnnotatedA.diag
@@ -0,0 +1 @@
[6, 0, 1, 2]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/MergeUnannotatedA.diag
@@ -0,0 +1 @@
[6, 0, 1]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/NaturalTwentyFourA.diag
@@ -0,0 +1 @@
[15, 24]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/NaturalZeroA.diag
@@ -0,0 +1 @@
[15, 0]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/OperatorAndA.diag
@@ -0,0 +1 @@
[3, 1, 0, 1]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/OperatorCombineA.diag
@@ -0,0 +1 @@
[3, 8, 0, 1]
@@ -0,0 +1 @@
[3, 10, 0, 1]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/OperatorEqA.diag
@@ -0,0 +1 @@
[3, 2, 0, 1]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/OperatorImportAltA.diag
@@ -0,0 +1 @@
[3, 11, 0, 1]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/OperatorListAppendA.diag
@@ -0,0 +1 @@
[3, 7, 0, 1]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/OperatorNeqA.diag
@@ -0,0 +1 @@
[3, 3, 0, 1]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/OperatorOrA.diag
@@ -0,0 +1 @@
[3, 0, 0, 1]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/OperatorPlusA.diag
@@ -0,0 +1 @@
[3, 4, 0, 1]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/OperatorPreferA.diag
@@ -0,0 +1 @@
[3, 9, 0, 1]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/OperatorTextAppendA.diag
@@ -0,0 +1 @@
[3, 6, 0, 1]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/OperatorTimesA.diag
@@ -0,0 +1 @@
[3, 5, 0, 1]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/PiNamedXA.diag
@@ -0,0 +1 @@
[2, "x", "Natural", 0]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/PiUnderscoreA.diag
@@ -0,0 +1 @@
[2, "Natural", "Text"]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/RecordFieldAccessA.diag
@@ -0,0 +1 @@
[9, 0, "x"]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/RecordLiteralA.diag
@@ -0,0 +1 @@
[8, {"x": "Natural", "y": "Bool"}]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/RecordProjectFieldsA.diag
@@ -0,0 +1 @@
[10, ["r", 0], "x", "y", "z"]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/RecordTypeA.diag
@@ -0,0 +1 @@
[7, {"x": "Natural", "y": "Bool"}]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/SelfDescribeCBORX2A.diag
@@ -0,0 +1 @@
["x", 55799(0)]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/SelfDescribeCBORX3A.diag
@@ -0,0 +1 @@
[55799("x"), 0]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/SelfDescribeCBORXA.diag
@@ -0,0 +1 @@
55799(["x", 0])
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/SomeA.diag
@@ -0,0 +1 @@
[5, null, 0]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/TextInterpolatedA.diag
@@ -0,0 +1 @@
[18, "foo", 0, "bar"]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/TextSimpleA.diag
@@ -0,0 +1 @@
[18, "foo"]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/UnionTypeA.diag
@@ -0,0 +1 @@
[11, {"x": "Natural", "y": null}]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/VariableNamedA.diag
@@ -0,0 +1 @@
["x", 1]
@@ -0,0 +1 @@
["x", 1]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/VariableUnderscoreA.diag
@@ -0,0 +1 @@
4
@@ -0,0 +1 @@
1
@@ -0,0 +1 @@
[24, null, 0, 6, "FOO"]
@@ -0,0 +1 @@
[24, null, 0, 0, null, "foo:bar@baz:123", "path1", "path2", "query"]
@@ -0,0 +1 @@
[24, null, 0, 0, null, "foo:bar@baz:123", "path1", "path2", null]
@@ -0,0 +1 @@
[24, null, 0, 1, null, "foo:bar@baz:123", "path1", "path2", ""]
@@ -0,0 +1 @@
[24, null, 0, 1, null, "foo:bar@baz:123", "path1", "path2", "query"]
@@ -0,0 +1 @@
[24, null, 0, 1, null, "authority", "path/with?funny-characters", null]
@@ -0,0 +1 @@
[24, null, 0, 1, null, "authority", "path", "a%23b%5Bc"]
@@ -0,0 +1 @@
[24, null, 0, 1, null, "foo:bar@baz:123", "path1", "path2", null]
@@ -0,0 +1 @@
[24, null, 0, 3, "path0", "path1", "path2", "file"]
@@ -0,0 +1 @@
[24, null, 0, 5, "path0", "path1", "path2", "file"]
@@ -0,0 +1 @@
[24, null, 0, 4, "path0", "path1", "path2", "file"]
@@ -0,0 +1 @@
[24, null, 0, 2, "path0", "path1", "path2", "file"]
1 change: 1 addition & 0 deletions tests/binary-decode/success/unit/imports/MissingA.diag
@@ -0,0 +1 @@
[24, null, 0, 7]
@@ -0,0 +1 @@
[10, [8, {"a": [15, 1], "b": [15, 2]}], [[7, {"a": "Natural"}]]]
43 changes: 0 additions & 43 deletions tests/diff-binary.sh

This file was deleted.

1 change: 1 addition & 0 deletions tests/parser/success/annotationsB.diag
@@ -0,0 +1 @@
[26, [3, 7, [3, 7, [4, "Natural"], [4, null, [15, 1], [15, 2], [15, 3]]], [26, [4, null, [15, 1], [15, 2], [15, 3]], [0, "List", "Natural"]]], [0, "List", "Natural"]]
1 change: 1 addition & 0 deletions tests/parser/success/blockCommentB.diag
@@ -0,0 +1 @@
[15, 1]
1 change: 1 addition & 0 deletions tests/parser/success/builtinNameAsFieldB.diag
@@ -0,0 +1 @@
[25, "Prelude", null, [24, null, 0, 1, null, "prelude.dhall-lang.org", "package.dhall", null], [9, [9, ["Prelude", 0], "List"], "map"]]
1 change: 1 addition & 0 deletions tests/parser/success/builtinsB.diag
@@ -0,0 +1 @@
[1, "x", [7, {"field0": "Bool", "field1": [0, "Optional", [0, "Optional", "Bool"]], "field2": "Natural", "field3": "Integer", "field4": "Double", "field5": "Text", "field6": [0, "List", [0, "List", "Bool"]]}], [8, {"field00": "Natural/fold", "field01": "Natural/build", "field02": "Natural/isZero", "field03": "Natural/even", "field04": "Natural/odd", "field05": "Natural/toInteger", "field06": "Natural/show", "field07": "Integer/show", "field08": "Double/show", "field09": "List/build", "field10": "List/fold", "field11": "List/length", "field12": "List/head", "field13": "List/last", "field14": "List/indexed", "field15": "List/reverse", "field16": "Optional/fold", "field17": "Optional/build", "field18": true, "field19": false, "field20": "None"}]]
1 change: 1 addition & 0 deletions tests/parser/success/collectionImportTypeB.diag
@@ -0,0 +1 @@
[8, {"example0": [0, "None", [24, null, 0, 3, "type.dhall"]], "example1": [4, [24, null, 0, 3, "type.dhall"]]}]
1 change: 1 addition & 0 deletions tests/parser/success/doubleB.diag
@@ -0,0 +1 @@
[4, null, 1.1, -1.1, 10.0, 11.0, NaN, Infinity, -Infinity, 0.0]
1 change: 1 addition & 0 deletions tests/parser/success/fieldsB.diag
@@ -0,0 +1 @@
[9, [9, [9, [8, {"foo": [8, {"bar": [8, {"baz": [15, 1]}]}]}], "foo"], "bar"], "baz"]
1 change: 1 addition & 0 deletions tests/parser/success/forallB.diag
@@ -0,0 +1 @@
[2, "a", "Type", [2, "b", "Type", ["a", 0]]]
1 change: 1 addition & 0 deletions tests/parser/success/functionTypeB.diag
@@ -0,0 +1 @@
[2, "Bool", [2, "Bool", "Bool"]]
1 change: 1 addition & 0 deletions tests/parser/success/identifierB.diag
@@ -0,0 +1 @@
[1, "a", "Type", [1, "a", "Type", ["a", 1]]]
1 change: 1 addition & 0 deletions tests/parser/success/ifThenElseB.diag
@@ -0,0 +1 @@
[14, true, [15, 1], [15, 2]]
1 change: 1 addition & 0 deletions tests/parser/success/labelB.diag
@@ -0,0 +1 @@
[25, "_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-/", null, [15, 1], ["_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-/", 0]]
1 change: 1 addition & 0 deletions tests/parser/success/lambdaB.diag
@@ -0,0 +1 @@
[1, "a", "Type", [1, "b", "Type", ["a", 0]]]
1 change: 1 addition & 0 deletions tests/parser/success/largeExpressionB.diag
@@ -0,0 +1 @@
[1, "xs", [0, "List", [7, {"cores": "Natural", "host": "Text", "key": "Text", "mandatoryFeatures": [0, "List", "Text"], "platforms": [0, "List", [11, {"AArch64_Linux": null, "ARMv5tel_Linux": null, "ARMv7l_Linux": null, "I686_Cygwin": null, "I686_Linux": null, "MIPS64el_Linux": null, "PowerPC_Linux": null, "X86_64_Cygwin": null, "X86_64_Darwin": null, "X86_64_FreeBSD": null, "X86_64_Linux": null, "X86_64_Solaris": null}]], "speedFactor": "Natural", "supportedFeatures": [0, "List", "Text"], "user": [0, "Optional", "Text"]}]], [0, "List/fold", [7, {"cores": "Natural", "host": "Text", "key": "Text", "mandatoryFeatures": [0, "List", "Text"], "platforms": [0, "List", [11, {"AArch64_Linux": null, "ARMv5tel_Linux": null, "ARMv7l_Linux": null, "I686_Cygwin": null, "I686_Linux": null, "MIPS64el_Linux": null, "PowerPC_Linux": null, "X86_64_Cygwin": null, "X86_64_Darwin": null, "X86_64_FreeBSD": null, "X86_64_Linux": null, "X86_64_Solaris": null}]], "speedFactor": "Natural", "supportedFeatures": [0, "List", "Text"], "user": [0, "Optional", "Text"]}], ["xs", 0], "Text", [1, "x", [7, {"cores": "Natural", "host": "Text", "key": "Text", "mandatoryFeatures": [0, "List", "Text"], "platforms": [0, "List", [11, {"AArch64_Linux": null, "ARMv5tel_Linux": null, "ARMv7l_Linux": null, "I686_Cygwin": null, "I686_Linux": null, "MIPS64el_Linux": null, "PowerPC_Linux": null, "X86_64_Cygwin": null, "X86_64_Darwin": null, "X86_64_FreeBSD": null, "X86_64_Linux": null, "X86_64_Solaris": null}]], "speedFactor": "Natural", "supportedFeatures": [0, "List", "Text"], "user": [0, "Optional", "Text"]}], [1, "y", "Text", [3, 6, [3, 6, [3, 6, [3, 6, [3, 6, [3, 6, [3, 6, [3, 6, [3, 6, [3, 6, [3, 6, [3, 6, [3, 6, [3, 6, [0, "Optional/fold", "Text", [9, ["x", 0], "user"], "Text", [1, "user", "Text", [3, 6, [3, 6, [3, 6, ["user", 0], [18, "@"]], [9, ["x", 0], "host"]], [18, ""]]], [9, ["x", 0], "host"]], [18, " "]], [6, [8, {"Empty": [18, ""], "NonEmpty": [1, "result", "Text", ["result", 0]]}], [0, "List/fold", [11, {"AArch64_Linux": null, "ARMv5tel_Linux": null, "ARMv7l_Linux": null, "I686_Cygwin": null, "I686_Linux": null, "MIPS64el_Linux": null, "PowerPC_Linux": null, "X86_64_Cygwin": null, "X86_64_Darwin": null, "X86_64_FreeBSD": null, "X86_64_Linux": null, "X86_64_Solaris": null}], [9, ["x", 0], "platforms"], [11, {"Empty": null, "NonEmpty": "Text"}], [1, "element", [11, {"AArch64_Linux": null, "ARMv5tel_Linux": null, "ARMv7l_Linux": null, "I686_Cygwin": null, "I686_Linux": null, "MIPS64el_Linux": null, "PowerPC_Linux": null, "X86_64_Cygwin": null, "X86_64_Darwin": null, "X86_64_FreeBSD": null, "X86_64_Linux": null, "X86_64_Solaris": null}], [1, "status", [11, {"Empty": null, "NonEmpty": "Text"}], [6, [8, {"Empty": [0, [9, [11, {"Empty": null, "NonEmpty": "Text"}], "NonEmpty"], [6, [8, {"AArch64_Linux": [18, "aarch64-linux"], "ARMv5tel_Linux": [18, "armv5tel-linux"], "ARMv7l_Linux": [18, "armv7l-linux"], "I686_Cygwin": [18, "i686-cygwin"], "I686_Linux": [18, "i686-linux"], "MIPS64el_Linux": [18, "mips64el-linux"], "PowerPC_Linux": [18, "powerpc-linux"], "X86_64_Cygwin": [18, "x86_64-cygwin"], "X86_64_Darwin": [18, "x86_64-darwin"], "X86_64_FreeBSD": [18, "x86_64-freebsd"], "X86_64_Linux": [18, "x86_64-linux"], "X86_64_Solaris": [18, "x86_64-solaris"]}], ["element", 0]]], "NonEmpty": [1, "result", "Text", [0, [9, [11, {"Empty": null, "NonEmpty": "Text"}], "NonEmpty"], [3, 6, [3, 6, [6, [8, {"AArch64_Linux": [18, "aarch64-linux"], "ARMv5tel_Linux": [18, "armv5tel-linux"], "ARMv7l_Linux": [18, "armv7l-linux"], "I686_Cygwin": [18, "i686-cygwin"], "I686_Linux": [18, "i686-linux"], "MIPS64el_Linux": [18, "mips64el-linux"], "PowerPC_Linux": [18, "powerpc-linux"], "X86_64_Cygwin": [18, "x86_64-cygwin"], "X86_64_Darwin": [18, "x86_64-darwin"], "X86_64_FreeBSD": [18, "x86_64-freebsd"], "X86_64_Linux": [18, "x86_64-linux"], "X86_64_Solaris": [18, "x86_64-solaris"]}], ["element", 0]], [18, ","]], ["result", 0]]]]}], ["status", 0], [11, {"Empty": null, "NonEmpty": "Text"}]]]], [9, [11, {"Empty": null, "NonEmpty": "Text"}], "Empty"]], "Text"]], [18, " "]], [9, ["x", 0], "key"]], [18, " "]], [0, "Integer/show", [0, "Natural/toInteger", [9, ["x", 0], "cores"]]]], [18, " "]], [0, "Integer/show", [0, "Natural/toInteger", [9, ["x", 0], "speedFactor"]]]], [18, " "]], [6, [8, {"Empty": [18, ""], "NonEmpty": [1, "result", "Text", ["result", 0]]}], [0, "List/fold", "Text", [9, ["x", 0], "supportedFeatures"], [11, {"Empty": null, "NonEmpty": "Text"}], [1, "element", "Text", [1, "status", [11, {"Empty": null, "NonEmpty": "Text"}], [6, [8, {"Empty": [0, [9, [11, {"Empty": null, "NonEmpty": "Text"}], "NonEmpty"], ["element", 0]], "NonEmpty": [1, "result", "Text", [0, [9, [11, {"Empty": null, "NonEmpty": "Text"}], "NonEmpty"], [3, 6, [3, 6, ["element", 0], [18, ","]], ["result", 0]]]]}], ["status", 0], [11, {"Empty": null, "NonEmpty": "Text"}]]]], [9, [11, {"Empty": null, "NonEmpty": "Text"}], "Empty"]], "Text"]], [18, " "]], [6, [8, {"Empty": [18, ""], "NonEmpty": [1, "result", "Text", ["result", 0]]}], [0, "List/fold", "Text", [9, ["x", 0], "mandatoryFeatures"], [11, {"Empty": null, "NonEmpty": "Text"}], [1, "element", "Text", [1, "status", [11, {"Empty": null, "NonEmpty": "Text"}], [6, [8, {"Empty": [0, [9, [11, {"Empty": null, "NonEmpty": "Text"}], "NonEmpty"], ["element", 0]], "NonEmpty": [1, "result", "Text", [0, [9, [11, {"Empty": null, "NonEmpty": "Text"}], "NonEmpty"], [3, 6, [3, 6, ["element", 0], [18, ","]], ["result", 0]]]]}], ["status", 0], [11, {"Empty": null, "NonEmpty": "Text"}]]]], [9, [11, {"Empty": null, "NonEmpty": "Text"}], "Empty"]], "Text"]], [18, "\n"]], ["y", 0]]]], [18, ""]]]
1 change: 1 addition & 0 deletions tests/parser/success/leadingTabsB.diag
@@ -0,0 +1 @@
[18, "\n"]
1 change: 1 addition & 0 deletions tests/parser/success/letB.diag
@@ -0,0 +1 @@
[25, "x", null, [15, 1], [25, "y", "Natural", [15, 2], ["x", 0]]]
1 change: 1 addition & 0 deletions tests/parser/success/lineCommentB.diag
@@ -0,0 +1 @@
[15, 1]
1 change: 1 addition & 0 deletions tests/parser/success/listB.diag
@@ -0,0 +1 @@
[4, null, [4, null, [16, 1], [16, 2], [16, 3]], [26, [4, null, [16, 1], [16, 2], [16, 3]], [0, "List", "Integer"]], [4, "Integer"]]
1 change: 1 addition & 0 deletions tests/parser/success/mergeB.diag
@@ -0,0 +1 @@
[1, "x", [11, {}], [8, {"bar": [6, [8, {}], ["x", 0], "Integer"], "foo": [6, [8, {"Left": [1, "b", "Bool", ["b", 0]], "Right": "Natural/even"}], [0, [9, [11, {"Left": "Bool", "Right": "Natural"}], "Left"], true]]}]]
1 change: 1 addition & 0 deletions tests/parser/success/multiletB.diag
@@ -0,0 +1 @@
[25, "a", null, [15, 1], "b", null, [15, 2], [3, 4, ["a", 0], ["b", 0]]]
1 change: 1 addition & 0 deletions tests/parser/success/naturalB.diag
@@ -0,0 +1 @@
[4, null, [15, 0], [15, 1], [15, 1], [15, 10]]
1 change: 1 addition & 0 deletions tests/parser/success/nestedBlockCommentB.diag
@@ -0,0 +1 @@
[15, 1]
1 change: 1 addition & 0 deletions tests/parser/success/operatorsB.diag
@@ -0,0 +1 @@
[26, [3, 8, [8, {"foo": [3, 0, [3, 1, false, [0, "Natural/even", [3, 4, [15, 1], [3, 5, [15, 2], [15, 3]]]]], [3, 2, true, [3, 3, false, true]]]}], [3, 9, [8, {"bar": [3, 7, [4, null, [3, 6, [18, "ABC"], [18, "DEF"]]], [4, null, [18, "GHI"]]]}], [8, {"baz": true}]]], [3, 10, [7, {"baz": "Bool", "foo": "Bool"}], [7, {"bar": [0, "List", "Text"]}]]]
1 change: 1 addition & 0 deletions tests/parser/success/quotedBoundVariableB.diag
@@ -0,0 +1 @@
[0, [1, "Natural/even", [2, "Natural", "Bool"], ["Natural/even", 0]], "Natural/odd", [15, 0]]
1 change: 1 addition & 0 deletions tests/parser/success/quotedLabelB.diag
@@ -0,0 +1 @@
[8, {"example1": [25, "let", null, [15, 1], ["let", 0]], "example2": [25, ":.", null, [15, 1], [":.", 0]], "example3": [25, "$ref", null, [15, 1], ["$ref", 0]]}]
1 change: 1 addition & 0 deletions tests/parser/success/recordB.diag
@@ -0,0 +1 @@
[26, [8, {"bar": [15, 2], "baz": true, "foo": [16, 1]}], [7, {"bar": "Natural", "baz": "Bool", "foo": "Integer"}]]
1 change: 1 addition & 0 deletions tests/parser/success/recordProjectionByExpressionB.diag
@@ -0,0 +1 @@
[25, "example1", null, [1, "A", "Type", [1, "B", "Type", [1, "C", [7, {"x": ["A", 0], "y": ["B", 0]}], [26, [10, ["C", 0], [[7, {"x": ["A", 0]}]]], [7, {"x": ["A", 0]}]]]]], "example2", null, [1, "A", "Type", [1, "B", "Type", [1, "C", [7, {"p": ["A", 0], "q": ["B", 0]}], [26, [10, ["C", 0], [[25, "r", null, [7, {"p": ["A", 0]}], ["r", 0]]]], [7, {"p": ["A", 0]}]]]]], "A", null, "Natural", "B", null, "Text", [26, [3, 8, [0, ["example1", 0], ["A", 0], ["B", 0], [8, {"x": [15, 10], "y": [18, "Text"]}]], [0, ["example2", 0], ["A", 0], ["B", 0], [8, {"p": [15, 10], "q": [18, "Text"]}]]], [7, {"p": ["A", 0], "x": ["A", 0]}]]]
1 change: 1 addition & 0 deletions tests/parser/success/reservedPrefixB.diag
@@ -0,0 +1 @@
[25, "TypeSynonym", null, "Integer", [26, [16, 1], ["TypeSynonym", 0]]]
1 change: 1 addition & 0 deletions tests/parser/success/text/doubleQuotedStringB.diag
@@ -0,0 +1 @@
[18, "ABC"]
1 change: 1 addition & 0 deletions tests/parser/success/text/escapeB.diag
@@ -0,0 +1 @@
[18, "${\n''\n$\n\"\n\\\n"]
1 change: 1 addition & 0 deletions tests/parser/success/text/escapedDoubleQuotedStringB.diag
@@ -0,0 +1 @@
[18, "\\\"$\\/\b\f\n\r\t\u{1D11E} \u2200(a : Type) \u2192 a"]
1 change: 1 addition & 0 deletions tests/parser/success/text/escapedSingleQuotedStringB.diag
@@ -0,0 +1 @@
[18, "${\n''\n"]
1 change: 1 addition & 0 deletions tests/parser/success/text/interestingB.diag
@@ -0,0 +1 @@
[1, "x", "Text", [18, "", ["x", 0], " baz\n bar\n foo\n "]]
1 change: 1 addition & 0 deletions tests/parser/success/text/interiorIndentB.diag
@@ -0,0 +1 @@
[18, " foo\n bar\n"]
@@ -0,0 +1 @@
[18, "ABC", [0, "Natural/show", [15, 123]], ""]
@@ -0,0 +1 @@
[18, "ABC\n", [0, "Natural/show", [15, 123]], "\n"]
1 change: 1 addition & 0 deletions tests/parser/success/text/interpolationB.diag
@@ -0,0 +1 @@
[18, "", [0, "Natural/show", [15, 1]], " foo\n bar\n"]
1 change: 1 addition & 0 deletions tests/parser/success/text/multilineBlankLineB.diag
@@ -0,0 +1 @@
[18, "hello\n\nthere\n"]
1 change: 1 addition & 0 deletions tests/parser/success/text/multilineBlankLineCrlfB.diag
@@ -0,0 +1 @@
[18, "hello\n\nthere\n"]
@@ -0,0 +1 @@
[18, "\thai\n\tthere\n ok\n\t"]
@@ -0,0 +1 @@
[18, "hai\nthere\n"]
@@ -0,0 +1 @@
[18, "\ta\n b\n"]
1 change: 1 addition & 0 deletions tests/parser/success/text/multilineTabsB.diag
@@ -0,0 +1 @@
[18, "hai\n\tthere\n lol\n"]
1 change: 1 addition & 0 deletions tests/parser/success/text/preserveCommentB.diag
@@ -0,0 +1 @@
[18, "-- Hello\n{- world -}\n"]
1 change: 1 addition & 0 deletions tests/parser/success/text/singleLineB.diag
@@ -0,0 +1 @@
[18, "foo"]
1 change: 1 addition & 0 deletions tests/parser/success/text/singleQuotedStringB.diag
@@ -0,0 +1 @@
[18, "ABC\nDEF\n"]
1 change: 1 addition & 0 deletions tests/parser/success/text/templateB.diag
@@ -0,0 +1 @@
[1, "record", [7, {"in_ca": "Bool", "name": "Text", "taxed_value": "Double", "value": "Double"}], [18, "Hello ", [9, ["record", 0], "name"], "\nYou have just won ", [0, "Double/show", [9, ["record", 0], "value"]], " dollars!\n", [14, [9, ["record", 0], "in_ca"], [18, "Well, ", [0, "Double/show", [9, ["record", 0], "taxed_value"]], " dollars, after taxes"], [18, ""]], "\n"]]
1 change: 1 addition & 0 deletions tests/parser/success/text/twoLinesB.diag
@@ -0,0 +1 @@
[18, "foo\nbar"]
1 change: 1 addition & 0 deletions tests/parser/success/text/unicodeDoubleQuotedStringB.diag
@@ -0,0 +1 @@
[18, "\u2200(a : Type) \u2192 a"]
1 change: 1 addition & 0 deletions tests/parser/success/toMapB.diag
@@ -0,0 +1 @@
[27, [8, {"bar": [15, 4], "baz": [15, 9], "foo": [15, 1]}]]
1 change: 1 addition & 0 deletions tests/parser/success/unicodeCommentB.diag
@@ -0,0 +1 @@
[15, 1]
1 change: 1 addition & 0 deletions tests/parser/success/unionB.diag
@@ -0,0 +1 @@
[26, [12, "B", [8, {}], {"A": [7, {}], "C": [7, {}]}], [11, {"A": [7, {}], "B": [7, {}], "C": [7, {}]}]]
1 change: 1 addition & 0 deletions tests/parser/success/unit/BoolB.diag
@@ -0,0 +1 @@
"Bool"
1 change: 1 addition & 0 deletions tests/parser/success/unit/BoolLitTrueB.diag
@@ -0,0 +1 @@
true
1 change: 1 addition & 0 deletions tests/parser/success/unit/ForallB.diag
@@ -0,0 +1 @@
[2, "x", ["T", 0], ["x", 0]]
1 change: 1 addition & 0 deletions tests/parser/success/unit/ForallNestedB.diag
@@ -0,0 +1 @@
[2, "x", ["T", 0], [2, "y", ["U", 0], ["x", 0]]]
1 change: 1 addition & 0 deletions tests/parser/success/unit/ForallUnderscoreB.diag
@@ -0,0 +1 @@
[2, ["T", 0], ["x", 0]]
1 change: 1 addition & 0 deletions tests/parser/success/unit/IntegerLitNegativeB.diag
@@ -0,0 +1 @@
[16, -10]
1 change: 1 addition & 0 deletions tests/parser/success/unit/IntegerLitPositiveB.diag
@@ -0,0 +1 @@
[16, 10]
1 change: 1 addition & 0 deletions tests/parser/success/unit/KindB.diag
@@ -0,0 +1 @@
"Kind"
1 change: 1 addition & 0 deletions tests/parser/success/unit/LambdaB.diag
@@ -0,0 +1 @@
[1, "x", ["T", 0], ["x", 0]]