th-lift 0.3 → 0.3.1
raw patch · 3 files changed
+13/−1 lines, 3 filesnew-uploaderPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Changelog +5/−0
- Language/Haskell/TH/Lift.hs +7/−0
- th-lift.cabal +1/−1
Changelog view
@@ -1,3 +1,8 @@+2010-08-06 Ki Yung Ahn <kya@pdx.edu>++ * Backport patch to 0.3 since 0.4 doesn't work on ghc-6.12+ * infix operator seems to work but not the record+ 2010-03-24 Mathieu Boespflug <mboes@tweag.net> * Port to Template Haskell 2.4.
Language/Haskell/TH/Lift.hs view
@@ -29,6 +29,13 @@ args = [ [| lift $(varE (mkName n)) |] | n <- ns ] e = foldl (\e1 e2 -> [| appE $e1 $e2 |]) con args clause [conP c (map (varP . mkName) ns)] (normalB e) []+-- doCons (RecC c sts) = doCons $ NormalC c [(s, t) | (_, s, t) <- sts]+doCons (InfixC sty1 c sty2) = do+ let con = [| conE c |]+ left = [| lift $(varE (mkName "x0")) |]+ right = [| lift $(varE (mkName "x1")) |]+ e = [| infixApp $left $con $right |]+ clause [infixP (varP (mkName "x0")) c (varP (mkName "x1"))] (normalB e) [] doCons c = error (modName ++ ".doCons: Unhandled constructor: " ++ pprint c) instance Lift Name where
th-lift.cabal view
@@ -1,5 +1,5 @@ Name: th-lift-Version: 0.3+Version: 0.3.1 Cabal-Version: >= 1.3 License: OtherLicense License-File: COPYING