yesodweb / yesodweb.com-content

Content for the www.yesodweb.com site
http://www.yesodweb.com/
Other
67 stars 112 forks source link

Print out to the console the verification email #155

Closed amitaibu closed 8 years ago

amitaibu commented 8 years ago

Following the email registration example, I have no email server on my local (best way to prevent accidental emails :wink: ) - but I still wanted to see the verurl one gets.

This PR is an attempt at adding the verurl to the console. I assume there's a better way to print, but liftIO $ print "Copy/ Paste this URL in your browser:" $ unpack verurl doesn't seem to work.

book_ _stack_runhaskell_example_hs_ _ghc_ _121x29

snoyberg commented 8 years ago

I think you're looking for:

liftIO $ putStrLn $ "Copy/ Paste this URL in your browser:" ++ unpack verurl

or

$logInfo $ "Copy/ Paste this URL in your browser:" <> verurl
amitaibu commented 8 years ago

Thanks - that did the work :)

I've rebased, and also added a note about this new output.

snoyberg commented 8 years ago

Thanks!

amitaibu commented 8 years ago

btw, when I tried the following I got an error. Am I importing the wrong lib?

import           Text.PrettyPrint         (<>)

---

$logInfo $ "Copy/ Paste this URL in your browser:" <> verurl
snoyberg commented 8 years ago

You should import from Data.Monoid.

amitaibu commented 8 years ago

Thanks. One day I'll know it ;)