From d73cd3dbc0fab52bc27dbd54998abf0b030985c0 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Sat, 11 Apr 2015 20:02:27 +0200 Subject: [PATCH] Support GHC 7.10 --- alea.cabal | 10 +++++----- src/Alea/Random.hs | 2 +- src/main.hs | 1 - 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/alea.cabal b/alea.cabal index d58c1dd..1c6b7c0 100644 --- a/alea.cabal +++ b/alea.cabal @@ -1,5 +1,5 @@ name: alea -version: 0.3.3.0 +version: 0.4.0.0 synopsis: a diceware passphrase generator description: @@ -12,7 +12,7 @@ license: MIT license-file: LICENSE author: Rnhmjoj maintainer: micheleguerinirocco@me.com -copyright: (C) Michele Guerini Rocco 2014 +copyright: (C) Michele Guerini Rocco 2015 category: Utility build-type: Simple extra-source-files: README.md, LICENSE @@ -27,8 +27,8 @@ executable alea main-is: Main.hs hs-source-dirs: src default-language: Haskell2010 - other-modules: Alea.Diceware, Alea.List, Alea.Random, Paths_alea + other-modules: Alea.Diceware, Alea.List, Alea.Random other-extensions: DeriveDataTypeable, RecordWildCards - build-depends: base ==4.7.* , containers ==0.5.*, - argparser ==0.3.*, threefish == 0.2.* + build-depends: base >=4.8 && < 5.0, containers, + argparser, threefish ghc-options: -O2 diff --git a/src/Alea/Random.hs b/src/Alea/Random.hs index 100ade2..a8ec8f0 100644 --- a/src/Alea/Random.hs +++ b/src/Alea/Random.hs @@ -3,4 +3,4 @@ module Alea.Random where import Crypto.Threefish.Random randWords :: Int -> Int -> IO [Int] -randWords n k = newSkeinGen >>= return . take k . randomRs (0, n-1) +randWords n k = take k . randomRs (0, n-1) <$> newSkeinGen diff --git a/src/main.hs b/src/main.hs index aa64d0a..97acbf6 100644 --- a/src/main.hs +++ b/src/main.hs @@ -3,7 +3,6 @@ import System.IO import System.Console.ArgParser import Control.Monad -import Control.Applicative import Paths_alea (getDataFileName) import Alea.Diceware