Splices returning splices

J. Garrett Morris Garrett.Morris at ed.ac.uk
Mon Mar 23 12:47:15 UTC 2015


I'm attempting to write a quasiquoter with relatively full antiquotation
support.  In doing so, I've arrived at I think an odd problem: the
expression grammar in Language.Haskell.TH.Syntax doesn't seem to include
splices.  This seems to mean that my antiquotations can't themselves
include splices, which is quite limiting.  Am I misinterpreting?  The
type system in "Template metaprogramming for Haskell" seems to imply no
such restriction on the occurrences of splices.

(As an additional complication: what I really need to do is return typed
splices; my "quasiquoter" relies on its expected type to determine its
behavior.  However, this seems like an uninteresting extension of the
above problem.)



The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

More information about the Glasgow-haskell-users mailing list