Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Move to typed quotes #9

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

Conversation

bgamari
Copy link

@bgamari bgamari commented May 23, 2016

This allows the splices provided by gitrev to be included in typed
TH quotes. Moreover, they greatly clarify the interfaces.

This change should of course be accompanied by a major version bump.

This allows the splices provided by `gitrev` to be included in typed
TH quotes. Moreover, they greatly clarify the interfaces.

This change should of course be accompanied by a major version bump.
@acfoltzer
Copy link
Owner

Sorry for the delay on this; a mail filter gone awry hid messages about this repo from me for months.

Are the typed TH splices documented anywhere? This is the first I've seen them, and only the syntax appears to be described in the user's guide. Will this break compatibility with older GHCs?

@bgamari
Copy link
Author

bgamari commented Mar 19, 2017

Sadly the documentation for typed quotes is a bit lacking. Typed quotes were introduced around 2013. I believe the first GHC release which it appeared in was 7.8.1.

So I suppose the answer is yes, this will have implications on older GHCs.

@bgamari
Copy link
Author

bgamari commented Apr 4, 2017 via email

@brandon-leapyear brandon-leapyear mentioned this pull request Apr 18, 2018
gitDirty = do
output <- runGit ["status", "--porcelain"] "" IdxUsed
case output of
"" -> conE falseName
_ -> conE trueName
"" -> boolT False

Choose a reason for hiding this comment

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

Could just be [|| False ||]


-- | Return the branch (or tag) name of the current git commit, or @UNKNOWN@
-- if not in a git repository. For detached heads, this will just be
-- "HEAD"
gitBranch :: ExpQ
gitBranch :: Q (TExp String)

Choose a reason for hiding this comment

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

TExpQ String is another alias

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants