Toy implementation of RSA in Haskell