heap 1.0.0 → 1.0.1
raw patch · 4 files changed
+22/−9 lines, 4 filesdep ~QuickCheckdep ~basenew-uploader
Dependency ranges changed: QuickCheck, base
Files
- Data/Heap/Item.hs +2/−1
- Test.hs +2/−2
- changes +7/−0
- heap.cabal +11/−6
Data/Heap/Item.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE Trustworthy #-} {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances , MultiParamTypeClasses, TypeFamilies #-}@@ -183,5 +184,5 @@ -- | 'split' a function on @item@s to one on priority-value pairs. splitF :: (HeapItem pol item) => (item -> a) -> (Prio pol item, Val pol item) -> a splitF f pv = f (merge pv)-{-# INLINE splitF #-}+{-# INLINE[1] splitF #-} {-# RULES "splitF/split" forall f x. splitF f (split x) = f x #-}
Test.hs view
@@ -9,10 +9,10 @@ main :: IO () main = do putStrLn "Ensuring assertions are not ignored:"- result <- quickCheckWithResult (Args Nothing 1 1 1) $ expectFailure (assert False True)+ result <- quickCheckWithResult (Args Nothing 1 1 1 True) $ expectFailure (assert False True) putStrLn "" case result of- (Success _) -> do+ (Success _ _ _) -> do putStrLn "Tests for Data.Heap.Internal:" >> Internal.runTests >> putStrLn "" putStrLn "Tests for Data.Heap.Item:" >> Item.runTests >> putStrLn "" putStrLn "Tests for Data.Heap:" >> Heap.runTests
+ changes view
@@ -0,0 +1,7 @@+Latest version: 1.0.1++1.0.0 --> 1.0.1+===============+- set Data.Heap.Item to Trustworthy to enable usage of Data.Heap in Safe Haskell (trustworthy is required due to rewrite rules)+- changed the INLINE pragma for splitF to INLINE[1] (GHC warned about the rule possible not firing)+- fixed QuickCheck tests to work with QuickCheck > 2.2
heap.cabal view
@@ -1,5 +1,5 @@ Name: heap-Version: 1.0.0+Version: 1.0.1 Category: Data Structures Synopsis: Heaps in Haskell@@ -11,15 +11,17 @@ License-File: LICENSE Copyright: (c) 2008-2009, Stephan Friedrichs Author: Stephan Friedrichs-Maintainer: Stephan Friedrichs (deduktionstheorem at web dot de)+Maintainer: Manuel Eberl (last name + m _at_ in.tum.de) Build-Type: Simple-Cabal-Version: >= 1.2.3-Tested-With: GHC == 6.10.2, GHC == 6.10.3+Cabal-Version: >= 1.10+Tested-With: GHC == 7.8.3+Extra-Source-Files: changes Flag Test Description: Build a binary running test cases Default: False+ Library Build-Depends: base >= 3 && < 5@@ -29,13 +31,15 @@ Data.Heap.Internal , Data.Heap.Item GHC-Options: -Wall -fwarn-tabs- Extensions:+ Other-Extensions: DeriveDataTypeable , EmptyDataDecls , FlexibleContexts , FlexibleInstances , MultiParamTypeClasses , TypeFamilies+ , Trustworthy+ Default-Language: Haskell2010 Executable heap-tests if !flag( Test )@@ -50,6 +54,7 @@ , Test.Heap.Common , Test.Heap.Internal , Test.Heap.Item- Build-Depends: QuickCheck >= 2 && < 3+ Build-Depends: base >= 3 && < 5, QuickCheck >= 2.3 && < 3 CPP-Options: -D__TEST__ GHC-Options: -Wall -fwarn-tabs -fno-ignore-asserts+ Default-Language: Haskell2010