HCodecs 0.2.1 → 0.2.2
raw patch · 5 files changed
+20/−36 lines, 5 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- HCodecs.cabal +5/−6
- LICENSE +1/−1
- src/Data/Arbitrary.hs +6/−3
- src/Data/ByteString/Parser.hs +8/−3
- tests/Makefile +0/−23
HCodecs.cabal view
@@ -1,12 +1,12 @@ name: HCodecs-version: 0.2.1+version: 0.2.2 cabal-Version: >= 1.2 license: BSD3 license-file: LICENSE-copyright: (c) 2007-2008 George Giorgidze+copyright: (c) 2007-2011 George Giorgidze author: George Giorgidze-maintainer: George Giorgidze (GGG at CS dot NOTT dot AC dot UK)-homepage: http://www.cs.nott.ac.uk/~ggg/+maintainer: George Giorgidze (giorgidze@gmail.com)+homepage: http://www-db.informatik.uni-tuebingen.de/team/giorgidze category: Codec stability: experimental synopsis: A library to read, write and manipulate MIDI, WAVE, and SoundFont2 files.@@ -14,8 +14,7 @@ The library provides functions to read, write and manipulate MIDI, WAVE and SoundFont2 multimedia files. It is written entirely in Haskell (without any FFI). It uses efficient parsing and building combinators for binary data stored in ByteStrings (based on the one in 'binary' package). . Correctness of significant parts of the library has been validated with QuickCheck and Haskell Program Coverage (HPC) tool-kits.- .- HPC results can be seen at <http://www.cs.nott.ac.uk/~ggg/hpc/HCodecs/hpc_index.html>.+ build-type: Simple extra-source-files: src/Tests/Main.hs
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2007-2010 George Giorgidze+Copyright (c) 2007-2011 George Giorgidze All rights reserved.
src/Data/Arbitrary.hs view
@@ -34,12 +34,15 @@ import Data.List import Data.Array.IArray -import System.Random- -- random since 1.0.1.0 defines the following instances #if MIN_VERSION_random(1,0,1)++import System.Random ()+ #else +import System.Random (RandomGen,Random,random,randomR)+ instance Random Word8 where randomR = integralRandomR random = randomR (minBound,maxBound)@@ -75,11 +78,11 @@ instance Random Int64 where randomR = integralRandomR random = randomR (minBound,maxBound)-#endif integralRandomR :: (Integral a, RandomGen g) => (a,a) -> g -> (a,g) integralRandomR (a,b) g = case randomR (fromIntegral a :: Integer,fromIntegral b :: Integer) g of (x1,g1) -> (fromIntegral x1, g1)+#endif instance Arbitrary Word8 where arbitrary = choose (minBound, maxBound)
src/Data/ByteString/Parser.hs view
@@ -13,6 +13,8 @@ -- ----------------------------------------------------------------------------- +{-# LANGUAGE CPP #-}+ module Data.ByteString.Parser ( -- * The Parser type@@ -111,12 +113,15 @@ import qualified Data.ByteString.Lazy.Internal as L import Foreign hiding (unsafePerformIO)-import Control.Monad.ST.Unsafe (unsafeInterleaveST) +#if MIN_VERSION_base(4,4,0)+import Control.Monad.ST.Unsafe (unsafeInterleaveST)+#else+import Control.Monad.ST (unsafeInterleaveST)+#endif import Control.Monad.ST hiding (unsafeInterleaveST) import Data.STRef - -- | The parse state data S = S {-# UNPACK #-} !B.ByteString -- current chunk L.ByteString -- the rest of the input@@ -146,7 +151,7 @@ ok -> ok instance Applicative Parser where- pure = return+ pure = return (<*>) = ap instance Alternative Parser where
− tests/Makefile
@@ -1,23 +0,0 @@-all: prep- ghc -O3 -Wall -i../src -odir ./tmp -hidir ./tmp --make ../src/Tests/Main.hs -o main- ./main +RTS -s--prof: prep- ghc -O3 -prof -auto-all -i../src -odir ./tmp -hidir ./tmp --make ../src/Tests/Main.hs -o main- ./main +RTS -p--hpc: prep- ghc -fhpc -O3 -i../src -odir ./tmp -hidir ./tmp --make ../src/Tests/Main.hs -o main- ./main- hpc markup main--prep: clean- locate *.mid > mid.txt- locate *.sf2 > sf2.txt- locate *.wav > wav.txt- mkdir tmp--clean:- rm -rf ./tmp- rm -rf .hpc- rm -f *.o *.hi *.html *.tix *.aux *.hp *.prof *.ps main mid.txt sf2.txt wav.txt