packages feed

generic-accessors 0.6.1.0 → 0.6.2.0

raw patch · 3 files changed

+16/−3 lines, 3 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Accessors.Dynamic: diffDTrees :: DTree -> DTree -> [String]
+ Accessors.Dynamic: diffDTrees :: String -> DTree -> DTree -> [String]

Files

CHANGELOG.md view
@@ -1,3 +1,11 @@+0.6.2.0+---+* bugfix diffDTree++0.6.1.0+---+* add diffDTree+ 0.6.0.1 --- * spatial-math.0.3.0.0 compatability
generic-accessors.cabal view
@@ -1,5 +1,5 @@ name:                generic-accessors-version:             0.6.1.0+version:             0.6.2.0 synopsis:            stringly-named getters for generic data license:             BSD3 license-file:        LICENSE
src/Accessors/Dynamic.hs view
@@ -223,8 +223,8 @@   " got incompatible dynamic DField " ++ describeDField d  -diffDTrees :: DTree -> DTree -> [String]-diffDTrees = diffDTrees' []+diffDTrees :: String -> DTree -> DTree -> [String]+diffDTrees rootName = diffDTrees' [rootName]  showName :: [String] -> String showName = intercalate "." . reverse@@ -287,6 +287,11 @@         | otherwise -> [showName name ++ " has different types"]       (Record x, Record y)         | map fst x /= map fst y -> [showName name ++ " has different types"]+        | otherwise ->+            let diffChild (nx, x') (ny, y')+                  | nx == ny = diffDTrees' (nx:name) x' y'+                  | otherwise = error $ "internal error: record names don't match " ++ show (nx, ny)+            in concat $ zipWith diffChild x y       _ -> [showName name ++ " has different types"] diffDData name _ _ = [showName name ++ " has different types"]