Merge pull request #1283 from chreekat/comment-for-unsafe
Comment on unsafePerformIO, close #1245
This commit is contained in:
commit
25bba1add1
@ -710,6 +710,8 @@ setLoginLinkKey aid = do
|
||||
setSession loginLinkKey $ TS.pack $ show (toPathPiece aid, now)
|
||||
|
||||
|
||||
-- See https://github.com/yesodweb/yesod/issues/1245 for discussion on this
|
||||
-- use of unsafePerformIO.
|
||||
defaultNonceGen :: Nonce.Generator
|
||||
defaultNonceGen = unsafePerformIO (Nonce.new)
|
||||
{-# NOINLINE defaultNonceGen #-}
|
||||
|
||||
@ -574,6 +574,8 @@ allPersonInfo (A.Object o) = map enc $ M.toList o
|
||||
allPersonInfo _ = []
|
||||
|
||||
|
||||
-- See https://github.com/yesodweb/yesod/issues/1245 for discussion on this
|
||||
-- use of unsafePerformIO.
|
||||
defaultNonceGen :: Nonce.Generator
|
||||
defaultNonceGen = unsafePerformIO (Nonce.new)
|
||||
{-# NOINLINE defaultNonceGen #-}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user