packages feed

swish 0.9.1.10 → 0.9.2.0

raw patch · 6 files changed

+52/−15 lines, 6 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Swish.RDF.Graph: instance Swish.RDF.Graph.FromRDFLabel Data.Time.Clock.UTC.UTCTime
- Swish.RDF.Graph: instance Swish.RDF.Graph.ToRDFLabel Data.Time.Clock.UTC.UTCTime
+ Swish.GraphMem: instance Swish.GraphClass.Label lb => Data.Semigroup.Semigroup (Swish.GraphMem.GraphMem lb)
+ Swish.RDF.Graph: instance Swish.GraphClass.Label lb => Data.Semigroup.Semigroup (Swish.RDF.Graph.NSGraph lb)
+ Swish.RDF.Graph: instance Swish.RDF.Graph.FromRDFLabel Data.Time.Clock.Internal.UTCTime.UTCTime
+ Swish.RDF.Graph: instance Swish.RDF.Graph.ToRDFLabel Data.Time.Clock.Internal.UTCTime.UTCTime
+ Swish.VarBinding: instance (GHC.Classes.Ord a, GHC.Classes.Ord b) => Data.Semigroup.Semigroup (Swish.VarBinding.VarBinding a b)
- Data.String.ShowLines: class (Show sh) => ShowLines sh where showls _ = shows
+ Data.String.ShowLines: class (Show sh) => ShowLines sh
- Swish.GraphClass: addGraphs :: (LDGraph lg lb, Ord lb) => lg lb -> lg lb -> lg lb
+ Swish.GraphClass: addGraphs :: (LDGraph lg lb, (Ord lb)) => lg lb -> lg lb -> lg lb
- Swish.GraphClass: class LDGraph lg lb where extract sel = update (filter sel) addGraphs addg = update (union (getArcs addg)) delete g1 g2 = setArcs g2 (getArcs g2 `difference` getArcs g1) labels = getComponents arcLabels . getArcs nodes = getComponents arcNodes . getArcs update f g = setArcs g (f (getArcs g))
+ Swish.GraphClass: class LDGraph lg lb
- Swish.GraphClass: delete :: (LDGraph lg lb, Ord lb) => lg lb -> lg lb -> lg lb
+ Swish.GraphClass: delete :: (LDGraph lg lb, (Ord lb)) => lg lb -> lg lb -> lg lb
- Swish.GraphClass: extract :: (LDGraph lg lb, Ord lb) => Selector lb -> lg lb -> lg lb
+ Swish.GraphClass: extract :: (LDGraph lg lb, (Ord lb)) => Selector lb -> lg lb -> lg lb
- Swish.GraphClass: labels :: (LDGraph lg lb, Ord lb) => lg lb -> Set lb
+ Swish.GraphClass: labels :: (LDGraph lg lb, (Ord lb)) => lg lb -> Set lb
- Swish.GraphClass: nodes :: (LDGraph lg lb, Ord lb) => lg lb -> Set lb
+ Swish.GraphClass: nodes :: (LDGraph lg lb, (Ord lb)) => lg lb -> Set lb
- Swish.GraphMem: addGraphs :: (LDGraph lg lb, Ord lb) => lg lb -> lg lb -> lg lb
+ Swish.GraphMem: addGraphs :: (LDGraph lg lb, (Ord lb)) => lg lb -> lg lb -> lg lb
- Swish.GraphMem: delete :: (LDGraph lg lb, Ord lb) => lg lb -> lg lb -> lg lb
+ Swish.GraphMem: delete :: (LDGraph lg lb, (Ord lb)) => lg lb -> lg lb -> lg lb
- Swish.GraphMem: extract :: (LDGraph lg lb, Ord lb) => Selector lb -> lg lb -> lg lb
+ Swish.GraphMem: extract :: (LDGraph lg lb, (Ord lb)) => Selector lb -> lg lb -> lg lb
- Swish.GraphMem: labels :: (LDGraph lg lb, Ord lb) => lg lb -> Set lb
+ Swish.GraphMem: labels :: (LDGraph lg lb, (Ord lb)) => lg lb -> Set lb
- Swish.RDF.Graph: addGraphs :: (LDGraph lg lb, Ord lb) => lg lb -> lg lb -> lg lb
+ Swish.RDF.Graph: addGraphs :: (LDGraph lg lb, (Ord lb)) => lg lb -> lg lb -> lg lb
- Swish.RDF.Graph: class LDGraph lg lb where extract sel = update (filter sel) addGraphs addg = update (union (getArcs addg)) delete g1 g2 = setArcs g2 (getArcs g2 `difference` getArcs g1) labels = getComponents arcLabels . getArcs nodes = getComponents arcNodes . getArcs update f g = setArcs g (f (getArcs g))
+ Swish.RDF.Graph: class LDGraph lg lb
- Swish.RDF.Graph: delete :: (LDGraph lg lb, Ord lb) => lg lb -> lg lb -> lg lb
+ Swish.RDF.Graph: delete :: (LDGraph lg lb, (Ord lb)) => lg lb -> lg lb -> lg lb
- Swish.RDF.Graph: extract :: (LDGraph lg lb, Ord lb) => Selector lb -> lg lb -> lg lb
+ Swish.RDF.Graph: extract :: (LDGraph lg lb, (Ord lb)) => Selector lb -> lg lb -> lg lb
- Swish.RDF.Graph: labels :: (LDGraph lg lb, Ord lb) => lg lb -> Set lb
+ Swish.RDF.Graph: labels :: (LDGraph lg lb, (Ord lb)) => lg lb -> Set lb
- Swish.RDF.Graph: nodes :: (LDGraph lg lb, Ord lb) => lg lb -> Set lb
+ Swish.RDF.Graph: nodes :: (LDGraph lg lb, (Ord lb)) => lg lb -> Set lb

