th-lego 0.2.1 → 0.2.2
raw patch · 2 files changed
+8/−2 lines, 2 files
Files
- library/THLego/Lambdas.hs +7/−1
- th-lego.cabal +1/−1
library/THLego/Lambdas.hs view
@@ -202,7 +202,7 @@ memberPats = fmap VarP memberVarNames bodyExp =- AppE (tupleToProduct conName numMembers)+ AppE (tupleOrSingletonToProduct conName numMembers) (multiAppE (VarE fnName) (fmap VarE memberVarNames)) neg = Match (VarP aName) (NormalB (VarE aName)) []@@ -257,6 +257,12 @@ TupP (fmap VarP varNames) exp = multiAppE (ConE conName) (fmap VarE varNames)++tupleOrSingletonToProduct :: Name -> Int -> Exp+tupleOrSingletonToProduct conName numMembers =+ if numMembers == 1+ then ConE conName+ else tupleToProduct conName numMembers namedFieldSetter :: Name -> Exp namedFieldSetter fieldName =
th-lego.cabal view
@@ -1,5 +1,5 @@ name: th-lego-version: 0.2.1+version: 0.2.2 synopsis: Template Haskell construction utilities description: A collection of templates for the typical patterns appearing