relax :: Mapping -> Queue -> Queue
relax (key, priority@(Priority cost _)) = PSQ.adjust update key
  where
    update otherPriority@(Priority otherCost _)
      | cost < otherCost = priority
      | otherwise = otherPriority

-- update priorities of given keys in PSQueue
relax :: Mapping -> Queue -> Queue
relax (key, priority@(Priority cost _)) = PSQ.adjust update key
  where
    update otherPriority@(Priority otherCost _)
      | cost < otherCost = priority
      | otherwise = otherPriority

-- update priorities of given keys in PSQueue
relax (key, priority@(Priority cost _)) = PSQ.adjust update key
  where
    update otherPriority@(Priority otherCost _)
      | cost < otherCost = priority
      | otherwise = otherPriority

-- update priorities of given keys in PSQueue