Commit 5c459eef authored by Edward Z. Yang's avatar Edward Z. Yang

Revert stage 1 template-haskell. This is a combination of 5 commits.

Revert "Quick fix: drop base bound on template-haskell."

This reverts commit 3c70ae03.

Revert "Always do polymorphic typed quote check, c.f. #10384"

This reverts commit 9a43b2c1.

Revert "RnSplice's staging test should be applied for quotes in stage1."

This reverts commit eb0ed403.

Revert "Split off quotes/ from th/ for tests that can be done on stage1 compiler."

This reverts commit 21c72e7d.

Revert "Support stage 1 Template Haskell (non-quasi) quotes, fixes #10382."

This reverts commit 28257cae.
parent 3c70ae03
......@@ -24,7 +24,11 @@ import Name
import NameEnv
import FamInstEnv( topNormaliseType )
#ifdef GHCI
-- Template Haskell stuff iff bootstrapped
import DsMeta
#endif
import HsSyn
import Platform
......@@ -641,7 +645,11 @@ dsExpr expr@(RecordUpd record_expr (HsRecFields { rec_flds = fields })
-- Template Haskell stuff
dsExpr (HsRnBracketOut _ _) = panic "dsExpr HsRnBracketOut"
#ifdef GHCI
dsExpr (HsTcBracketOut x ps) = dsBracket x ps
#else
dsExpr (HsTcBracketOut _ _) = panic "dsExpr HsBracketOut"
#endif
dsExpr (HsSpliceE s) = pprPanic "dsExpr:splice" (ppr s)
-- Arrow notation extension
......
......@@ -52,7 +52,6 @@ Library
containers >= 0.5 && < 0.6,
array >= 0.1 && < 0.6,
filepath >= 1 && < 1.5,
template-haskell,
hpc,
transformers,
bin-package-db,
......@@ -66,6 +65,7 @@ Library
GHC-Options: -Wall -fno-warn-name-shadowing
if flag(ghci)
Build-Depends: template-haskell
CPP-Options: -DGHCI
Include-Dirs: ../rts/dist/build @FFIIncludeDir@
......@@ -164,7 +164,6 @@ Library
IdInfo
Lexeme
Literal
DsMeta
Llvm
Llvm.AbsSyn
Llvm.MetaData
......@@ -567,6 +566,7 @@ Library
if flag(ghci)
Exposed-Modules:
DsMeta
Convert
ByteCodeAsm
ByteCodeGen
......
......@@ -3008,7 +3008,7 @@ fLangFlags = [
-- See Note [Supporting CLI completion]
flagSpec' "th" Opt_TemplateHaskell
(\on -> deprecatedForExtension "TemplateHaskell" on
>> setTemplateHaskellLoc on),
>> checkTemplateHaskellOk on),
flagSpec' "fi" Opt_ForeignFunctionInterface
(deprecatedForExtension "ForeignFunctionInterface"),
flagSpec' "ffi" Opt_ForeignFunctionInterface
......@@ -3178,7 +3178,7 @@ xFlags = [
flagSpec "StandaloneDeriving" Opt_StandaloneDeriving,
flagSpec "StaticPointers" Opt_StaticPointers,
flagSpec' "TemplateHaskell" Opt_TemplateHaskell
setTemplateHaskellLoc,
checkTemplateHaskellOk,
flagSpec "TraditionalRecordSyntax" Opt_TraditionalRecordSyntax,
flagSpec "TransformListComp" Opt_TransformListComp,
flagSpec "TupleSections" Opt_TupleSections,
......@@ -3499,9 +3499,28 @@ setIncoherentInsts True = do
l <- getCurLoc
upd (\d -> d { incoherentOnLoc = l })
setTemplateHaskellLoc :: TurnOnFlag -> DynP ()
setTemplateHaskellLoc _
checkTemplateHaskellOk :: TurnOnFlag -> DynP ()
#ifdef GHCI
checkTemplateHaskellOk turn_on
| turn_on && rtsIsProfiled
= addErr "You can't use Template Haskell with a profiled compiler"
| otherwise
= getCurLoc >>= \l -> upd (\d -> d { thOnLoc = l })
#else
-- In stage 1, Template Haskell is simply illegal, except with -M
-- We don't bleat with -M because there's no problem with TH there,
-- and in fact GHC's build system does ghc -M of the DPH libraries
-- with a stage1 compiler
checkTemplateHaskellOk turn_on
| turn_on = do dfs <- liftEwM getCmdLineState
case ghcMode dfs of
MkDepend -> return ()
_ -> addErr msg
| otherwise = return ()
where
msg = "Template Haskell requires GHC with interpreter support\n " ++
"Perhaps you are using a stage-1 compiler?"
#endif
{- **********************************************************************
%* *
......
......@@ -94,6 +94,7 @@ import Type ( Type )
import PrelNames
import {- Kind parts of -} Type ( Kind )
import CoreLint ( lintInteractiveExpr )
import DsMeta ( templateHaskellNames )
import VarEnv ( emptyTidyEnv )
import Panic
import ConLike
......@@ -101,7 +102,6 @@ import ConLike
import GHC.Exts
#endif
import DsMeta ( templateHaskellNames )
import Module
import Packages
import RdrName
......@@ -196,7 +196,9 @@ knownKeyNames :: [Name] -- Put here to avoid loops involving DsMeta,
knownKeyNames = -- where templateHaskellNames are defined
map getName wiredInThings
++ basicKnownKeyNames
#ifdef GHCI
++ templateHaskellNames
#endif
-- -----------------------------------------------------------------------------
......
This diff is collapsed.
......@@ -16,7 +16,9 @@ module TcExpr ( tcPolyExpr, tcPolyExprNC, tcMonoExpr, tcMonoExprNC,
#include "HsVersions.h"
import {-# SOURCE #-} TcSplice( tcSpliceExpr, tcTypedBracket, tcUntypedBracket )
#ifdef GHCI
import DsMeta( liftStringName, liftName )
#endif
import HsSyn
import TcHsSyn
......@@ -1232,6 +1234,13 @@ tcTagToEnum loc fun_name arg res_ty
-}
checkThLocalId :: Id -> TcM ()
#ifndef GHCI /* GHCI and TH is off */
--------------------------------------
-- Check for cross-stage lifting
checkThLocalId _id
= return ()
#else /* GHCI and TH is on */
checkThLocalId id
= do { mb_local_use <- getStageAndBindLevel (idName id)
; case mb_local_use of
......@@ -1294,6 +1303,7 @@ checkCrossStageLifting _ _ = return ()
polySpliceErr :: Id -> SDoc
polySpliceErr id
= ptext (sLit "Can't splice the polymorphic local variable") <+> quotes (ppr id)
#endif /* GHCI */
{-
Note [Lifting strings]
......
......@@ -34,14 +34,6 @@ import Name
import TcRnMonad
import TcType
import Outputable
import TcExpr
import SrcLoc
import FastString
import DsMeta
import TcUnify
import TcEnv
#ifdef GHCI
import HscMain
-- These imports are the reason that TcSplice
......@@ -53,11 +45,14 @@ import Convert
import RnExpr
import RnEnv
import RnTypes
import TcExpr
import TcHsSyn
import TcSimplify
import TcUnify
import Type
import Kind
import NameSet
import TcEnv
import TcMType
import TcHsType
import TcIface
......@@ -86,6 +81,7 @@ import DsExpr
import DsMonad
import Serialized
import ErrUtils
import SrcLoc
import Util
import Data.List ( mapAccumL )
import Unique
......@@ -96,7 +92,10 @@ import Maybes( MaybeErr(..) )
import DynFlags
import Panic
import Lexeme
import FastString
import Outputable
import DsMeta
import qualified Language.Haskell.TH as TH
-- THSyntax gives access to internal functions and data types
import qualified Language.Haskell.TH.Syntax as TH
......@@ -130,87 +129,10 @@ tcSpliceExpr :: HsSplice Name -> TcRhoType -> TcM (HsExpr TcId)
-- runQuasiQuoteDecl :: HsQuasiQuote RdrName -> RnM [LHsDecl RdrName]
runAnnotation :: CoreAnnTarget -> LHsExpr Name -> TcM Annotation
{-
************************************************************************
* *
\subsection{Quoting an expression}
* *
************************************************************************
-}
-- See Note [How brackets and nested splices are handled]
-- tcTypedBracket :: HsBracket Name -> TcRhoType -> TcM (HsExpr TcId)
tcTypedBracket brack@(TExpBr expr) res_ty
= addErrCtxt (quotationCtxtDoc brack) $
do { cur_stage <- getStage
; ps_ref <- newMutVar []
; lie_var <- getConstraintVar -- Any constraints arising from nested splices
-- should get thrown into the constraint set
-- from outside the bracket
-- Typecheck expr to make sure it is valid,
-- Throw away the typechecked expression but return its type.
-- We'll typecheck it again when we splice it in somewhere
; (_tc_expr, expr_ty) <- setStage (Brack cur_stage (TcPending ps_ref lie_var)) $
tcInferRhoNC expr
-- NC for no context; tcBracket does that
; meta_ty <- tcTExpTy expr_ty
; co <- unifyType meta_ty res_ty
; ps' <- readMutVar ps_ref
; texpco <- tcLookupId unsafeTExpCoerceName
; return (mkHsWrapCo co (unLoc (mkHsApp (nlHsTyApp texpco [expr_ty])
(noLoc (HsTcBracketOut brack ps'))))) }
tcTypedBracket other_brack _
= pprPanic "tcTypedBracket" (ppr other_brack)
-- tcUntypedBracket :: HsBracket Name -> [PendingRnSplice] -> TcRhoType -> TcM (HsExpr TcId)
tcUntypedBracket brack ps res_ty
= do { traceTc "tc_bracket untyped" (ppr brack $$ ppr ps)
; ps' <- mapM tcPendingSplice ps
; meta_ty <- tcBrackTy brack
; co <- unifyType meta_ty res_ty
; traceTc "tc_bracket done untyped" (ppr meta_ty)
; return (mkHsWrapCo co (HsTcBracketOut brack ps')) }
---------------
tcBrackTy :: HsBracket Name -> TcM TcType
tcBrackTy (VarBr _ _) = tcMetaTy nameTyConName -- Result type is Var (not Q-monadic)
tcBrackTy (ExpBr _) = tcMetaTy expQTyConName -- Result type is ExpQ (= Q Exp)
tcBrackTy (TypBr _) = tcMetaTy typeQTyConName -- Result type is Type (= Q Typ)
tcBrackTy (DecBrG _) = tcMetaTy decsQTyConName -- Result type is Q [Dec]
tcBrackTy (PatBr _) = tcMetaTy patQTyConName -- Result type is PatQ (= Q Pat)
tcBrackTy (DecBrL _) = panic "tcBrackTy: Unexpected DecBrL"
tcBrackTy (TExpBr _) = panic "tcUntypedBracket: Unexpected TExpBr"
---------------
tcPendingSplice :: PendingRnSplice -> TcM PendingTcSplice
tcPendingSplice (PendingRnSplice flavour splice_name expr)
= do { res_ty <- tcMetaTy meta_ty_name
; expr' <- tcMonoExpr expr res_ty
; return (PendingTcSplice splice_name expr') }
where
meta_ty_name = case flavour of
UntypedExpSplice -> expQTyConName
UntypedPatSplice -> patQTyConName
UntypedTypeSplice -> typeQTyConName
UntypedDeclSplice -> decsQTyConName
---------------
-- Takes a type tau and returns the type Q (TExp tau)
tcTExpTy :: TcType -> TcM TcType
tcTExpTy tau
= do { q <- tcLookupTyCon qTyConName
; texp <- tcLookupTyCon tExpTyConName
; return (mkTyConApp q [mkTyConApp texp [tau]]) }
quotationCtxtDoc :: HsBracket Name -> SDoc
quotationCtxtDoc br_body
= hang (ptext (sLit "In the Template Haskell quotation"))
2 (ppr br_body)
#ifndef GHCI
tcTypedBracket x _ = failTH x "Template Haskell bracket"
tcUntypedBracket x _ _ = failTH x "Template Haskell bracket"
tcSpliceExpr e _ = failTH e "Template Haskell splice"
-- runQuasiQuoteExpr q = failTH q "quasiquote"
......@@ -403,8 +325,80 @@ When a variable is used, we compare
g1 = $(map ...) is OK
g2 = $(f ...) is not OK; because we havn't compiled f yet
************************************************************************
* *
\subsection{Quoting an expression}
* *
************************************************************************
-}
-- See Note [How brackets and nested splices are handled]
-- tcTypedBracket :: HsBracket Name -> TcRhoType -> TcM (HsExpr TcId)
tcTypedBracket brack@(TExpBr expr) res_ty
= addErrCtxt (quotationCtxtDoc brack) $
do { cur_stage <- getStage
; ps_ref <- newMutVar []
; lie_var <- getConstraintVar -- Any constraints arising from nested splices
-- should get thrown into the constraint set
-- from outside the bracket
-- Typecheck expr to make sure it is valid,
-- Throw away the typechecked expression but return its type.
-- We'll typecheck it again when we splice it in somewhere
; (_tc_expr, expr_ty) <- setStage (Brack cur_stage (TcPending ps_ref lie_var)) $
tcInferRhoNC expr
-- NC for no context; tcBracket does that
; meta_ty <- tcTExpTy expr_ty
; co <- unifyType meta_ty res_ty
; ps' <- readMutVar ps_ref
; texpco <- tcLookupId unsafeTExpCoerceName
; return (mkHsWrapCo co (unLoc (mkHsApp (nlHsTyApp texpco [expr_ty])
(noLoc (HsTcBracketOut brack ps'))))) }
tcTypedBracket other_brack _
= pprPanic "tcTypedBracket" (ppr other_brack)
-- tcUntypedBracket :: HsBracket Name -> [PendingRnSplice] -> TcRhoType -> TcM (HsExpr TcId)
tcUntypedBracket brack ps res_ty
= do { traceTc "tc_bracket untyped" (ppr brack $$ ppr ps)
; ps' <- mapM tcPendingSplice ps
; meta_ty <- tcBrackTy brack
; co <- unifyType meta_ty res_ty
; traceTc "tc_bracket done untyped" (ppr meta_ty)
; return (mkHsWrapCo co (HsTcBracketOut brack ps')) }
---------------
tcBrackTy :: HsBracket Name -> TcM TcType
tcBrackTy (VarBr _ _) = tcMetaTy nameTyConName -- Result type is Var (not Q-monadic)
tcBrackTy (ExpBr _) = tcMetaTy expQTyConName -- Result type is ExpQ (= Q Exp)
tcBrackTy (TypBr _) = tcMetaTy typeQTyConName -- Result type is Type (= Q Typ)
tcBrackTy (DecBrG _) = tcMetaTy decsQTyConName -- Result type is Q [Dec]
tcBrackTy (PatBr _) = tcMetaTy patQTyConName -- Result type is PatQ (= Q Pat)
tcBrackTy (DecBrL _) = panic "tcBrackTy: Unexpected DecBrL"
tcBrackTy (TExpBr _) = panic "tcUntypedBracket: Unexpected TExpBr"
---------------
tcPendingSplice :: PendingRnSplice -> TcM PendingTcSplice
tcPendingSplice (PendingRnSplice flavour splice_name expr)
= do { res_ty <- tcMetaTy meta_ty_name
; expr' <- tcMonoExpr expr res_ty
; return (PendingTcSplice splice_name expr') }
where
meta_ty_name = case flavour of
UntypedExpSplice -> expQTyConName
UntypedPatSplice -> patQTyConName
UntypedTypeSplice -> typeQTyConName
UntypedDeclSplice -> decsQTyConName
---------------
-- Takes a type tau and returns the type Q (TExp tau)
tcTExpTy :: TcType -> TcM TcType
tcTExpTy tau
= do { q <- tcLookupTyCon qTyConName
; texp <- tcLookupTyCon tExpTyConName
; return (mkTyConApp q [mkTyConApp texp [tau]]) }
{-
************************************************************************
* *
......@@ -475,6 +469,11 @@ tcTopSplice expr res_ty
************************************************************************
-}
quotationCtxtDoc :: HsBracket Name -> SDoc
quotationCtxtDoc br_body
= hang (ptext (sLit "In the Template Haskell quotation"))
2 (ppr br_body)
spliceCtxtDoc :: HsSplice Name -> SDoc
spliceCtxtDoc splice
= hang (ptext (sLit "In the Template Haskell splice"))
......
......@@ -105,12 +105,7 @@
<itemizedlist>
<listitem>
<para>
The <literal>TemplateHaskell</literal> now no longer automatically
errors when used with a stage 1 compiler (i.e. GHC without
interpreter support); in particular, plain
Haskell quotes (not quasi-quotes) can now be compiled without erroring.
Splices and quasi-quotes continue to only be supported by a
stage 2 compiler.
TODO FIXME.
</para>
</listitem>
</itemizedlist>
......
......@@ -9571,8 +9571,8 @@ Typed expression splices and quotations are supported.)
<listitem><para>
If you are building GHC from source, you need at least a stage-2 bootstrap compiler to
run Template Haskell splices and quasi-quotes. A stage-1 compiler will only accept regular quotes of Haskell. Reason: TH splices and quasi-quotes
compile and run a program, and then looks at the result. So it's important that
run Template Haskell. A stage-1 compiler will reject the TH constructs. Reason: TH
compiles and runs a program, and then looks at the result. So it's important that
the program it compiles produces results whose representations are identical to
those of the compiler itself.
</para></listitem>
......
......@@ -386,7 +386,7 @@ else
# programs such as GHC and ghc-pkg, that we do not assume the stage0
# compiler already has installed (or up-to-date enough).
PACKAGES_STAGE0 = binary Cabal/Cabal hpc bin-package-db hoopl transformers template-haskell
PACKAGES_STAGE0 = binary Cabal/Cabal hpc bin-package-db hoopl transformers
ifeq "$(Windows_Host)" "NO"
ifneq "$(HostOS_CPP)" "ios"
PACKAGES_STAGE0 += terminfo
......
......@@ -48,7 +48,7 @@ Library
Language.Haskell.TH.Lib.Map
build-depends:
base,
base == 4.8.*,
pretty == 1.1.*
-- We need to set the package key to template-haskell (without a
......
......@@ -102,7 +102,6 @@ libraries/ghc-prim_dist-install_EXTRA_HC_OPTS += -fno-warn-trustworthy-safe
libraries/Win32_dist-install_EXTRA_HC_OPTS += -fno-warn-trustworthy-safe
# Temporarely disable inline rule shadowing warning
libraries/template-haskell_dist-boot_EXTRA_HC_OPTS += -fno-warn-inline-rule-shadowing
libraries/template-haskell_dist-install_EXTRA_HC_OPTS += -fno-warn-inline-rule-shadowing
# We need -fno-warn-deprecated-flags to avoid failure with -Werror
......
T3572
T8633
TH_ppr1
TH_spliceViewPat/TH_spliceViewPat
TOP=../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
{-# LANGUAGE TemplateHaskell, RankNTypes, ScopedTypeVariables #-}
module A where
x = \(y :: forall a. a -> a) -> [|| y ||]
T10384.hs:3:37: error:
Can't splice the polymorphic local variable ‘y’
In the Template Haskell quotation [|| y ||]
In the expression: [|| y ||]
In the expression: \ (y :: forall a. a -> a) -> [|| y ||]
module TH_localname where
x = \y -> [| y |]
TH_localname.hs:3:11: error:
No instance for (Lift t0) arising from a use of ‘lift’
The type variable ‘t0’ is ambiguous
Relevant bindings include
y :: t0 (bound at TH_localname.hs:3:6)
x :: t0 -> ExpQ (bound at TH_localname.hs:3:1)
Note: there are several potential instances:
instance (Lift a, Lift b) => Lift (Either a b)
-- Defined in ‘Language.Haskell.TH.Syntax’
instance Lift a => Lift (Maybe a)
-- Defined in ‘Language.Haskell.TH.Syntax’
instance Lift Int16 -- Defined in ‘Language.Haskell.TH.Syntax’
...plus 24 others
In the expression: lift y
In the expression:
[| y |]
pending(rn) [<y, lift y>]
In the expression:
\ y
-> [| y |]
pending(rn) [<y, lift y>]
def f(name, opts):
opts.extra_hc_opts = '-XTemplateHaskell -package template-haskell'
setTestOpts(f)
test('T2632', normal, compile, [''])
test('T2931', normal, compile, ['-v0'])
test('T3572', normal, compile_and_run, [''])
test('T4056', normal, compile, ['-v0'])
test('T4169', normal, compile, ['-v0'])
test('T4170', normal, compile, ['-v0'])
test('T5721', normal, compile, ['-v0'])
test('T6062', normal, compile, ['-v0'])
test('T8455', normal, compile, ['-v0'])
test('T8633', normal, compile_and_run, [''])
test('T8759a', normal, compile_fail, ['-v0'])
test('T9824', normal, compile, ['-v0'])
test('T10384', normal, compile_fail, [''])
test('TH_tf2', normal, compile, ['-v0'])
test('TH_ppr1', normal, compile_and_run, [''])
test('TH_bracket1', normal, compile, [''])
test('TH_bracket2', normal, compile, [''])
test('TH_bracket3', normal, compile, [''])
test('TH_scope', normal, compile, [''])
test('TH_reifyType1', normal, compile, [''])
test('TH_reifyType2', normal, compile, [''])
test('TH_repE1', normal, compile, [''])
test('TH_repE3', normal, compile, [''])
test('TH_abstractFamily', normal, compile_fail, [''])
test('TH_localname', normal, compile_fail, [''])
{-# LANGUAGE TemplateHaskell #-}
-- Trac #2632
module MkData where
......
{-# LANGUAGE TemplateHaskell #-}
-- Trac #2931
module Foo where
......
{-# LANGUAGE TypeFamilies, RankNTypes, FlexibleContexts #-}
{-# LANGUAGE TemplateHaskell, TypeFamilies, RankNTypes, FlexibleContexts #-}
module T4056 where
import Language.Haskell.TH
......
{-# LANGUAGE TemplateHaskell #-}
-- Crashed GHC 6.12
module T4165 where
......
{-# LANGUAGE TemplateHaskell #-}
module T4170 where
import Language.Haskell.TH
......
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell, ScopedTypeVariables #-}
module T5371 where
import Language.Haskell.TH
......
{-# LANGUAGE TemplateHaskell #-}
module T6062 where
x = [| False True |]
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TemplateHaskell, DataKinds #-}
module T8455 where
......
module Main where
import Language.Haskell.TH.Syntax
t1 = case mkName "^.." of
Name (OccName ".") (NameQ (ModName "^")) -> error "bug0"
Name (OccName "^..") NameS -> return ()
t2 = case mkName "Control.Lens.^.." of
Name (OccName ".") (NameQ (ModName "Control.Lens.^")) -> error "bug1"
Name (OccName "^..") (NameQ (ModName "Control.Lens")) -> return ()
t3 = case mkName "Data.Bits..&." of
Name (OccName ".&.") (NameQ (ModName "Data.Bits")) -> return ()
t4 = case mkName "abcde" of
Name (OccName "abcde") NameS -> return ()
main :: IO ()
main = do t1; t2; t3; t4
module Main where
import Language.Haskell.TH.Syntax
t1 = case mkName "^.." of
Name (OccName ".") (NameQ (ModName "^")) -> error "bug0"
Name (OccName "^..") NameS -> return ()
t2 = case mkName "Control.Lens.^.." of
Name (OccName ".") (NameQ (ModName "Control.Lens.^")) -> error "bug1"
Name (OccName "^..") (NameQ (ModName "Control.Lens")) -> return ()
t3 = case mkName "Data.Bits..&." of
Name (OccName ".&.") (NameQ (ModName "Data.Bits")) -> return ()
t4 = case mkName "abcde" of
Name (OccName "abcde") NameS -> return ()
main :: IO ()
main = do t1; t2; t3; t4
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE TemplateHaskell, PatternSynonyms #-}
module T8759a where
......
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -fwarn-unused-matches #-}
module T9824 where
......
def f(name, opts):
opts.extra_hc_opts = '-XTemplateHaskell -package template-haskell'
if (ghc_with_interpreter == 0):
opts.skip = 1
setTestOpts(f)
setTestOpts(only_compiler_types(['ghc']))
setTestOpts(only_ways(['normal','ghci']))
setTestOpts(when(compiler_profiled(), skip))
test('TH_spliceViewPat',
extra_clean(['Main.o', 'Main.hi', 'A.o', 'A.hi']),
......
# NOTICE TO DEVELOPERS
# ~~~~~~~~~~~~~~~~~~~~
# Adding a TemplateHaskell test? If it only contains (non-quasi) quotes
# and no splices, consider adding it to the quotes/ directory instead
# of the th/ directory; this way, we can test it on the stage 1 compiler too!
# This test needs to come before the setTestOpts calls below, as we want
# to run it if compiler_profiled.
......@@ -21,7 +16,9 @@ setTestOpts(when(compiler_profiled(), skip))
test('TH_mkName', normal, compile, ['-v0'])
test('TH_1tuple', normal, compile_fail, ['-v0'])
test('TH_repE1', normal, compile, [''])
test('TH_repE2', normal, compile_and_run, [''])
test('TH_repE3', normal, compile, [''])
test('TH_repPrim', normal, compile, ['-v0'])
test('TH_repPrim2', normal, compile, ['-v0'])
test('TH_repUnboxedTuples', normal, compile, ['-v0'])
......@@ -70,6 +67,8 @@ test('TH_spliceD2',
test('TH_reifyDecl1', normal, compile, ['-v0'])
test('TH_reifyDecl2', normal, compile, ['-v0'])
test('TH_reifyType1', normal, compile, [''])
test('TH_reifyType2', normal, compile, [''])
test('TH_reifyMkName', normal, compile, ['-v0'])
test('TH_reifyInstances', normal, compile, ['-v0'])
......@@ -100,6 +99,10 @@ test('TH_spliceExpr1', normal, compile, ['-v0'])
test('TH_spliceE3', normal,</