djb's redo in haskell