packages feed

net-spider 0.4.0.0 → 0.4.0.1

raw patch · 4 files changed

+46/−6 lines, 4 filesdep ~data-intervalPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: data-interval

API changes (from Hackage documentation)

+ NetSpider.Interval: lowerBound' :: Interval r -> IntervalEnd r
+ NetSpider.Interval: upperBound' :: Interval r -> IntervalEnd r
- NetSpider.Interval: interval :: Ord r => (Extended r, Bool) -> (Extended r, Bool) -> Interval r
+ NetSpider.Interval: interval :: Ord r => IntervalEnd r -> IntervalEnd r -> Interval r

Files

ChangeLog.md view
@@ -1,5 +1,9 @@ # Revision history for net-spider +## 0.4.0.1  -- 2019-12-29++* Confirm test with `data-interval-2.0.1`.+ ## 0.4.0.0  -- 2019-12-28  * Use `greskell-1.0.0.0`.
net-spider.cabal view
@@ -1,5 +1,5 @@ name:                   net-spider-version:                0.4.0.0+version:                0.4.0.1 author:                 Toshio Ito <debug.ito@gmail.com> maintainer:             Toshio Ito <debug.ito@gmail.com> license:                BSD3@@ -26,7 +26,8 @@                         TypeSynonymInstances,                         UndecidableInstances,                         NoMonomorphismRestriction,-                        FlexibleContexts+                        FlexibleContexts,+                        CPP   exposed-modules:      NetSpider,                         NetSpider.Input,                         NetSpider.Output,@@ -60,7 +61,7 @@                         unordered-containers >=0.2.8 && <0.3,                         hashable >=1.2.6.1 && <1.4,                         containers >=0.5.10.2 && <0.7,-                        data-interval >=1.3.0 && <1.4,+                        data-interval >=1.3.0 && <2.1,                         extended-reals >=0.2.3.0 && <0.3,                         monad-logger >=0.3.28.1 && <0.4,                         scientific >=0.3.6.2 && <0.4
src/NetSpider/Interval.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} -- | -- Module: NetSpider.Interval -- Description: Interval type and Interval of Timestamps@@ -10,10 +11,14 @@   ( -- * Re-exports     Interval,     Extended(..),-    interval, (<=..<=), (<..<=), (<=..<), (<..<),+    (<=..<=), (<..<=), (<=..<), (<..<),     -- * Types     IntervalEnd,     ErrorMsg,+    -- * Basic operations+    interval,+    lowerBound',+    upperBound',     -- * Parsers     parseTimeIntervalEnd,     parseIntervalEnd,@@ -25,7 +30,7 @@  import Data.ExtendedReal (Extended(..)) import Data.Int (Int64)-import Data.Interval (Interval, interval, (<=..<=), (<..<=), (<=..<), (<..<))+import Data.Interval (Interval, (<=..<=), (<..<=), (<=..<), (<..<)) import qualified Data.Interval as Interval  import NetSpider.Timestamp (Timestamp, addSec, parseTimestamp, fromEpochMillisecond)@@ -35,6 +40,36 @@ -- -- @since 0.3.2.0 type IntervalEnd a = (Extended a, Bool)++-- | Make an 'Interval' from lower and upper bounds.+interval :: Ord r+         => IntervalEnd r -- ^ lower bound+         -> IntervalEnd r -- ^ upper bound+         -> Interval r++-- | Get the lower bound.+lowerBound' :: Interval r -> IntervalEnd r++-- | Get the upper bound.+upperBound' :: Interval r -> IntervalEnd r++#if MIN_VERSION_data_interval(2,0,0)+fromBoundary :: Interval.Boundary -> Bool+fromBoundary Interval.Open = False+fromBoundary Interval.Closed = True++toBoundary :: Bool -> Interval.Boundary+toBoundary False = Interval.Open+toBoundary True = Interval.Closed++interval l u = Interval.interval (fmap toBoundary l) (fmap toBoundary u)+lowerBound' = fmap fromBoundary . Interval.lowerBound'+upperBound' = fmap fromBoundary . Interval.upperBound'+#else+interval = Interval.interval+lowerBound' = Interval.lowerBound'+upperBound' = Interval.upperBound'+#endif  -- | Error message type. type ErrorMsg = String
src/NetSpider/Spider/Internal/Graph.hs view
@@ -43,7 +43,6 @@     pGt, pGte, pLt, pLte   ) import Data.Int (Int64)-import Data.Interval (lowerBound', upperBound') import Data.Text (Text, pack) import Data.Time.LocalTime (TimeZone(..)) import Data.Traversable (traverse)@@ -57,6 +56,7 @@     gFindsTarget   ) import NetSpider.Found (FoundLink(..), LinkState(..), FoundNode(..), linkStateToText)+import NetSpider.Interval (lowerBound', upperBound') import NetSpider.Query (Interval, Extended(..)) import NetSpider.Timestamp (Timestamp(..)) import NetSpider.Spider.Config (Config(..))