<s>
Template	B-Application
Haskell	I-Application
is	O
an	O
experimental	O
language	O
extension	O
to	O
the	O
Haskell	B-Language
programming	I-Language
language	I-Language
implemented	O
in	O
the	B-Application
Glasgow	I-Application
Haskell	I-Application
Compiler	I-Application
(	O
version	O
6	O
and	O
later	O
)	O
.	O
</s>
<s>
In	O
early	O
incarnations	O
it	O
was	O
also	O
known	O
as	O
Template	O
Meta-Haskell	O
.	O
</s>
<s>
It	O
allows	O
compile-time	O
metaprogramming	B-Application
and	O
generative	O
programming	O
by	O
means	O
of	O
manipulating	O
abstract	B-Data_Structure
syntax	I-Data_Structure
trees	I-Data_Structure
and	O
'	O
splicing	O
 '	O
results	O
back	O
into	O
a	O
program	O
.	O
</s>
<s>
The	O
abstract	O
syntax	O
is	O
represented	O
using	O
ordinary	O
Haskell	B-Language
data	O
types	O
and	O
the	O
manipulations	O
are	O
performed	O
using	O
ordinary	O
Haskell	B-Language
functions	O
.	O
</s>
<s>
'	O
Quasi-quote	O
'	O
brackets	O
[ |	O
and	O
| ]	O
are	O
used	O
to	O
get	O
the	O
abstract	B-Data_Structure
syntax	I-Data_Structure
tree	I-Data_Structure
for	O
the	O
enclosed	O
expression	O
and	O
'	O
splice	O
 '	O
brackets	O
$( 	O
and	O
)	O
are	O
used	O
to	O
convert	O
from	O
abstract	B-Data_Structure
syntax	I-Data_Structure
tree	I-Data_Structure
into	O
code	O
.	O
</s>
<s>
As	O
of	O
GHC-6.10	O
,	O
Template	B-Application
Haskell	I-Application
provides	O
support	O
for	O
user-defined	O
quasi-quoters	O
,	O
which	O
allows	O
users	O
to	O
write	O
parsers	O
which	O
can	O
generate	O
Haskell	B-Language
code	O
from	O
an	O
arbitrary	O
syntax	O
.	O
</s>
<s>
For	O
example	O
,	O
using	O
a	O
custom	O
quasi-quoter	O
for	O
regular	B-Language
expressions	I-Language
could	O
look	O
like	O
this	O
:	O
</s>
