File tree Expand file tree Collapse file tree 3 files changed +30
-3
lines changed Expand file tree Collapse file tree 3 files changed +30
-3
lines changed Original file line number Diff line number Diff line change 1+ # 0.1.3.1
2+
3+ - Fix linking issue ` symbol not found in flat namespace '_kSecRandomDefault' `
4+ when using splitmix in TH on macOS.
5+
16# 0.1.3
27
38- Use system specific entropy/randomess sources to initialise the default generator.
Original file line number Diff line number Diff line change 11cabal-version : 2.4
22name : splitmix
3- version : 0.1.3
3+ version : 0.1.3.1
44synopsis : Fast Splittable PRNG
55description :
66 Pure Haskell implementation of SplitMix described in
@@ -95,8 +95,8 @@ library
9595 c-sources : cbits-win/init.c
9696
9797 elif (os(osx) || os(ios))
98- c-sources : cbits-apple/init.c
99- ld-options : -framework Security
98+ c-sources : cbits-apple/init.c
99+ frameworks : Security
100100
101101 else
102102 c-sources : cbits-unix/init.c
@@ -239,3 +239,14 @@ test-suite initialization
239239 , base
240240 , HUnit >= 1.6.0.0 && < 1.7
241241 , splitmix
242+
243+ test-suite splitmix-th-test
244+ default-language : Haskell2010
245+ type : exitcode-stdio-1.0
246+ ghc-options : -Wall -threaded -rtsopts
247+ hs-source-dirs : tests
248+ main-is : splitmix-th-test.hs
249+ build-depends :
250+ , base
251+ , template-haskell
252+ , splitmix
Original file line number Diff line number Diff line change 1+ {-# LANGUAGE TemplateHaskell #-}
2+ module Main (main ) where
3+
4+ import Language.Haskell.TH.Syntax
5+
6+ import System.Random.SplitMix
7+
8+ main :: IO ()
9+ main = print val where
10+ val :: Double
11+ val = $ (runIO (newSMGen >>= \ g -> return (fst (nextDouble g))) >>= lift)
You can’t perform that action at this time.
0 commit comments