interval-algebra 0.6.1 → 0.6.2
raw patch · 4 files changed
+11/−3 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- ChangeLog.md +4/−0
- interval-algebra.cabal +1/−1
- src/IntervalAlgebra.hs +2/−2
- test/IntervalAlgebra/PairedIntervalSpec.hs +4/−0
ChangeLog.md view
@@ -1,5 +1,9 @@ # Changelog for interval-algebra +## 0.6.2++* Fixes bug in `equals` which was checking for equality of the interval container, not just the interval.+ ## 0.6.1 * Removes the deriving `Show` instance for `PairedInterval`s so people can customize their own instances.
interval-algebra.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name: interval-algebra-version: 0.6.1+version: 0.6.2 synopsis: An implementation of Allen's interval algebra for temporal logic description: Please see the README on GitHub at <https://github.com/novisci/interval-algebra> category: Algebra,Time
src/IntervalAlgebra.hs view
@@ -413,7 +413,7 @@ -- | Does x equal y? equals :: ComparativePredicateOf (i a)- equals x y = x == y+ equals x y = begin x == begin y && end x == end y -- | Does x meet y? Is y metBy x? meets, metBy :: ComparativePredicateOf (i a)@@ -512,7 +512,7 @@ moment' x = moment @a -- | Determine the duration of an @'i a'@.- duration :: Intervallic i a => i a-> b+ duration :: Intervallic i a => i a -> b duration x = diff (end x) (begin x) -- | Shifts an @a@. Most often, the @b@ will be the same type as @a@.
test/IntervalAlgebra/PairedIntervalSpec.hs view
@@ -13,6 +13,8 @@ t1 = mkTestPr "hi" 0 5 t2 :: TestPair t2 = mkTestPr "bye" 6 10+t3 :: TestPair+t3 = mkTestPr "hello" 0 5 spec :: Spec spec = do@@ -22,4 +24,6 @@ (t1 `before` t2) `shouldBe` True it "duration of t1 is 5" $ duration t1 `shouldBe` 5+ it "t1 is equal to t3" $+ (t1 `equals` t3) `shouldBe` True