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

Accept non-Haskell QuasiQuotes #118

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ivan-m
Copy link
Collaborator

@ivan-m ivan-m commented Nov 9, 2015

Rather than throwing an error (thus making it impossible to use shm in a
function that has a QQ somewhere in it), instead just gracefully fail.

Ideally, the contents of the QuasiQuote would be one context contained
within the overall QQ, but I couldn't figure out how to do that.

Closes #116.

Rather than throwing an error (thus making it impossible to use shm in a
function that has a QQ somewhere in it), instead just gracefully fail.

Ideally, the contents of the QuasiQuote would be one context contained
within the overall QQ, but I couldn't figure out how to do that.

Closes projectional-haskell#116.
@ivan-m
Copy link
Collaborator Author

ivan-m commented Nov 9, 2015

I think the build error is because the version of GHC on Travis-CI is too old.

@ivan-m
Copy link
Collaborator Author

ivan-m commented Dec 20, 2015

Any chance of getting this merged in? I'm dealing with a codebase that is rather liberal with its usage of quasiquotation for SQL and general string interpolation, and without this patch it makes it very difficult to hack upon.

@chrisdone
Copy link
Member

Can you give me an example so that I can test this out? Generally SHM works well with quasiquotes.

@ivan-m
Copy link
Collaborator Author

ivan-m commented Dec 20, 2015

I gave a sample one in #116. Not specified in that one, but the interpolation syntax we use is $n for show n, $(foo n) for show (foo n) and ${bar n} for bar n (which evaluates to a String); I think it was the last one that caused problems.

(I can try and get a better example at work tomorrow if this doesn't provide enough of an example.)

@chrisdone
Copy link
Member

I'm testing this out now.

@chrisdone
Copy link
Member

I seem to come back to this from time to time and forget why it's not merged. Last I tried it, it introduced some other parser issue I think.

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.

2 participants