Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 Text/replace builtin #1065
Add Text/replace builtin #1065
Changes from all commits
e083884
42fb6ff
db056f0
df2405b
bb814eb
ae955b9
9182692
2577b6e
cae8ec7
a61ff5f
595c8ca
e67a627
8fb45f5
6add36b
e15215b
bd2948c
008713a
87885ce
905f6b1
8affa98
2e9c134
e217c2a
3efd28f
c03ffcf
4d9d42f
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also add this as one of the test cases in the standard test suite?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, updated. Should I leave this in the prelude? Just wondering how easy this will be for all implementations, since most users importing the prelude won't need this particular replacement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is also worth keeping in the Prelude since this is useful documentation for the end user. These examples will also show up in the generated docs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really understand how the haystack can be abstract. Don't we want to replace occurrences of the needle in the abstract section too? i.e. What happens if
y
is the string"a"
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@basile-henry: Oh, I see what you mean. Allowing the haystack to be abstract means that β-reduction is no longer confluent. For right now, just ignore that test and I can put up a change to require the haystack to be non-abstract before further reduction can occur.