Split Template Haskell out to its own package and update docs and tests.
# Only include GHCi if we're bootstrapping with at least version 411
ifeq "$(GhcWithInterpreter) $(bootstrapped)" "YES YES"
-# Yes, include the interepreter, readline, and Template Haskell extensions
-SRC_HC_OPTS += -DGHCI -package haskell-src
+# Yes, include the interpreter, readline, and Template Haskell extensions
+SRC_HC_OPTS += -DGHCI -package template-haskell -package haskell-src
ifneq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
SRC_HC_OPTS += -package unix
ifeq "$(GhcLibsWithReadline)" "YES"
tH_LIB_Name = mkModuleName "Language.Haskell.TH.Lib"
thSyn :: Module
--- NB: the TH.Syntax module comes from the "haskell-src" package
+-- NB: the TH.Syntax module comes from the "template-haskell" package
thSyn = mkModule thPackage tH_SYN_Name
thLib = mkModule thPackage tH_LIB_Name
# if defined(mingw32_TARGET_OS) || defined(darwin_TARGET_OS)
= [ ]
# else
- = [ "base", "haskell98", "haskell-src", "readline" ]
+ = [ "base", "haskell98", "template-haskell", "readline" ]
# endif
showLS (Object nm) = "(static) " ++ nm
basePackage = FSLIT("base")
rtsPackage = FSLIT("rts")
haskell98Package = FSLIT("haskell98")
-thPackage = FSLIT("haskell-src") -- Template Haskell libraries in here
+thPackage = FSLIT("template-haskell") -- Template Haskell libraries in here
packageDependents :: PackageConfig -> [PackageName]
-- Impedence matcher, because PackageConfig has Strings
A term in quasi-quote brackets needs to be translated into Core code
that, when executed, yields a <em>representation</em> of that term in
the form of the abstract syntax trees defined in <a
- href="http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/libraries/haskell-src/Language/Haskell/THSyntax.hs"><code>Language.Haskell.THSyntax</code></a>.
+ href="http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/libraries/template-haskell/Language/Haskell/TH/Syntax.hs"><code>Language.Haskell.TH.Syntax</code></a>.
Within <code>DsMeta</code>, this is achieved by four functions
corresponding to the four types of quasi-quote brackets:
<code>repE</code> (for <code>[|...|]</code>), <code>repP</code> (for
type parameter to constrain the contexts in which they are applicable.
For example, a function that builds a Core expression that evaluates to
a TH type representation, which has type
- <code>Language.Haskell.THSyntax.Type</code>, would return a value of
+ <code>Language.Haskell.TH.Syntax.Type</code>, would return a value of
type
</p>
<blockquote>
<pre>
-Core Language.Haskell.THSyntax.Type</pre>
+Core Language.Haskell.TH.Syntax.Type</pre>
</blockquote>
<h3>Desugaring of Reification Operators</h3>
The operator <code>reifyType</code> receives the name of a function or
data constructor as its argument and yields a representation of this
entity's type in the form of a value of type
- <code>THSyntax.Type</code>. Similarly, <code>reifyDecl</code> receives
+ <code>TH.Syntax.Type</code>. Similarly, <code>reifyDecl</code> receives
the name of a type and yields a representation of the type's declaration
- as a value of type <code>THSyntax.Decl</code>. The name of the reified
+ as a value of type <code>TH.Syntax.Decl</code>. The name of the reified
entity is mapped to the GHC-internal representation of the entity by
using the function <code>lookupOcc</code> on the name.
</p>
<p>
During the construction of representations, the desugarer needs to use a
large number of functions defined in the library
- <code>Language.Haskell.THSyntax</code>. The names of these functions
+ <code>Language.Haskell.TH.Syntax</code>. The names of these functions
need to be made available to the compiler in the way outlined <a
href="../the-beast/prelude.html">Primitives and the Prelude.</a>
Unfortunately, any change to <a
# -----------------------------------------------------------------------------
-# $Id: bootstrap.mk,v 1.27 2003/09/02 10:23:30 simonmar Exp $
+# $Id: bootstrap.mk,v 1.28 2004/01/15 14:43:24 igloo Exp $
#
# Makefile rules for booting from .hc files without a driver.
#
endif
HC_BOOT_LD_OPTS = \
+ -L$(FPTOOLS_TOP_ABS)/libraries/haskell-src \
-L$(FPTOOLS_TOP_ABS)/ghc/rts \
$(DASH_L_GHC_RTS_GMP_DIR) \
-L$(FPTOOLS_TOP_ABS)/libraries/base \
ifeq "$(GhcWithInterpreter)" "YES"
HC_BOOT_LD_OPTS += \
- -L$(FPTOOLS_TOP_ABS)/libraries/haskell-src \
+ -L$(FPTOOLS_TOP_ABS)/libraries/template-haskell \
-L$(FPTOOLS_TOP_ABS)/libraries/readline \
-L$(FPTOOLS_TOP_ABS)/libraries/unix \
-L$(FPTOOLS_TOP_ABS)/libraries/unix/cbits
HC_BOOT_LIBS =
ifeq "$(GhcWithInterpreter)" "YES"
-HC_BOOT_LIBS += -lHSreadline -lHShaskell-src -lHSunix -lHSunix_cbits
+HC_BOOT_LIBS += -lHSreadline -lHStemplate-haskell -lHSunix -lHSunix_cbits
endif
-HC_BOOT_LIBS += -lHShaskell98 -lHSbase -lHSbase_cbits -lHSrts -lgmp -lm $(EXTRA_HC_BOOT_LIBS)
+HC_BOOT_LIBS += -lHShaskell98 -lHShaskell-src -lHSbase -lHSbase_cbits -lHSrts -lgmp -lm $(EXTRA_HC_BOOT_LIBS)
ifeq "$(GhcLibsWithReadline)" "YES"
HC_BOOT_LIBS += $(patsubst %, -l%, $(LibsReadline))