th-lego 0.3 → 0.3.0.1
raw patch · 4 files changed
+12/−14 lines, 4 filessetup-changedPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Setup.hs +0/−2
- library/THLego/Instances.hs +3/−3
- library/THLego/Lambdas.hs +8/−8
- th-lego.cabal +1/−1
− Setup.hs
@@ -1,2 +0,0 @@-import Distribution.Simple-main = defaultMain
library/THLego/Instances.hs view
@@ -250,7 +250,7 @@ [matching, unmatching] where matching =- Clause [ConP constructorName []] (NormalB bodyExp) []+ Clause [Compat.conp constructorName []] (NormalB bodyExp) [] where bodyExp = ConE 'True@@ -294,7 +294,7 @@ memberTypes & mapWithAlphabeticName (const . id) matching =- Clause [ConP constructorName pats] (NormalB bodyExp) []+ Clause [Compat.conp constructorName pats] (NormalB bodyExp) [] where pats = fmap VarP varNames@@ -327,7 +327,7 @@ hasField fieldLabel ownerType projectionType getFieldFunClauses where getFieldFunClauses =- [Clause [ConP constructorName pats] (NormalB bodyExp) []]+ [Clause [Compat.conp constructorName pats] (NormalB bodyExp) []] where pats = replicate offset WildP
library/THLego/Lambdas.hs view
@@ -31,7 +31,7 @@ onMemberP = VarP onMemberName productP =- ConP conName pats+ Compat.conp conName pats where pats = fmap VarP memberNames@@ -79,7 +79,7 @@ varName = alphabeticIndexName index pat =- ConP conName pats+ Compat.conp conName pats where pats = replicate index WildP@@ -110,7 +110,7 @@ memberNames = fmap alphabeticIndexName (enumFromTo 0 (pred numMembers)) stateP =- ConP conName pats+ Compat.conp conName pats where pats = (memberNames & take index & fmap VarP)@@ -149,7 +149,7 @@ mapperP = VarP fnName stateP =- ConP conName pats+ Compat.conp conName pats where pats = fmap VarP memberNames@@ -182,7 +182,7 @@ [pos, neg] where pos =- Match (ConP conName memberPats) (NormalB bodyExp) []+ Match (Compat.conp conName memberPats) (NormalB bodyExp) [] where memberVarNames = fmap alphabeticIndexName (enumFromTo 0 (pred numMembers))@@ -200,7 +200,7 @@ matcher [positive, negative] where positive =- Match (ConP conName (fmap VarP varNames)) (NormalB exp) []+ Match (Compat.conp conName (fmap VarP varNames)) (NormalB exp) [] where varNames = fmap alphabeticIndexName (enumFromTo 0 (pred numMembers))@@ -214,7 +214,7 @@ matcher [positive, negative] where positive =- Match (ConP constructorName []) (NormalB bodyExp) []+ Match (Compat.conp constructorName []) (NormalB bodyExp) [] where bodyExp = ConE 'True@@ -231,7 +231,7 @@ varNames = fmap alphabeticIndexName (enumFromTo 0 (pred numMembers)) pat =- ConP conName (fmap VarP varNames)+ Compat.conp conName (fmap VarP varNames) exp = Compat.tupE (fmap VarE varNames)
th-lego.cabal view
@@ -1,5 +1,5 @@ name: th-lego-version: 0.3+version: 0.3.0.1 synopsis: Template Haskell construction utilities description: A collection of templates for the typical patterns appearing