A Haskell rewrite of the topology database