Commit f2ab3a4f authored by igloo's avatar igloo

[project @ 2004-01-15 14:43:24 by igloo]

Split Template Haskell out to its own package and update docs and tests.
parent 4ddda6e6
......@@ -32,7 +32,7 @@ class C a where
test :: ()
test = $(let
display :: Name -> Q ()
display q = do { i <- reify q; report False (render (pprInfo i)) }
display q = do { i <- reify q; report False (pprint i) }
in do { display ''T
; display ''R
; display ''List
......
TH_reifyDecl1.hs:33: data TH_reifyDecl1.T = TH_reifyDecl1.A | TH_reifyDecl1.B
TH_reifyDecl1.hs:33:9: data TH_reifyDecl1.T = TH_reifyDecl1.A | TH_reifyDecl1.B
TH_reifyDecl1.hs:33:
data TH_reifyDecl1.R a_1627393115 = TH_reifyDecl1.C a_1627393115
| TH_reifyDecl1.D
TH_reifyDecl1.hs:33:9:
data TH_reifyDecl1.R a_0 = TH_reifyDecl1.C a_0 | TH_reifyDecl1.D
TH_reifyDecl1.hs:33:
data TH_reifyDecl1.List a_1627393111 = TH_reifyDecl1.Nil
| TH_reifyDecl1.Cons a_1627393111 TH_reifyDecl1.List a_1627393111
TH_reifyDecl1.hs:33:9:
data TH_reifyDecl1.List a_0 = TH_reifyDecl1.Nil
| TH_reifyDecl1.Cons a_0 TH_reifyDecl1.List a_0
TH_reifyDecl1.hs:33:
data TH_reifyDecl1.Tree a_1627393107 = TH_reifyDecl1.Leaf
| TH_reifyDecl1.:+: TH_reifyDecl1.Tree a_1627393107 TH_reifyDecl1.Tree a_1627393107
TH_reifyDecl1.hs:33:9:
data TH_reifyDecl1.Tree a_0 = TH_reifyDecl1.Leaf
| TH_reifyDecl1.:+: TH_reifyDecl1.Tree a_0 TH_reifyDecl1.Tree a_0
TH_reifyDecl1.hs:33: type TH_reifyDecl1.IntList = GHC.Base.[] GHC.Base.Int
TH_reifyDecl1.hs:33:9: type TH_reifyDecl1.IntList = GHC.Base.[] GHC.Base.Int
TH_reifyDecl1.hs:33:
TH_reifyDecl1.hs:33:9:
newtype TH_reifyDecl1.Length = TH_reifyDecl1.Length GHC.Base.Int
TH_reifyDecl1.hs:33:
Constructor from TH_reifyDecl1.Tree: TH_reifyDecl1.Leaf :: forall a_1627393107 . TH_reifyDecl1.Tree a_1627393107
TH_reifyDecl1.hs:33:9:
Constructor from TH_reifyDecl1.Tree: TH_reifyDecl1.Leaf :: forall a_0 . TH_reifyDecl1.Tree a_0
TH_reifyDecl1.hs:33:
Class op from TH_reifyDecl1.C: TH_reifyDecl1.m :: forall a_1627393101 . (TH_reifyDecl1.C a_1627393101) => a_1627393101 ->
GHC.Base.Int
TH_reifyDecl1.hs:33:9:
Class op from TH_reifyDecl1.C: TH_reifyDecl1.m :: forall a_0 . TH_reifyDecl1.C a_0 => a_0 ->
GHC.Base.Int
infixl 3 TH_reifyDecl1.m
Loading package base ... linking ... done.
Loading package haskell98 ... linking ... done.
Loading package haskell-src ... linking ... done.
Loading package template-haskell ... linking ... done.
......@@ -12,17 +12,17 @@ import System.IO
main :: IO ()
main = do putStrLn $ show $ $( do e <- [| I# 20# |]
runIO $ putStrLn $ show e
runIO $ putStrLn $ render $ pprExp e
runIO $ putStrLn $ pprint e
runIO $ hFlush stdout
return e )
putStrLn $ show $ $( do e <- [| F# 12.3# |]
runIO $ putStrLn $ show e
runIO $ putStrLn $ render $ pprExp e
runIO $ putStrLn $ pprint e
runIO $ hFlush stdout
return e )
putStrLn $ show $ $( do e <- [| D# 24.6## |]
runIO $ putStrLn $ show e
runIO $ putStrLn $ render $ pprExp e
runIO $ putStrLn $ pprint e
runIO $ hFlush stdout
return e )
......@@ -6,4 +6,4 @@ AppE (ConE GHC.Float.D#) (LitE (DoublePrimL (123 % 5)))
GHC.Float.D# 24.6##
Loading package base ... linking ... done.
Loading package haskell98 ... linking ... done.
Loading package haskell-src ... linking ... done.
Loading package template-haskell ... linking ... done.
Loading package base ... linking ... done.
Loading package haskell98 ... linking ... done.
Loading package haskell-src ... linking ... done.
Loading package template-haskell ... linking ... done.
def f(opts):
opts.extra_hc_opts = '-fth -package haskell-src'
opts.extra_hc_opts = '-fth -package template-haskell'
setTestOpts(f)
setTestOpts(only_ways(['normal']));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment