Repository : ssh://darcs.haskell.org//srv/darcs/packages/template-haskell

On branch  : th-new

http://hackage.haskell.org/trac/ghc/changeset/79c6851ca5126532bf3d7605f73e95b9207281bc

>---------------------------------------------------------------

commit 79c6851ca5126532bf3d7605f73e95b9207281bc
Author: Geoffrey Mainland <[email protected]>
Date:   Wed Apr 24 14:11:04 2013 +0100

    Add TExp data type.

>---------------------------------------------------------------

 Language/Haskell/TH.hs        |    3 +++
 Language/Haskell/TH/Syntax.hs |    8 ++++++++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/Language/Haskell/TH.hs b/Language/Haskell/TH.hs
index a435f66..b1c732f 100644
--- a/Language/Haskell/TH.hs
+++ b/Language/Haskell/TH.hs
@@ -31,6 +31,9 @@ module Language.Haskell.TH(
        reifyInstances,
        isInstance,
 
+       -- * Typed expressions
+       TExp, unType,
+
        -- * Names
        Name, NameSpace,        -- Abstract
        -- ** Constructing names
diff --git a/Language/Haskell/TH/Syntax.hs b/Language/Haskell/TH/Syntax.hs
index 62b1999..6bb2787 100644
--- a/Language/Haskell/TH/Syntax.hs
+++ b/Language/Haskell/TH/Syntax.hs
@@ -141,6 +141,14 @@ instance Applicative Q where
   pure x = Q (pure x) 
   Q f <*> Q x = Q (f <*> x) 
 
+-----------------------------------------------------
+--
+--             The TExp type
+--
+-----------------------------------------------------
+
+newtype TExp a = TExp { unType :: Q Exp }
+
 ----------------------------------------------------
 -- Packaged versions for the programmer, hiding the Quasi-ness
 



_______________________________________________
ghc-commits mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/ghc-commits

Reply via email to