packages feed

random-fu 0.2.3.0 → 0.2.3.1

raw patch · 2 files changed

+10/−10 lines, 2 filesdep ~base

Dependency ranges changed: base

Files

random-fu.cabal view
@@ -1,12 +1,12 @@ name:                   random-fu-version:                0.2.3.0+version:                0.2.3.1 stability:              provisional  cabal-version:          >= 1.6 build-type:             Simple -author:                 James Cook <james.cook@usma.edu>-maintainer:             James Cook <james.cook@usma.edu>+author:                 James Cook <mokus@deepbondi.net>+maintainer:             James Cook <mokus@deepbondi.net> license:                PublicDomain homepage:               https://github.com/mokus0/random-fu @@ -29,6 +29,8 @@                         a fair bit slower than straight C implementations of                          the same algorithms.                         .+                        Changes in 0.2.3.1: Should now build on GHC 7.6+                        .                         Changes in 0.2.3.0: Added stretched exponential distribution,                         contributed by Ben Gamari.                         .@@ -44,12 +46,7 @@                         gave it a Read instance, and dropped a                          no-longer-necessary Ord context from 'fromWeightedList'.                         Thank you Antal Spector-Zabusky for catching these!-                        .-                        Changes in 0.2.0.2: None except setting -                        \"Buildable: False\" under GHC 7.2.1 (see -                        flexible-defaults 0.0.0.2 for more detailed-                        explanation).-                        + tested-with:            GHC == 6.10.4, GHC == 6.12.1, GHC == 6.12.3,                         GHC == 7.0.1, GHC == 7.0.2, GHC == 7.0.4,                         GHC == 7.2.2, GHC == 7.4.1-rc1
src/Data/Random/Distribution/Categorical.hs view
@@ -1,6 +1,7 @@ {-# LANGUAGE     MultiParamTypeClasses,-    FlexibleInstances, FlexibleContexts+    FlexibleInstances, FlexibleContexts,+    CPP   #-}  module Data.Random.Distribution.Categorical@@ -225,12 +226,14 @@         ps = totalWeight orig         scale = recip ps +#if __GLASGOW_HASKELL__ < 706 -- |strict 'modifySTRef' modifySTRef' :: STRef s a -> (a -> a) -> ST s () modifySTRef' x f = do     v <- readSTRef x     let fv = f v     fv `seq` writeSTRef x fv+#endif  -- |Simplify a categorical distribution by combining equivalent events (the new -- event will have a probability equal to the sum of all the originals).