gitrev icon indicating copy to clipboard operation
gitrev copied to clipboard

Move to typed quotes

Open bgamari opened this issue 9 years ago • 3 comments

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.

bgamari avatar May 23 '16 11:05 bgamari

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?

acfoltzer avatar Mar 17 '17 02:03 acfoltzer

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 avatar Mar 19 '17 15:03 bgamari

"Adam C. Foltzer" [email protected] writes:

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?

Sadly there is relatively little discussion in the users guide. Moreover, it all seems to be hidden away in https://downloads.haskell.org/~ghc/master/users-guide//glasgow_exts.html#th-syntax

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?

Typed splices were introduced in GHC 7.8. In general I quite like typed splices as they eliminate much of the fragility associated with TH, but I can understand if this is too much breakage to endure for a relatively modest improvement in safety.

bgamari avatar Apr 04 '17 17:04 bgamari