threadscope 0.1.1 → 0.1.2
raw patch · 3 files changed
+9/−6 lines, 3 filesdep ~unixnew-uploader
Dependency ranges changed: unix
Files
- EventDuration.hs +6/−4
- Timeline/Render.hs +1/−0
- threadscope.cabal +2/−2
EventDuration.hs view
@@ -96,7 +96,9 @@ rest = eventsToDurations events runDuration t = ThreadRun t s (time event) endTime - where (endTime, s) = findRunThreadTime events + where (endTime, s) = case findRunThreadTime events of + Nothing -> error $ "findRunThreadTime for " ++ (show event) + Just x -> x isDiscreteEvent :: GHC.Event -> Bool isDiscreteEvent e = @@ -164,11 +166,11 @@ ------------------------------------------------------------------------------- -findRunThreadTime :: [GHC.Event] -> (Timestamp, ThreadStopStatus) -findRunThreadTime [] = error "findRunThreadTime" +findRunThreadTime :: [GHC.Event] -> Maybe (Timestamp, ThreadStopStatus) +findRunThreadTime [] = Nothing findRunThreadTime (e : es) = case spec e of - StopThread{status=s} -> (time e, s) + StopThread{status=s} -> Just (time e, s) _ -> findRunThreadTime es -------------------------------------------------------------------------------
Timeline/Render.hs view
@@ -24,6 +24,7 @@ import Graphics.UI.Gtk import Graphics.UI.Gtk.Gdk.Events as Old import Graphics.Rendering.Cairo as C+import Graphics.UI.Gtk.Gdk.GC import Data.Maybe import Data.IORef
threadscope.cabal view
@@ -1,5 +1,5 @@ Name: threadscope -Version: 0.1.1 +Version: 0.1.2 Description: A graphical viewer for GHC eventlog traces. License: BSD3 License-file: LICENSE @@ -58,7 +58,7 @@ ghc-options: -Wall if !os(windows) - build-depends: unix >= 2.3.0 + build-depends: unix >= 2.3 && < 2.5 ghc-options: -fno-warn-type-defaults -fno-warn-name-shadowing