Plot-ho-matic 0.5.0.4 → 0.5.0.5
raw patch · 3 files changed
+15/−4 lines, 3 filesdep ~generic-accessorsPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: generic-accessors
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- Plot-ho-matic.cabal +2/−2
- src/PlotHo.hs +9/−2
CHANGELOG.md view
@@ -35,3 +35,7 @@ 0.5.0.4 --- * Performance improvement++0.5.0.5+---+* Compatability with generic-accessors 0.2
Plot-ho-matic.cabal view
@@ -1,5 +1,5 @@ name: Plot-ho-matic-version: 0.5.0.4+version: 0.5.0.5 synopsis: Real-time line plotter for protobuf-like data license: BSD3 license-file: LICENSE@@ -39,7 +39,7 @@ , Chart-cairo >= 1.1 , cairo , text- , generic-accessors >= 0.1.0.1+ , generic-accessors >= 0.2.0 ghc-options: -O2 -Wall ghc-prof-options: -O2 -Wall -prof -fprof-auto -fprof-cafs -rtsopts
src/PlotHo.hs view
@@ -165,8 +165,15 @@ (myName, parentName, Nothing) (concatMap (\(getterName,child) -> makeSignalTree' getterName pn child) children) ]- makeSignalTree' myName parentName (ATGetter getter) =- [Tree.Node (myName, parentName, Just (toHistoryGetter getter)) []]+ makeSignalTree' myName parentName (ATGetter (getter, _)) =+ [Tree.Node (myName, parentName, Just (toHistoryGetter (toDoubleGetter getter))) []]+ toDoubleGetter :: Getter a -> (a -> Double)+ toDoubleGetter (GetDouble f) = f+ toDoubleGetter (GetFloat f) = realToFrac . f+ toDoubleGetter (GetBool f) = fromIntegral . fromEnum . f+ toDoubleGetter (GetInt f) = fromIntegral . f+ toDoubleGetter GetSorry = const 0+ toHistoryGetter :: (a -> Double) -> History a -> [[(Double, Double)]] toHistoryGetter = case axisType of XAxisTime -> timeGetter