added cabal file. update diagrams code