-
Notifications
You must be signed in to change notification settings - Fork 211
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 instance Lift (Expr s a) #1119
Conversation
This allows Exprs to be lifted in template-haskell. This is useful to build a [dhall||] quasiquoter
{-# LANGUAGE OverloadedStrings #-} | ||
{-# LANGUAGE TemplateHaskell #-} |
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.
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.
Actually, even if it were, we could guard this behind a cabal configure
flag so that users can compile out Template Haskell support if necessary. But let's still confirm whether or not we even need to do so
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.
It wouldn't be hard to remove it from this file.
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.
Oh, if it's easy to do, then go ahead. The real issue here is that I just don't really understand what are the exact requirements for Dhall to be easy-to-cross-compile. For example, it's not clear to me if depending on th-lift-instances
matters or not for the original use case @vmchale had in mind.
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.
This can actually get away with just TemplateHaskellQuotes
, which is cross-compilation friendly.
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've changed this to TemplateHaskellQuotes
, I hadn't even heard of that extension!
Sorry for the merge conflicts, @ocharles! :/ |
No problem! I have a little more work to do anyway, should be easy to fix up. |
Anyone got any ideas on the build failure? Is this Cabal messing up? It seems to be in the "Preprocessing" stage. |
FWIW, when I built your branch with stack just now, I got the same error, and added |
Oh, that's a slightly different error but I do probably need to fix the |
I have a feeling that even though |
@ocharles: I think the only option is to guard all of the |
Cabal actually doesn't care - that list is only relevant for |
@quasicomputational are you sure? Because this extension has existed since 7.4, yet the build is failing on 7.10 |
GHC's manual says new in 8.0, so actually, yeah, this won't work without either conditionally exposing the |
Huh. This says since 7.2.1 |
I guess this was a bug and the documentation has been fixed in HEAD? |
Right: https://gitlab.haskell.org/ghc/ghc/commit/1ad3c8245cc114c3f862633d027361700fba3e50 |
Ok, I've taken a different approach using the default instance for |
@ocharles: It looks like we might need to replace |
Yea I saw. Sorry, I'm traveling a lot this weekend so I'm just pushing
commits out when I get a few minutes spare.
…On Sun, 21 Jul 2019, 3:46 pm Gabriel Gonzalez, ***@***.***> wrote:
@ocharles <https://github.com/ocharles>: It looks like we might need to
replace TemplateHaskellQuotes with another extension for older GHC
versions
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1119?email_source=notifications&email_token=AAAFDDTJGTKMPXVZVJIPHPDQARZCRA5CNFSM4IEALTVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2OFAAY#issuecomment-513560579>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAFDDU32OOZEMFWQLAJNHLQARZCRANCNFSM4IEALTVA>
.
|
Thank you! 🙂 |
Oh good, I finally got all CI systems happy! |
This allows Exprs to be lifted in template-haskell. This is useful to build a
[dhall| ... |]
quasiquoter