Quite stuck debugging something…
Might anyone know why my priority queue is simply empty in the DijkstraState
monad when in the initialState
it is most definitely not empty?
This is my first time working with Data.Heap
, but everything typechecks; furthermore, when I trace the priority queue as part of the initial state, it looks fine:
initialState: (fromList [(0,(Node {coord = (0,0), weight = 2},0,E))],fromList [((0,0),0)])
But the trace in the monad shows an empty heap :
pq in modifiedDijkstra: fromList []
What’s weird is the other part of the initial state, the distance map, shows up as expected.
Meta-question for the experienced folks: what else would you do to debug this further? I’m thinking maybe some sort of property test, but not quite sure how to formulate something like that.