Commit 9caca0a3 authored by gmainland's avatar gmainland
Browse files

Make a TExp a wrap a TH.Exp instead of a TH.ExpQ.

We also provide two new helper functions:

  unTypeQ :: Q (TExp a) -> Q Exp

  unsafeTExpCoerce :: Q Exp -> Q (TExp a)
parent 4d226b32
......@@ -145,7 +145,15 @@ instance Applicative Q where
--
-----------------------------------------------------
newtype TExp a = TExp { unType :: Q Exp }
newtype TExp a = TExp { unType :: Exp }
unTypeQ :: Q (TExp a) -> Q Exp
unTypeQ m = do { TExp e <- m
; return e }
unsafeTExpCoerce :: Q Exp -> Q (TExp a)
unsafeTExpCoerce m = do { e <- m
; return (TExp e) }
----------------------------------------------------
-- Packaged versions for the programmer, hiding the Quasi-ness
......
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