packages feed

hsparql 0.2.7 → 0.2.8

raw patch · 3 files changed

+13/−14 lines, 3 filesdep ~rdf4hPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: rdf4h

API changes (from Hackage documentation)

- Database.HSparql.Connection: constructQuery :: (RDF rdf) => EndPoint -> Query ConstructQuery -> IO rdf
+ Database.HSparql.Connection: constructQuery :: forall rdf. (RDF rdf) => EndPoint -> Query ConstructQuery -> IO rdf
- Database.HSparql.Connection: describeQuery :: (RDF rdf) => EndPoint -> Query DescribeQuery -> IO rdf
+ Database.HSparql.Connection: describeQuery :: forall rdf. (RDF rdf) => EndPoint -> Query DescribeQuery -> IO rdf

Files

Database/HSparql/QueryGenerator.hs view
@@ -349,11 +349,11 @@ notExpr = NegatedExpr . expr  -- Builtin Functions-type BuiltinFunc1 = (TermLike a) => a -> Expr+type BuiltinFunc1 = forall a . (TermLike a) => a -> Expr builtinFunc1 :: Function -> BuiltinFunc1 builtinFunc1 f x = BuiltinCall f [expr x] -type BuiltinFunc2 = (TermLike a, TermLike b) => a -> b -> Expr+type BuiltinFunc2 = forall a b . (TermLike a, TermLike b) => a -> b -> Expr builtinFunc2 :: Function -> BuiltinFunc2 builtinFunc2 f x y = BuiltinCall f [expr x, expr y] 
hsparql.cabal view
@@ -1,6 +1,6 @@ Name:          hsparql Homepage:      https://github.com/robstewart57/hsparql-Version:       0.2.7+Version:       0.2.8 Synopsis:      A SPARQL query generator and DSL, and a client to query a SPARQL server. Category:      Database Description:@@ -27,7 +27,7 @@                , HTTP >= 4                , mtl                , xml-               , rdf4h >= 1.3.4+               , rdf4h >= 2.0.0                , bytestring                , MissingH                , network@@ -39,7 +39,7 @@   type:          exitcode-stdio-1.0   main-is:       AllTests.hs   build-depends: hsparql-                 , rdf4h >= 1.3.4+                 , rdf4h >= 2.0.0                  , base                  , text                  , containers
tests/Database/HSparql/ConnectionTest.hs view
@@ -7,7 +7,6 @@ import qualified Data.Map as Map import qualified Data.Text as T import qualified Data.RDF as RDF-import qualified Data.RDF.TriplesGraph as G  import Database.HSparql.Connection import Database.HSparql.QueryGenerator@@ -30,7 +29,7 @@     bvars <- selectQuery endPoint query     assertEqual "bound variables" expectedBVars bvars -    where endPoint = "http://localhost:3000"+    where endPoint = "http://127.0.0.1:3000"           query = do               resource <- prefix "dbprop" (iriRef "http://dbpedia.org/resource/")               dbpprop  <- prefix "dbpedia" (iriRef "http://dbpedia.org/property/")@@ -48,7 +47,7 @@     bool <- askQuery endPoint query     assertBool "invalid" bool -    where endPoint = "http://localhost:3000"+    where endPoint = "http://127.0.0.1:3000"           query = do               resource <- prefix "dbpedia" (iriRef "http://dbpedia.org/resource/")               dbprop  <- prefix "dbprop" (iriRef "http://dbpedia.org/property/")@@ -59,16 +58,16 @@               return AskQuery { queryAsk = [ask] }  test_constructQuery =-  let expectedGraph :: G.TriplesGraph-      expectedGraph = G.mkRdf expectedTriples Nothing (RDF.PrefixMappings Map.empty)+  let expectedGraph :: RDF.TriplesList+      expectedGraph = RDF.mkRdf expectedTriples Nothing (RDF.PrefixMappings Map.empty)       expectedTriples = [ RDF.Triple (RDF.unode "http://dbpedia.org/resource/Kazehakase")                                      (RDF.unode "http://www.example.com/hasName")                                      (RDF.lnode $ RDF.plainLL "Kazehakase" "en") ]   in do-    graph <- constructQuery endPoint query :: IO G.TriplesGraph+    graph <- constructQuery endPoint query :: IO RDF.TriplesList     assertBool "RDF does not include the constructed triple" $ RDF.isIsomorphic expectedGraph graph -    where endPoint = "http://localhost:3000"+    where endPoint = "http://127.0.0.1:3000"           query = do               resource <- prefix "dbpedia" (iriRef "http://dbpedia.org/resource/")               dbpprop  <- prefix "dbprop" (iriRef "http://dbpedia.org/property/")@@ -87,10 +86,10 @@ test_describeQuery =   let expectedNode = RDF.unode "http://dbpedia.org/resource/Edinburgh"   in do-    graph <- describeQuery endPoint query :: IO G.TriplesGraph+    graph <- describeQuery endPoint query :: IO RDF.TriplesList     assertBool "RDF does not include the required node" $ RDF.rdfContainsNode graph expectedNode -    where endPoint = "http://localhost:3000"+    where endPoint = "http://127.0.0.1:3000"           query = do               resource <- prefix "dbpedia" (iriRef "http://dbpedia.org/resource/")               uri <- describeIRI (resource .:. "Edinburgh")