mkSimpleHistory :: History -> HistoryEntry -> History
mkSimpleHistory parent he =
    unsafePerformIO $ mdo w <- newIORef Nothing
                          dead <- newTVarIO True
                          p <- newTVarIO newWH
                          n <- newTVarIO newWH
                          wc <- workerCache
                          ident <- allocateHistoryIdent
                          let newWH = HistoryWorker { hw_dead = dead,
                                                      hw_worker = w,
                                                      hw_prev_lru = p,
                                                      hw_next_lru = n,
                                                      hw_is_root = False }
                              newHist = History { hs_parent = parent,
                                                  hs_entry = he,
                                                  hs_worker = newWH,
                                                  hs_ident = ident }
                          addFinalizer newHist (historyDead wc newHist)
                          return newHist
mkSimpleHistory :: History -> HistoryEntry -> History
mkSimpleHistory parent he =
    unsafePerformIO $ mdo w <- newIORef Nothing
                          dead <- newTVarIO True
                          p <- newTVarIO newWH
                          n <- newTVarIO newWH
                          wc <- workerCache
                          ident <- allocateHistoryIdent
                          let newWH = HistoryWorker { hw_dead = dead,
                                                      hw_worker = w,
                                                      hw_prev_lru = p,
                                                      hw_next_lru = n,
                                                      hw_is_root = False }
                              newHist = History { hs_parent = parent,
                                                  hs_entry = he,
                                                  hs_worker = newWH,
                                                  hs_ident = ident }
                          addFinalizer newHist (historyDead wc newHist)
                          return newHist
mkSimpleHistory parent he =
    unsafePerformIO $ mdo w <- newIORef Nothing
                          dead <- newTVarIO True
                          p <- newTVarIO newWH
                          n <- newTVarIO newWH
                          wc <- workerCache
                          ident <- allocateHistoryIdent
                          let newWH = HistoryWorker { hw_dead = dead,
                                                      hw_worker = w,
                                                      hw_prev_lru = p,
                                                      hw_next_lru = n,
                                                      hw_is_root = False }
                              newHist = History { hs_parent = parent,
                                                  hs_entry = he,
                                                  hs_worker = newWH,
                                                  hs_ident = ident }
                          addFinalizer newHist (historyDead wc newHist)
                          return newHist