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

Don't panic on Text/replace "" #2184

Merged
merged 5 commits into from
May 13, 2021
Merged

Don't panic on Text/replace "" #2184

merged 5 commits into from
May 13, 2021

Conversation

Gabriella439
Copy link
Collaborator

Fixes #2181

@Gabriella439
Copy link
Collaborator Author

I verified that this passes cabal v1-test tasty --test-option --quickcheck-replay=126743

Copy link
Collaborator

@sjakobi sjakobi 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! Ideally this should be merged together with the added tests from dhall-lang/dhall-lang#1172, but it doesn't matter much.

Comment on lines 608 to 612
let hLamInfo = case needle of
VTextLit (VChunks [] "") -> TextReplaceEmpty
_ -> Prim

in VHLam hLamInfo $ \replacement ->
Copy link
Collaborator

Choose a reason for hiding this comment

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

So that's how you include the lambda in the TextReplaceEmpty case! :) I hadn't figured that out.

@Gabriella439
Copy link
Collaborator Author

I can wait until the upstream tests are merged

@mergify mergify bot merged commit 4c55791 into master May 13, 2021
@mergify mergify bot deleted the gabriel/fix_text_replace branch May 13, 2021 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Text/replace "" triggers "Compiler bug"
2 participants