Skip to content

Commit

Permalink
Export defaultGen
Browse files Browse the repository at this point in the history
  • Loading branch information
googleson78 committed Jul 22, 2021
1 parent f3dd8cf commit edee8db
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions yesod-core/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -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

## 1.6.20.2

* Fix compatibility with template-haskell 2.17 [#1729](https://github.com/yesodweb/yesod/pull/1729)
Expand Down
3 changes: 3 additions & 0 deletions yesod-core/src/Yesod/Core/Dispatch.hs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module Yesod.Core.Dispatch
, mkYesodDispatch
, mkYesodSubDispatch
-- *** Helpers
, defaultGen
, getGetMaxExpires
-- ** Path pieces
, PathPiece (..)
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion yesod-core/yesod-core.cabal
Original file line number Diff line number Diff line change
@@ -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 <michael@snoyman.com>
Expand Down

0 comments on commit edee8db

Please sign in to comment.