Compositional Data Types on DAGs