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

Standardize builtin Bytes type #1323

Merged
merged 14 commits into from
Feb 26, 2023
Merged

Conversation

mmhat
Copy link
Collaborator

@mmhat mmhat commented Feb 8, 2023

Current scope of this proposal:

  • Support only base-16 encoded literals
  • No functions to do something meaningful with Bytes values

Fixes #1179

@mmhat
Copy link
Collaborator Author

mmhat commented Feb 8, 2023

I also included changes to the Haskell code to work around -Wtype-equality-requires-operators and -Wforall-identifier.

@mmhat mmhat marked this pull request as draft February 8, 2023 17:24
@mmhat mmhat marked this pull request as ready for review February 9, 2023 12:30
Copy link
Contributor

@Gabriella439 Gabriella439 left a comment

Choose a reason for hiding this comment

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

Looks great so far!

scripts/generate-test-files.sh Outdated Show resolved Hide resolved

print encoded

args <- System.Environment.getArgs
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps add a comment explaining that this is to make it easier to generate .diag files

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It actually helps to generate the *.dhallb of the testsuite; The *.diag are still generated by cbor2diab.rb.
However, I added some more documentation to the Interpret.hs module explaining how to do that.
Do you think that is sufficient?

standard/Parser.hs Outdated Show resolved Hide resolved
standard/beta-normalization.md Outdated Show resolved Hide resolved
standard/binary.md Outdated Show resolved Hide resolved
standard/binary.md Outdated Show resolved Hide resolved
standard/binary.md Outdated Show resolved Hide resolved
standard/imports.md Outdated Show resolved Hide resolved
tests/binary-decode/success/unit/BytesB.dhall Show resolved Hide resolved
standard/dhall.abnf Outdated Show resolved Hide resolved
 * Require Bytes literals to have an even length
 * Added test case for that
 * Added some more literals to the Bytes parser test case
 * Added documentation on how to generate *.dhallb with the included
   dhall executable
@mmhat
Copy link
Collaborator Author

mmhat commented Feb 10, 2023

@Gabriella439 Oh, yes, the byte literals must have an even length. That was a bug in the proposal! Good catch 👍

scripts/lint-prelude.sh Outdated Show resolved Hide resolved
scripts/test-vm.sh Outdated Show resolved Hide resolved
mmhat and others added 2 commits February 11, 2023 10:08
Co-authored-by: Gabriella Gonzalez <GenuineGabriella@gmail.com>
@mmhat mmhat merged commit fbfdbb7 into dhall-lang:master Feb 26, 2023
@mmhat mmhat deleted the 1179-standardize-bytes branch February 26, 2023 02:38
Gabriella439 added a commit to dhall-lang/dhall-haskell that referenced this pull request Apr 1, 2023
Gabriella439 added a commit to dhall-lang/dhall-haskell that referenced this pull request Apr 2, 2023
locallycompact pushed a commit to locallycompact/dhall-haskell that referenced this pull request Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for Blob types?
2 participants