A Haskell implementation of Dijkstra's algorithm