getWorker :: Bool -> History -> IO Worker
getWorker pure hist =
    do r <- getWorker' pure hist
       v <- validateHistoryWorker r (historyGetHeList hist)
       wc <- assert ("getWorker' returned bad worker for history " ++ (show hist)) v workerCache
       fixupWorkerCache wc
       return r
getWorker :: Bool -> History -> IO Worker
getWorker pure hist =
    do r <- getWorker' pure hist
       v <- validateHistoryWorker r (historyGetHeList hist)
       wc <- assert ("getWorker' returned bad worker for history " ++ (show hist)) v workerCache
       fixupWorkerCache wc
       return r
getWorker pure hist =
    do r <- getWorker' pure hist
       v <- validateHistoryWorker r (historyGetHeList hist)
       wc <- assert ("getWorker' returned bad worker for history " ++ (show hist)) v workerCache
       fixupWorkerCache wc
       return r