diff --git a/yesod-core/ChangeLog.md b/yesod-core/ChangeLog.md index 7fb76193..ef7e258a 100644 --- a/yesod-core/ChangeLog.md +++ b/yesod-core/ChangeLog.md @@ -1,5 +1,9 @@ # 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 * Fix compatibility with template-haskell 2.17 [#1729](https://github.com/yesodweb/yesod/pull/1729) diff --git a/yesod-core/src/Yesod/Core/Dispatch.hs b/yesod-core/src/Yesod/Core/Dispatch.hs index 8a2501e6..feb7765b 100644 --- a/yesod-core/src/Yesod/Core/Dispatch.hs +++ b/yesod-core/src/Yesod/Core/Dispatch.hs @@ -17,6 +17,7 @@ module Yesod.Core.Dispatch , mkYesodDispatch , mkYesodSubDispatch -- *** Helpers + , defaultGen , getGetMaxExpires -- ** Path pieces , PathPiece (..) @@ -100,6 +101,8 @@ toWaiAppPlain site = do -- 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 -- range of 'Int'. +-- +-- @since 1.6.21.0 defaultGen :: IO Int defaultGen = bsToInt <$> getEntropy bytes where diff --git a/yesod-core/yesod-core.cabal b/yesod-core/yesod-core.cabal index 0e3799d5..f01e5ff9 100644 --- a/yesod-core/yesod-core.cabal +++ b/yesod-core/yesod-core.cabal @@ -1,5 +1,5 @@ name: yesod-core -version: 1.6.20.2 +version: 1.6.21.0 license: MIT license-file: LICENSE author: Michael Snoyman