packages feed

markov-chain 0.0.2 → 0.0.3

raw patch · 2 files changed

+6/−10 lines, 2 filesdep +transformersdep −mtldep ~containersdep ~random

Dependencies added: transformers

Dependencies removed: mtl

Dependency ranges changed: containers, random

Files

markov-chain.cabal view
@@ -1,5 +1,5 @@ Name:             markov-chain-Version:          0.0.2+Version:          0.0.3 License:          GPL License-File:     LICENSE Author:           Henning Thielemann <haskell@henning-thielemann.de>@@ -7,11 +7,6 @@ Homepage:         http://darcs.haskell.org/markov-chain/ Category:         Algorithms Build-Type:       Simple-Build-Depends:    base>=1.0, mtl--- From the Monad Template Library we only need the State monad.--- If your compiler does not support functional dependencies,--- it would be easy to replace that by mapAccumL--- or by the MTL-split package which is on the way. Synopsis:         Markov Chains for generating random sequences with a user definable behaviour. Description:    This library can be used to generate random sequences of anything@@ -36,10 +31,11 @@   description: Choose the new smaller, split-up base package.  Library+  Build-Depends:   transformers >=0.0.1 && <0.2   If flag(splitBase)-    Build-Depends: base >= 2, random >= 1.0, mtl, containers+    Build-Depends: base >= 2, random >=1.0 && <2.0, containers >=0.1 && <1.0   Else-    Build-Depends: base >=1.0 && < 2, mtl+    Build-Depends: base >=1.0 && < 2    GHC-Options:      -Wall   Hs-Source-Dirs:   src
src/Data/MarkovChain.hs view
@@ -15,7 +15,7 @@ import Data.Map (Map) import qualified Data.Map as Map import System.Random (RandomGen, randomR)-import Control.Monad.State (State(State), evalState)+import Control.Monad.Trans.State (State, state, evalState)   {- |@@ -105,7 +105,7 @@ 'System.Random.randomR' wrapped in a State monad. -} randomRState :: (RandomGen g) => (Int,Int) -> State g Int-randomRState bnds = State (randomR bnds)+randomRState bnds = state (randomR bnds)  {- | Create a map that lists for each string all possible successors.