[Haskell] topology in Haskell