Skip to content

Implement QuasiQuotes [quote| xx |] as string face #660

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

Merged
merged 1 commit into from
May 22, 2015
Merged

Implement QuasiQuotes [quote| xx |] as string face #660

merged 1 commit into from
May 22, 2015

Conversation

gracjan
Copy link
Contributor

@gracjan gracjan commented May 20, 2015

No description provided.

@gracjan
Copy link
Contributor Author

gracjan commented May 20, 2015

Fixes #323.

@geraldus
Copy link
Contributor

I'm curious is it possible to provide some way to fontify quasi quotes according to its syntax if it is exists like in org mode. For example I have package for Yesod's Shakespearen Templates highlighting and it will be very cool to apply fortification for such quasi quotes as shamlet, hamlet, julius, and etc.

@gracjan
Copy link
Contributor Author

gracjan commented May 22, 2015

Possible and could be done as a next step. What you need is:

  • a mapping quoter -> mode
  • use the mapping to to fontify-as-mode on the string inside quasi quote

Pretty simple.

@geraldus
Copy link
Contributor

If I'm not mistaken quoter to mode map will raise "reference to void variable" errors in case there is no dependent package installed. How to avoid this?

@gracjan
Copy link
Contributor Author

gracjan commented May 22, 2015

I guess (if (fbound 'xxx-mode) ...) is the way to go.

@geraldus
Copy link
Contributor

I've thought about it, but I guess true branch of mentioned if expression will raise error any way.

gracjan added a commit that referenced this pull request May 22, 2015
Implement QuasiQuotes [quote| xx |] as string face
@gracjan gracjan merged commit 59afe94 into haskell:master May 22, 2015
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