generic-accessors 0.1.0.0 → 0.1.0.1
raw patch · 2 files changed
+6/−4 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- generic-accessors.cabal +1/−1
- src/Accessors.hs +5/−3
generic-accessors.cabal view
@@ -1,5 +1,5 @@ name: generic-accessors-version: 0.1.0.0+version: 0.1.0.1 synopsis: stringly-named getters for generic data license: BSD3 license-file: LICENSE
src/Accessors.hs view
@@ -24,7 +24,7 @@ import Foreign.C.Types import SpatialMath ( Euler )-import SpatialMathT ( V3T, Rot )+import SpatialMathT ( V3T(..), Rot(..) ) showAccTree :: String -> AccessorTree a -> [String] showAccTree spaces (ATGetter _) = [spaces ++ "ATGetter {}"]@@ -240,8 +240,10 @@ toAccessorTree _ f = ATGetter $ realToFrac . f -- other types-instance Lookup a => Lookup (Rot f1 f2 a)-instance Lookup a => Lookup (V3T f a)+instance Lookup a => Lookup (Rot f1 f2 a) where+ toAccessorTree x f = toAccessorTree (unR x) (unR . f)+instance Lookup a => Lookup (V3T f a) where+ toAccessorTree x f = toAccessorTree (unV x) (unV . f) instance Lookup a => Lookup (Euler a) showAccTrees :: (Double -> String) -> a -> [(String, AccessorTree a)] -> String -> [String]