module FRP.Titan.Debug.Command where
data Command p = Step
| StepUntil p
| SkipUntil p
| SkipSense
| Redo
| SkipBack
| JumpTo Int
| TravelToFrame Int
| DiscardFuture Int
| Exit
| Play
| Pause
| Stop
| LoadTraceFromFile String
| LoadTraceFromString String
| DeleteTrace
| IOSense Int
| GetInput Int
| SetInput Int String
| GetGTime Int
| GetDTime Int
| SetDTime Int String
| GetCurrentFrame
| GetCurrentTime
| GetMaxTime
| GetTrace
| SummarizeHistory
| SetPrefDumpInput Bool
| GetPrefDumpInput
| Ping
deriving (Eq, Read, Show)
showCommand (LoadTraceFromString s) = "LoadTraceFromString <length: " ++ show (length s) ++ " chars>"
showCommand c = show c
stopPlayingCommand :: Command p -> Bool
stopPlayingCommand (Step) = True
stopPlayingCommand (StepUntil p) = True
stopPlayingCommand (SkipUntil p) = True
stopPlayingCommand (SkipSense) = True
stopPlayingCommand (Redo) = True
stopPlayingCommand (SkipBack) = True
stopPlayingCommand (JumpTo _) = True
stopPlayingCommand (TravelToFrame _) = True
stopPlayingCommand (DiscardFuture _) = True
stopPlayingCommand (Exit) = True
stopPlayingCommand (Play) = False
stopPlayingCommand (Pause) = True
stopPlayingCommand (Stop) = True
stopPlayingCommand (LoadTraceFromFile _) = True
stopPlayingCommand (LoadTraceFromString _) = True
stopPlayingCommand (DeleteTrace) = True
stopPlayingCommand (IOSense _) = True
stopPlayingCommand (GetInput _ ) = False
stopPlayingCommand (SetInput _ _) = False
stopPlayingCommand (GetGTime _ ) = False
stopPlayingCommand (GetDTime _ ) = False
stopPlayingCommand (SetDTime _ _) = False
stopPlayingCommand (GetCurrentFrame) = False
stopPlayingCommand (GetCurrentTime) = False
stopPlayingCommand (GetTrace) = False
stopPlayingCommand (SummarizeHistory) = False
stopPlayingCommand (SetPrefDumpInput _) = False
stopPlayingCommand (GetPrefDumpInput) = False
stopPlayingCommand (Ping) = False
stopPlayingCommand (GetMaxTime) = False