th-reify-many 0.1.4.1 → 0.1.5
raw patch · 3 files changed
+17/−7 lines, 3 filesdep ~template-haskelldep ~th-expand-synsPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: template-haskell, th-expand-syns
API changes (from Hackage documentation)
Files
- src/Language/Haskell/TH/ReifyMany.hs +15/−5
- src/Language/Haskell/TH/ReifyMany/Internal.hs +1/−1
- th-reify-many.cabal +1/−1
src/Language/Haskell/TH/ReifyMany.hs view
@@ -94,11 +94,21 @@ -> Q [(Name, Info)] reifyManyTyCons recurse = reifyMany recurse' where- recurse' (name, TyConI dec) = recurse (name, dec)- recurse' (_, PrimTyConI {}) = return (False, [])- recurse' (_, info) = do- report True $ "Unexpected info type in reifyManyTyCons: " ++ show info- return (False, [])+ recurse' (name, info) = do+ let skip thing = do+ reportWarning $ "reifyManyTyCons skipping " ++ thing ++ " named " ++ pprint name+ return (False, [])+ unexpected thing = do+ fail $ "reifyManyTyCons encountered unexpected " ++ thing ++ " named " ++ pprint name+ case info of+ TyConI dec -> recurse (name, dec)+ PrimTyConI{} -> skip "prim type constructor"+ FamilyI{} -> skip "type or data family"+ DataConI{} -> skip "data constructor"+ ClassI{} -> skip "class"+ ClassOpI{} -> unexpected "class method"+ VarI{} -> unexpected "value variable"+ TyVarI{} -> unexpected "type variable" -- | Starting from a set of initial top level declarations, specified -- by @[Name]@, recursively enumerate other related declarations. The
src/Language/Haskell/TH/ReifyMany/Internal.hs view
@@ -100,7 +100,7 @@ -- the given 'TypeclassInstance'. instanceMatches :: TypeclassInstance -> Name -> Bool instanceMatches (TypeclassInstance _ typ _) n' =- case tailMay $ map (headMay . unAppsT) $ unAppsT typ of+ case tailMay $ map (headMay . unAppsT) $ unAppsT typ of Nothing -> False Just xs -> not $ null [() | Just (ConT n) <- xs, n == n']
th-reify-many.cabal view
@@ -1,5 +1,5 @@ name: th-reify-many-version: 0.1.4.1+version: 0.1.5 synopsis: Recurseively reify template haskell datatype info description: @th-reify-many@ provides functions for recursively reifying top