DD clone in haskell