traceTo'' :: (Worker -> ThreadId -> Topped AccessNr -> IO [a]) -> Worker -> History -> History -> IO (Either String [a])
traceTo'' tracer worker start end =
    case getDeltaScript start end of
      Just todo -> liftM Right $ traceTo' worker tracer todo
      Nothing -> return $ Left $ shows start $ " is not a prefix of " ++ (show end)

{- Take a worker and a history representing its current state and run
   it forwards to some other history, logging control expressions as
   we go. -}
traceTo'' :: (Worker -> ThreadId -> Topped AccessNr -> IO [a]) -> Worker -> History -> History -> IO (Either String [a])
traceTo'' tracer worker start end =
    case getDeltaScript start end of
      Just todo -> liftM Right $ traceTo' worker tracer todo
      Nothing -> return $ Left $ shows start $ " is not a prefix of " ++ (show end)

{- Take a worker and a history representing its current state and run
   it forwards to some other history, logging control expressions as
   we go. -}
traceTo'' tracer worker start end =
    case getDeltaScript start end of
      Just todo -> liftM Right $ traceTo' worker tracer todo
      Nothing -> return $ Left $ shows start $ " is not a prefix of " ++ (show end)

{- Take a worker and a history representing its current state and run
   it forwards to some other history, logging control expressions as
   we go. -}