Merge pull request #1734 from googleson78/default-gen
Export defaultGen
This commit is contained in:
commit
0d0fa77009
@ -1,5 +1,9 @@
|
|||||||
# ChangeLog for yesod-core
|
# ChangeLog for yesod-core
|
||||||
|
|
||||||
|
## 1.6.21.0
|
||||||
|
|
||||||
|
* Export `Yesod.Core.Dispatch.defaultGen` so that users may reuse it for their own `YesodRunnerEnv`s [#1734](https://github.com/yesodweb/yesod/pull/1734)
|
||||||
|
|
||||||
## 1.6.20.2
|
## 1.6.20.2
|
||||||
|
|
||||||
* Fix compatibility with template-haskell 2.17 [#1729](https://github.com/yesodweb/yesod/pull/1729)
|
* Fix compatibility with template-haskell 2.17 [#1729](https://github.com/yesodweb/yesod/pull/1729)
|
||||||
|
|||||||
@ -17,6 +17,7 @@ module Yesod.Core.Dispatch
|
|||||||
, mkYesodDispatch
|
, mkYesodDispatch
|
||||||
, mkYesodSubDispatch
|
, mkYesodSubDispatch
|
||||||
-- *** Helpers
|
-- *** Helpers
|
||||||
|
, defaultGen
|
||||||
, getGetMaxExpires
|
, getGetMaxExpires
|
||||||
-- ** Path pieces
|
-- ** Path pieces
|
||||||
, PathPiece (..)
|
, PathPiece (..)
|
||||||
@ -100,6 +101,8 @@ toWaiAppPlain site = do
|
|||||||
-- unspecified range. The range size may not be a power of 2. Since
|
-- unspecified range. The range size may not be a power of 2. Since
|
||||||
-- 1.6.20, this uses a secure entropy source and generates in the full
|
-- 1.6.20, this uses a secure entropy source and generates in the full
|
||||||
-- range of 'Int'.
|
-- range of 'Int'.
|
||||||
|
--
|
||||||
|
-- @since 1.6.21.0
|
||||||
defaultGen :: IO Int
|
defaultGen :: IO Int
|
||||||
defaultGen = bsToInt <$> getEntropy bytes
|
defaultGen = bsToInt <$> getEntropy bytes
|
||||||
where
|
where
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
name: yesod-core
|
name: yesod-core
|
||||||
version: 1.6.20.2
|
version: 1.6.21.0
|
||||||
license: MIT
|
license: MIT
|
||||||
license-file: LICENSE
|
license-file: LICENSE
|
||||||
author: Michael Snoyman <michael@snoyman.com>
|
author: Michael Snoyman <michael@snoyman.com>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user