worldDag :: World -> DAG
worldDag w = (S.unions nodes_list, S.unions edges_list)

  where
    -- The canonical islands of this world.
    islands = eltsUFM $ canonicalIslands w

    -- recursively compute DAG for each parent
    (nodes_list, edges_list) = unzip $ map islandDag islands


islandDag :: Island -> DAG
islandDag wi = ( S.union my_nodes parent_nodes_merged