splitmix 0.1.3 → 0.1.3.1
raw patch · 3 files changed
+30/−3 lines, 3 filesdep +template-haskelldep ~base
Dependencies added: template-haskell
Dependency ranges changed: base
Files
- Changelog.md +5/−0
- splitmix.cabal +14/−3
- tests/splitmix-th-test.hs +11/−0
Changelog.md view
@@ -1,3 +1,8 @@+# 0.1.3.1++- Fix linking issue `symbol not found in flat namespace '_kSecRandomDefault'`+ when using splitmix in TH on macOS.+ # 0.1.3 - Use system specific entropy/randomess sources to initialise the default generator.
splitmix.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name: splitmix-version: 0.1.3+version: 0.1.3.1 synopsis: Fast Splittable PRNG description: Pure Haskell implementation of SplitMix described in@@ -95,8 +95,8 @@ c-sources: cbits-win/init.c elif (os(osx) || os(ios))- c-sources: cbits-apple/init.c- ld-options: -framework Security+ c-sources: cbits-apple/init.c+ frameworks: Security else c-sources: cbits-unix/init.c@@ -238,4 +238,15 @@ build-depends: , base , HUnit >=1.6.0.0 && <1.7+ , splitmix++test-suite splitmix-th-test+ default-language: Haskell2010+ type: exitcode-stdio-1.0+ ghc-options: -Wall -threaded -rtsopts+ hs-source-dirs: tests+ main-is: splitmix-th-test.hs+ build-depends:+ , base+ , template-haskell , splitmix
+ tests/splitmix-th-test.hs view
@@ -0,0 +1,11 @@+{-# LANGUAGE TemplateHaskell #-}+module Main (main) where++import Language.Haskell.TH.Syntax++import System.Random.SplitMix++main :: IO ()+main = print val where+ val :: Double+ val = $(runIO (newSMGen >>= \g -> return (fst (nextDouble g))) >>= lift)