packages feed

dice 0.1 → 0.1.0.1

raw patch · 3 files changed

+23/−3 lines, 3 filesdep ~basenew-uploaderPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: base

API changes (from Hackage documentation)

- Data.Random.Dice: instance Functor Expr
- Data.Random.Dice: instance Show a => Show (Expr a)
+ Data.Random.Dice: instance GHC.Base.Functor Data.Random.Dice.Expr
+ Data.Random.Dice: instance GHC.Show.Show a => GHC.Show.Show (Data.Random.Dice.Expr a)
- Data.Random.Dice: Divide :: (Expr a) -> (Expr a) -> Expr a
+ Data.Random.Dice: Divide :: Expr a -> Expr a -> Expr a
- Data.Random.Dice: Minus :: (Expr a) -> (Expr a) -> Expr a
+ Data.Random.Dice: Minus :: Expr a -> Expr a -> Expr a
- Data.Random.Dice: Plus :: (Expr a) -> (Expr a) -> Expr a
+ Data.Random.Dice: Plus :: Expr a -> Expr a -> Expr a
- Data.Random.Dice: Times :: (Expr a) -> (Expr a) -> Expr a
+ Data.Random.Dice: Times :: Expr a -> Expr a -> Expr a
- Data.Random.Dice: commute :: Monad m => (Expr a -> Expr a1 -> b) -> Expr (m a) -> Expr (m a1) -> m b
+ Data.Random.Dice: commute :: Monad m => (Expr a1 -> Expr a2 -> b) -> Expr (m a1) -> Expr (m a2) -> m b
- Data.Random.Dice: foldExpr :: (String -> t -> t1) -> (t1 -> t1 -> t1) -> (t1 -> t1 -> t1) -> (t1 -> t1 -> t1) -> (t1 -> t1 -> t1) -> Expr t -> t1
+ Data.Random.Dice: foldExpr :: () => (String -> t1 -> t2) -> (t2 -> t2 -> t2) -> (t2 -> t2 -> t2) -> (t2 -> t2 -> t2) -> (t2 -> t2 -> t2) -> Expr t1 -> t2
- Data.Random.Dice: showErrorWith :: (t -> ShowS) -> ErrorT String Identity t -> ShowS
+ Data.Random.Dice: showErrorWith :: () => (t -> ShowS) -> ErrorT String Identity t -> ShowS
- Data.Random.Dice: showListConst :: Show a => String -> a -> t -> String -> String
+ Data.Random.Dice: showListConst :: Show a => String -> a -> p -> String -> String
- Data.Random.Dice: showRational :: (Integral a1, Num a, Ord a, Show a1) => a -> Ratio a1 -> ShowS
+ Data.Random.Dice: showRational :: (Show a1, Ord a2, Num a1, Num a2, Eq a1) => a2 -> Ratio a1 -> ShowS
- Data.Random.Dice: showScalarConst :: Show a => String -> a -> t -> String -> String
+ Data.Random.Dice: showScalarConst :: Show a => String -> a -> p -> String -> String
- Data.Random.Dice: showSimpleConst :: (Num a, Ord a) => (a -> a1 -> ShowS) -> t -> [a1] -> a -> ShowS
+ Data.Random.Dice: showSimpleConst :: (Ord a, Num a) => (a -> t -> ShowS) -> p -> [t] -> a -> ShowS
- Data.Random.Dice: showSimpleRationalConst :: t -> [Ratio Integer] -> Integer -> ShowS
+ Data.Random.Dice: showSimpleRationalConst :: () => p -> [Ratio Integer] -> Integer -> ShowS

Files

+ CHANGELOG view
@@ -0,0 +1,3 @@+0.1.0.1+	Update for ghc-8.8 (change Monad superclasses to MonadFail)+
dice.cabal view
@@ -1,21 +1,29 @@ name:                   dice-version:                0.1+version:                0.1.0.1 stability:              work-in-progress  cabal-version:          >= 1.6 build-type:             Simple  author:                 James Cook <mokus@deepbondi.net>-maintainer:             James Cook <mokus@deepbondi.net>+maintainer:             Bertram Felgenhauer <int-e@gmx.de> license:                PublicDomain  category:               Game synopsis:               Simplistic D&D style dice-rolling system. description:            Simplistic D&D style dice-rolling system.+                        .+                        > $ dice "2d10 + 2 * (d100 / d6)"+                        > (5+2) + 2 * 64 / 2 => 71 +bug-reports:            https://github.com/lambdabot/dice/issues++extra-source-files:+  CHANGELOG+ source-repository head   type: git-  location: git://github.com/mokus0/dice.git+  location: git://github.com/lambdabot/dice.git  Library   hs-source-dirs:       src
src/Data/Random/Dice.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} module Data.Random.Dice where  import Data.Random@@ -44,13 +45,21 @@     where         divM x y = join (liftM2 (/) x y) +#if __GLASGOW_HASKELL__ < 808 evalFractionalExpr :: (Eq a, Fractional a, Monad m) => Expr a -> m a+#else+evalFractionalExpr :: (Eq a, Fractional a, MonadFail m) => Expr a -> m a+#endif evalFractionalExpr = evalExprWithDiv divM     where         divM x 0 = fail "Divide by zero!"         divM x y = return (x / y) +#if __GLASGOW_HASKELL__ < 808 evalIntegralExpr :: (Integral a, Monad m) => Expr a -> m a+#else+evalIntegralExpr :: (Integral a, MonadFail m) => Expr a -> m a+#endif evalIntegralExpr = evalExprWithDiv divM     where         divM x 0 = fail "Divide by zero!"