-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
yaml-to-dhall
support for empty objects (#1186)
* Fix `yaml-to-dhall` support for empty objects `yaml-to-dhall` was decoding an empty object into: ```dhall [] : { mapKey : Text, mapValue : Text } ``` ... instead of: ```dhall [] : List { mapKey : Text, mapValue : Text } ``` ... which this change fixes * Add missing test files * Hopefully fix test failure on Windows I suspect that the test failure is due to the locale for the test suite not being set to UTF8
- Loading branch information
1 parent
ce17b86
commit 268c796
Showing
5 changed files
with
42 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
λ(JSON : Type) | ||
→ λ ( json | ||
: { array : | ||
List JSON → JSON | ||
, bool : | ||
Bool → JSON | ||
, null : | ||
JSON | ||
, number : | ||
Double → JSON | ||
, object : | ||
List { mapKey : Text, mapValue : JSON } → JSON | ||
, string : | ||
Text → JSON | ||
} | ||
) | ||
→ json.object ([] : List { mapKey : Text, mapValue : JSON }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
∀(JSON : Type) | ||
→ ∀ ( json | ||
: { array : | ||
List JSON → JSON | ||
, bool : | ||
Bool → JSON | ||
, null : | ||
JSON | ||
, number : | ||
Double → JSON | ||
, object : | ||
List { mapKey : Text, mapValue : JSON } → JSON | ||
, string : | ||
Text → JSON | ||
} | ||
) | ||
→ JSON |