packages feed

timeplot 0.2.2 → 0.2.3

raw patch · 2 files changed

+6/−4 lines, 2 files

Files

Tools/TimePlot.hs view
@@ -71,22 +71,24 @@   -- (since given just a Delta t, the compiler won't be able to    -- figure out which 't' we're speaking of)   toSeconds :: Delta t -> t -> Double+  fromSeconds :: Double -> t -> Delta t  instance HasDelta Double where   type Delta Double = Double   add d t = t + d   sub t2 t1 = t2 - t1   toSeconds d _ = d+  fromSeconds d _ = d  instance HasDelta LocalTime where   type Delta LocalTime = NominalDiffTime   add d t = utcToLocalTime utc (addUTCTime d (localTimeToUTC utc t))   sub t2 t1 = diffUTCTime (localTimeToUTC utc t2) (localTimeToUTC utc t1)   toSeconds d _ = fromIntegral (truncate (1000000*d)) / 1000000-+  fromSeconds d _ = fromRational (toRational d)  instance Read NominalDiffTime where-  readsPrec n s = [(fromIntegral i, s') | (i,s') <- readsPrec n s]+  readsPrec n s = [(fromSeconds i (undefined::LocalTime), s') | (i,s') <- readsPrec n s]  class (Ord t, HasDelta t, PlotValue t, Show t, Show (Delta t), Read (Delta t)) => TimeAxis t  @@ -137,7 +139,7 @@                       chartKindF=chartKindF, parseTime=parseTime, fromTime=fromTime, toTime=toTime}       where         inFile      = single "input file"  "-if" (error "No input file (-if) specified")-        outFile     = single "output file" "-o"  (error "No output file (-of) specified")+        outFile     = single "output file" "-o"  (error "No output file (-o) specified (or have you specified '-of x' and built without --flags=gtk ?)")         outFormat   = maybe PNG id $ lookup (single "output format" "-of" (name2format outFile)) $             [("png",PNG), ("pdf",PDF), ("ps",PS), ("svg",SVG) #if HAVE_GTK            
timeplot.cabal view
@@ -1,5 +1,5 @@ Name: timeplot-Version: 0.2.2+Version: 0.2.3 License: BSD3 License-file: LICENSE Copyright: Eugene Kirpichov, 2009