Files

CHANGELOG view
@@ -1,3 +1,9 @@+0.9.2.0:++  Initial support for ghc 8.4. Updated to lts 10.8 in stack.yaml so+  was able to drop extra intern dependency version. Now builds with+  -Wcompat if ghc 8.0 or later is used.+ 0.9.1.10:    Updated the upper bound on time to work with ghc 8.2.1. Updated
src/Swish/GraphMem.hs view
@@ -8,7 +8,7 @@ -- | --  Module      :  GraphMem --  Copyright   :  (c) 2003, Graham Klyne, 2009 Vasili I Galchin,---                 2011, 2012, 2014, 2016 Douglas Burke+--                 2011, 2012, 2014, 2016, 2018 Douglas Burke --  License     :  GPL V2 -- --  Maintainer  :  Douglas Burke@@ -32,6 +32,8 @@     , matchGraphMem     ) where +import qualified Data.Set as S+ import Swish.GraphClass import Swish.GraphMatch @@ -41,7 +43,9 @@ #endif import Data.Ord (comparing) -import qualified Data.Set as S+#if !(MIN_VERSION_base(4, 11, 0))+import Data.Semigroup+#endif  -- | Simple memory-based graph type.  @@ -61,9 +65,14 @@ instance (Label lb) => Show (GraphMem lb) where     show = graphShow +instance (Label lb) => Semigroup (GraphMem lb) where+    (<>) = addGraphs+ instance (Label lb) => Monoid (GraphMem lb) where     mempty  = emptyGraph-    mappend = addGraphs+#if !(MIN_VERSION_base(4, 11, 0))+    mappend = (<>)+#endif  graphShow   :: (Label lb) => GraphMem lb -> String graphShow g = "Graph:" ++ S.foldr ((++) . ("\n    " ++) . show) "" (arcs g)
src/Swish/RDF/Graph.hs view
@@ -9,7 +9,7 @@ -- | --  Module      :  Graph --  Copyright   :  (c) 2003, Graham Klyne, 2009 Vasili I Galchin,---                 2011, 2012, 2013, 2014, 2015, 2016 Douglas Burke+--                 2011, 2012, 2013, 2014, 2015, 2016, 2018 Douglas Burke --  License     :  GPL V2 -- --  Maintainer  :  Douglas Burke@@ -221,6 +221,10 @@ import System.Locale (defaultTimeLocale)   #endif +#if !(MIN_VERSION_base(4, 11, 0))+import Data.Semigroup+#endif+ import Text.Printf  import qualified Data.Map as M@@ -1283,10 +1287,17 @@     getArcs      = statements      setArcs g as = g { statements=as } --- | The 'mappend' operation uses 'merge' rather than 'addGraphs'.+-- | The '<>' operation uses 'merge' rather than 'addGraphs'.+instance (Label lb) => Semigroup (NSGraph lb) where+    (<>) = merge++-- | The 'mappend' operation uses the Semigroup instance+--   (so 'merge' rather than 'addGraphs'). instance (Label lb) => Monoid (NSGraph lb) where     mempty  = emptyGraph-    mappend = merge+#if !(MIN_VERSION_base(4, 11, 0))+    mappend = (<>)+#endif  -- fmapNSGraph :: (Ord lb1, Ord lb2) => (lb1 -> lb2) -> NSGraph lb1 -> NSGraph lb2   
src/Swish/VarBinding.hs view
@@ -9,7 +9,7 @@ -- | --  Module      :  VarBinding --  Copyright   :  (c) 2003, Graham Klyne, 2009 Vasili I Galchin, ---                 2011, 2012, 2014, 2015, 2016 Douglas Burke+--                 2011, 2012, 2014, 2015, 2016, 2018 Douglas Burke --  License     :  GPL V2 -- --  Maintainer  :  Douglas Burke@@ -54,6 +54,10 @@ import Data.Monoid (Monoid(..), mconcat) #endif +#if !(MIN_VERSION_base(4, 11, 0))+import Data.Semigroup+#endif+ import Control.Monad (mplus)  import Data.Function (on)@@ -92,9 +96,14 @@  -- | When combining instances, if there is an overlapping binding then --   the  value from the first instance is used.+instance (Ord a, Ord b) => Semigroup (VarBinding a b) where+    (<>) = joinVarBindings+     instance (Ord a, Ord b) => Monoid (VarBinding a b) where     mempty = nullVarBinding-    mappend = joinVarBindings+#if !(MIN_VERSION_base(4, 11, 0))+    mappend = (<>)+#endif  -- | The Show instance only displays the pairs of variables --    in the binding.@@ -102,7 +111,7 @@ instance (Show a, Show b) => Show (VarBinding a b) where     show = show . S.toList . vbEnum --- | The null, or empry, binding maps no query variables.+-- | The null, or empty, binding maps no query variables. --   This is the 'mempty' instance of the Monoid. -- nullVarBinding :: VarBinding a b
stack.yaml view
@@ -1,6 +1,4 @@ flags: {} packages: - '.'-extra-deps:-- intern-0.9.1.4-resolver: lts-9.1+resolver: lts-10.8
swish.cabal view
@@ -1,5 +1,5 @@ Name:               swish-Version:            0.9.1.10+Version:            0.9.2.0 Stability:          experimental License:            LGPL License-file:       LICENSE @@ -178,8 +178,12 @@       Swish.Utils.ListHelpers       Swish.VarBinding -   ghc-options:-      -Wall -fno-warn-orphans+   if impl(ghc < 8.0.0)+     ghc-options:+        -Wall -fno-warn-orphans+   if impl(ghc >= 8.0.0)+     ghc-options:+        -Wall -Wcompat -fno-warn-orphans     -- if flag(developer)    --    ghc-options: -Werror