ghc-internal-9.1500.0: Basic libraries
Safe HaskellTrustworthy
LanguageHaskell2010

GHC.Internal.TH.Quote

Description

Template Haskell supports quasiquoting, which permits users to construct program fragments by directly writing concrete syntax. A quasiquoter is essentially a function with takes a string to a Template Haskell AST. This module defines the QuasiQuoter datatype, which specifies a quasiquoter q which can be invoked using the syntax [q| ... string to parse ... |] when the QuasiQuotes language extension is enabled, and some utility functions for manipulating quasiquoters. Nota bene: this package does not define any parsers, that is up to you.

This is an internal module. Please import Quote instead.

Synopsis

Documentation

data QuasiQuoter Source #

The QuasiQuoter type, a value q of this type can be used in the syntax [q| ... string to parse ...|]. In fact, for convenience, a QuasiQuoter actually defines multiple quasiquoters to be used in different splice contexts. In the usual case of a QuasiQuoter that is only intended to be used in certain splice contexts, the unused fields should just fail. This is most easily accomplished using namedefaultQuasiQuoter or defaultQuasiQuoter.

Constructors

QuasiQuoter 

Fields