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

Defaulting for [] #877

Closed
yav opened this issue Sep 4, 2020 · 1 comment
Closed

Defaulting for [] #877

yav opened this issue Sep 4, 2020 · 1 comment
Assignees
Labels
command-line-repl Related to Cryptol's text-based UI docs LaTeX, markdown, literate haskell, or in-REPL documentation UX Issues related to the user experience (e.g., improved error messages)
Milestone

Comments

@yav
Copy link
Member

yav commented Sep 4, 2020

Ticket #875 points out that the new defaulting rules lead to a different behavior when you write [0x10] @@ [].
This has type {a} Integral a => [] [8]. In this case we don't default the a because there is no literal that causes the ambiguity.

I am not sure how useful this example is in real Cryptol code but it does appear in the book.

Since I doubt that this would appear very often in actual code, perhaps we should solve this by being more aggressive in the REPL defaulting rules, and use Integral a as a potential hint for defaulting.

@yav yav changed the title Defaulting for @@ [] Defaulting for [] Sep 4, 2020
@yav
Copy link
Member Author

yav commented Sep 4, 2020

On #875 @weaversa points out that a similar thing happens if you just type []. In that case we don't have any constraints, which could also warrant a special REPL defaulting rule.

@yav yav added command-line-repl Related to Cryptol's text-based UI docs LaTeX, markdown, literate haskell, or in-REPL documentation UX Issues related to the user experience (e.g., improved error messages) needs-test Missing a regression test in the test-suite labels Sep 17, 2020
@atomb atomb added this to the 2.10.0 milestone Sep 22, 2020
@yav yav removed the needs-test Missing a regression test in the test-suite label Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
command-line-repl Related to Cryptol's text-based UI docs LaTeX, markdown, literate haskell, or in-REPL documentation UX Issues related to the user experience (e.g., improved error messages)
Projects
None yet
Development

No branches or pull requests

3 participants