Simple HashCash generator and validator in Haskell