packages feed

hsparql 0.3.8 → 0.3.9

raw patch · 7 files changed

+105/−97 lines, 7 filesdep +crypton-connectiondep +data-defaultdep −connection

Dependencies added: crypton-connection, data-default

Dependencies removed: connection

Files

Database/HSparql/Connection.hs view
@@ -26,6 +26,7 @@ import Control.Monad.IO.Class import qualified Data.ByteString.Char8 as B import qualified Data.ByteString.Lazy.Char8 as LB+import Data.Default (def) import Data.Maybe (isJust, mapMaybe) import qualified Data.RDF as RDF import qualified Data.Text as T@@ -74,8 +75,8 @@       where         pVar v = maybe Unbound (value . head . elChildren) $ filterElement (pred_ v) e         pred_ v e' = isJust $ do-          a <- findAttr (unqual "name") e'-          guard $ a == v+          x <- findAttr (unqual "name") e'+          guard $ x == v      value :: Element -> BindingValue     value e =@@ -143,7 +144,7 @@           { method = "GET",             requestHeaders = [h1, h2]           }-  let settings = mkManagerSettings (TLSSettingsSimple True False False) Nothing+  let settings = mkManagerSettings (TLSSettingsSimple True False False def) Nothing   manager <- liftIO $ newManager settings   resp <- httpLbs request manager   return $ structureContent (LB.unpack (responseBody resp))@@ -161,7 +162,7 @@           { method = "GET",             requestHeaders = [h1, h2, h3, h4]           }-  let settings = mkManagerSettings (TLSSettingsSimple True False False) Nothing+  let settings = mkManagerSettings (TLSSettingsSimple True False False def) Nothing   manager <- liftIO $ newManager settings   resp <- httpLbs request manager   return $ parseAsk (LB.unpack (responseBody resp))@@ -180,7 +181,7 @@             requestHeaders = [h1, h2, h3],             requestBody = RequestBodyBS (T.encodeUtf8 (T.pack body))           }-  let settings = mkManagerSettings (TLSSettingsSimple True False False) Nothing+  let settings = mkManagerSettings (TLSSettingsSimple True False False def) Nothing   manager <- liftIO $ newManager settings   resp <- httpLbs request manager   return $ parseUpdate (LB.unpack (responseBody resp))@@ -213,7 +214,7 @@           { method = "GET",             requestHeaders = [h1, h2]           }-  let settings = mkManagerSettings (TLSSettingsSimple True False False) Nothing+  let settings = mkManagerSettings (TLSSettingsSimple True False False def) Nothing   manager <- liftIO $ newManager settings   resp <- httpLbs request manager   return $ RDF.parseString (TurtleParser Nothing Nothing) $ E.decodeUtf8 (LB.toStrict (responseBody resp))
Database/HSparql/QueryGenerator.hs view
@@ -174,6 +174,7 @@     AskQuery (..),     UpdateQuery (..),     DescribeQuery (..),+    IRIRef (..),      -- * Classes     TermLike (..),@@ -183,6 +184,7 @@   ) where +import Control.Monad (void) import Control.Monad.State import Data.List (intercalate, intersperse) import qualified Data.List as L@@ -275,45 +277,45 @@ --   See SPARQL* at <https://wiki.blazegraph.com/wiki/index.php/Reification_Done_Right> --   or <https://arxiv.org/abs/1406.3399>. embeddedTriple :: (SubjectTermLike a, PredicateTermLike b, ObjectTermLike c) => a -> b -> c -> EmbeddedTriple-embeddedTriple a b c = EmbeddedTriple $ EmbeddedTriple' (varOrTerm a) (varOrTerm b) (varOrTerm c)+embeddedTriple x y z = EmbeddedTriple $ EmbeddedTriple' (varOrTerm x) (varOrTerm y) (varOrTerm z)  -- | Restrict the query to only results for which values match constants in this --   triple, or for which the variables can be bound. triple :: (SubjectTermLike a, PredicateTermLike b, ObjectTermLike c) => a -> b -> c -> Query Pattern-triple a b c = do-  let t = QTriple (varOrTerm a) (varOrTerm b) (varOrTerm c)+triple x y z = do+  let t = QTriple (varOrTerm x) (varOrTerm y) (varOrTerm z)   modify $ \s -> s {pattern = appendPattern t (pattern s)}   return t  triple_ :: (SubjectTermLike a, PredicateTermLike b, ObjectTermLike c) => a -> b -> c -> Query ()-triple_ a b c = void $ triple a b c+triple_ x y z = void $ triple x y z  constructTriple :: (SubjectTermLike a, PredicateTermLike b, ObjectTermLike c) => a -> b -> c -> Query Pattern-constructTriple a b c = do-  let t = QTriple (varOrTerm a) (varOrTerm b) (varOrTerm c)+constructTriple x y z = do+  let t = QTriple (varOrTerm x) (varOrTerm y) (varOrTerm z)   modify $ \s -> s {constructTriples = appendTriple t (constructTriples s)}   return t  constructTriple_ :: (SubjectTermLike a, PredicateTermLike b, ObjectTermLike c) => a -> b -> c -> Query ()-constructTriple_ a b c = void $ constructTriple a b c+constructTriple_ x y z = void $ constructTriple x y z  askTriple :: (SubjectTermLike a, PredicateTermLike b, ObjectTermLike c) => a -> b -> c -> Query Pattern-askTriple a b c = do-  let t = QTriple (varOrTerm a) (varOrTerm b) (varOrTerm c)+askTriple x y z = do+  let t = QTriple (varOrTerm x) (varOrTerm y) (varOrTerm z)   modify $ \s -> s {askTriples = appendTriple t (askTriples s)}   return t  askTriple_ :: (SubjectTermLike a, PredicateTermLike b, ObjectTermLike c) => a -> b -> c -> Query ()-askTriple_ a b c = void $ askTriple a b c+askTriple_ x y z = void $ askTriple x y z  updateTriple :: (SubjectTermLike a, PredicateTermLike b, ObjectTermLike c) => a -> b -> c -> Query Pattern-updateTriple a b c = do-  let t = QTriple (varOrTerm a) (varOrTerm b) (varOrTerm c) -- TODO: should only allow terms+updateTriple x y z = do+  let t = QTriple (varOrTerm x) (varOrTerm y) (varOrTerm z) -- TODO: should only allow terms   modify $ \s -> s {updateTriples = appendTriple t (updateTriples s)}   return t  updateTriple_ :: (SubjectTermLike a, PredicateTermLike b, ObjectTermLike c) => a -> b -> c -> Query ()-updateTriple_ a b c = void $ updateTriple a b c+updateTriple_ x y z = void $ updateTriple x y z  describeIRI :: IRIRef -> Query IRIRef describeIRI newIri = do@@ -398,7 +400,7 @@   return union'  union_ :: Query a -> Query b -> Query ()-union_ a b = void $ union a b+union_ x y = void $ union x y  filterExists :: Query a -> Query Pattern filterExists q = do@@ -438,7 +440,7 @@   return b  bind_ :: Expr -> Variable -> Query ()-bind_ a b = void $ bind a b+bind_ x y = void $ bind x y  -- | Perform a subquery. subQuery :: Query SelectQuery -> Query Pattern@@ -569,9 +571,11 @@ instance TermLike T.Text where   varOrTerm = Term . RDFLiteralTerm . RDF.plainL +-- | Represent a literal with a language. Ex. "earth"@en instance TermLike (T.Text, T.Text) where   varOrTerm (s, lang') = Term . RDFLiteralTerm $ RDF.plainLL s lang' +-- | Represent a literal with its type. Ex. "1"^^xsd:integer instance TermLike (T.Text, IRIRef) where   varOrTerm (s, ref) = Term . RDFLiteralTerm $ RDF.typedL s (getFQN ref) @@ -917,10 +921,10 @@ type BlankNodePattern = [DynamicPredicateObject]  instance Show DynamicPredicate where-  show (DynamicPredicate a) = show a+  show (DynamicPredicate x) = show x  instance Show DynamicObject where-  show (DynamicObject a) = show a+  show (DynamicObject x) = show x  -- | support for blank nodes. --@@ -1019,7 +1023,7 @@   | StrStartsFunc   | StrEndsFunc   | ContainsFunc-  | ContainsWithFunc +  | ContainsWithFunc   | StrBeforeFunc   | StrAfterFunc   | ConcatFunc@@ -1184,7 +1188,7 @@ instance QueryShow VarOrTerm where   qshow (Var v) = qshow v   qshow (Term t) = qshow t-  qshow (EmbeddedTriple' a b c) = intercalate " " ["<<", qshow a, qshow b, qshow c, ">>"]+  qshow (EmbeddedTriple' x y z) = intercalate " " ["<<", qshow x, qshow y, qshow z, ">>"]   qshow (BlankNodePattern' bn) = qshow bn  instance QueryShow [VarOrTerm] where@@ -1234,7 +1238,7 @@   qshow StrStartsFunc = "STRSTARTS"   qshow StrEndsFunc = "STARTENDS"   qshow ContainsFunc = "CONTAINS"-  qshow ContainsWithFunc= "bif:contains"+  qshow ContainsWithFunc = "bif:contains"   qshow StrBeforeFunc = "STRBEFORE"   qshow StrAfterFunc = "STRAFTER"   qshow ConcatFunc = "CONCAT"@@ -1270,7 +1274,7 @@   qshow = intercalate " " . fmap qshow  instance QueryShow Pattern where-  qshow (QTriple a b c) = intercalate " " [qshow a, qshow b, qshow c, "."]+  qshow (QTriple x y z) = intercalate " " [qshow x, qshow y, qshow z, "."]   qshow (Filter e) = "FILTER " ++ qshow e ++ " ."   qshow (FilterExistsPattern p) = "FILTER EXISTS " ++ qshow p   qshow (FilterNotExistsPattern p) = "FILTER NOT EXISTS " ++ qshow p
hsparql.cabal view
@@ -1,5 +1,5 @@ Name:          hsparql-Version:       0.3.8+Version:       0.3.9 Synopsis:      A SPARQL query generator and DSL, and a client to query a SPARQL server. Category:      Database Description:@@ -23,6 +23,7 @@   Exposed-modules: Database.HSparql.Connection                  , Database.HSparql.QueryGenerator   Build-depends: base >= 4 && < 5+               , data-default                , HTTP >= 4                , mtl                , xml@@ -35,7 +36,7 @@                , http-client                , http-types                , http-conduit-               , connection+               , crypton-connection                , bytestring   ghc-options: -Wall -Wcompat   default-language: Haskell2010
tests/AllTests.hs view
@@ -4,14 +4,14 @@  import Control.Concurrent (forkIO) import Control.Monad (join)-import DBPedia -- to ensure the DBPedia.hs file compiles+import DBPedia () -- to ensure the DBPedia.hs file compiles import Database.HSparql.ConnectionTest import Database.HSparql.QueryGeneratorTest import Network.HTTP.Types (status200) import Network.Wai import Network.Wai.Handler.Warp (run) import Test.Framework-import Wikidata -- to ensure the Wikidata.hs file compiles+import Wikidata () -- to ensure the Wikidata.hs file compiles  main :: IO () main =
tests/DBPedia.hs view
@@ -37,26 +37,26 @@ simpleSelect = do   resource <- prefix "dbprop" (iriRef "http://dbpedia.org/resource/")   dbpprop <- prefix "dbpedia" (iriRef "http://dbpedia.org/property/")-  foaf <- prefix "foaf" (iriRef "http://xmlns.com/foaf/0.1/")+  foaf' <- prefix "foaf" (iriRef "http://xmlns.com/foaf/0.1/")    x <- var   name <- var -  triple x (dbpprop .:. "genre") (resource .:. "Web_browser")-  triple x (foaf .:. "name") name+  triple_ x (dbpprop .:. "genre") (resource .:. "Web_browser")+  triple_ x (foaf' .:. "name") name    selectVars [name]  simpleSelectWithLiteral :: Query SelectQuery simpleSelectWithLiteral = do   ontology <- prefix "dbpedia" (iriRef "http://dbpedia.org/ontology/")-  rdf <- prefix "rdf" (iriRef "http://www.w3.org/1999/02/22-rdf-syntax-ns#")-  rdfs <- prefix "rdfs" (iriRef "http://www.w3.org/2000/01/rdf-schema#")+  rdf' <- prefix "rdf" (iriRef "http://www.w3.org/1999/02/22-rdf-syntax-ns#")+  rdfs' <- prefix "rdfs" (iriRef "http://www.w3.org/2000/01/rdf-schema#")    l <- var -  triple l (rdf .:. "type") (ontology .:. "ProgrammingLanguage")-  triple l (rdfs .:. "label") (("D (programming language)", "en") :: (Text, Text))+  triple_ l (rdf' .:. "type") (ontology .:. "ProgrammingLanguage")+  triple_ l (rdfs' .:. "label") (("D (programming language)", "en") :: (Text, Text))    selectVars [l] @@ -64,7 +64,7 @@ simpleConstruct = do   resource <- prefix "dbpedia" (iriRef "http://dbpedia.org/resource/")   dbpprop <- prefix "dbprop" (iriRef "http://dbpedia.org/property/")-  foaf <- prefix "foaf" (iriRef "http://xmlns.com/foaf/0.1/")+  foaf' <- prefix "foaf" (iriRef "http://xmlns.com/foaf/0.1/")   example <- prefix "example" (iriRef "http://www.example.com/")    x <- var@@ -72,8 +72,8 @@    construct <- constructTriple x (example .:. "hasName") name -  triple x (dbpprop .:. "genre") (resource .:. "Web_browser")-  triple x (foaf .:. "name") name+  triple_ x (dbpprop .:. "genre") (resource .:. "Web_browser")+  triple_ x (foaf' .:. "name") name    return ConstructQuery {queryConstructs = [construct]} @@ -97,24 +97,24 @@ trickySelect = do   resource <- prefix "dbpedia" (iriRef "http://dbpedia.org/resource/")   dbpprop <- prefix "dbprop" (iriRef "http://dbpedia.org/property/")-  foaf <- prefix "foaf" (iriRef "http://xmlns.com/foaf/0.1/")-  owl <- prefix "owl" (iriRef "http://www.w3.org/2002/07/owl#")+  foaf' <- prefix "foaf" (iriRef "http://xmlns.com/foaf/0.1/")+  owl' <- prefix "owl" (iriRef "http://www.w3.org/2002/07/owl#")    x <- var   name <- var   fbase <- var    -- Identify-  triple x (dbpprop .:. "genre") (resource .:. "Web_browser")+  triple_ x (dbpprop .:. "genre") (resource .:. "Web_browser")    -- Query-  triple x (foaf .:. "name") name-  optional $ do-    triple x (owl .:. "sameAs") fbase-    filterExpr $ regex fbase ("freebase" :: Text)-  filterExpr $ notExpr $ bound fbase+  triple_ x (foaf' .:. "name") name+  optional_ $ do+    triple_ x (owl' .:. "sameAs") fbase+    filterExpr_ $ regex fbase ("freebase" :: Text)+  filterExpr_ $ notExpr $ bound fbase -  distinct+  distinct_    orderNext name   orderNextDesc fbase@@ -123,9 +123,9 @@  frenchFilmsSelect :: Query SelectQuery frenchFilmsSelect = do-  skos <- prefix "skos" (iriRef "http://www.w3.org/2004/02/skos/core#")+  skos' <- prefix "skos" (iriRef "http://www.w3.org/2004/02/skos/core#")   film <- var-  triple film (skos .:. "subject") (iriRef "http://dbpedia.org/resource/Category:French_films")+  triple_ film (skos' .:. "subject") (iriRef "http://dbpedia.org/resource/Category:French_films")   selectVars [film]  -- return SelectQuery {queryExpr = [film]}@@ -136,18 +136,18 @@   hasValue <- var   isValueOf <- var -  union-    (triple (iriRef "http://dbpedia.org/resource/Category:First-person_shooters") property hasValue)-    (triple isValueOf property (iriRef "http://dbpedia.org/resource/Category:First-person_shooters"))+  union_+    (triple_ (iriRef "http://dbpedia.org/resource/Category:First-person_shooters") property hasValue)+    (triple_ isValueOf property (iriRef "http://dbpedia.org/resource/Category:First-person_shooters"))    selectVars [isValueOf]  berlinersSelect :: Query SelectQuery berlinersSelect = do-  xsd <- prefix "xsd" (iriRef "http://www.w3.org/2001/XMLSchema#")+  xsd' <- prefix "xsd" (iriRef "http://www.w3.org/2001/XMLSchema#")   prop <- prefix "prop" (iriRef "http://dbpedia.org/property/")   dbo <- prefix "dbo" (iriRef "http://dbpedia.org/ontology/")-  foaf <- prefix "foaf" (iriRef "http://xmlns.com/foaf/0.1/")+  foaf' <- prefix "foaf" (iriRef "http://xmlns.com/foaf/0.1/")   resc <- prefix "resc" (iriRef "http://dbpedia.org/resource/")    name <- var@@ -156,13 +156,13 @@   person <- var   knownfor <- var -  triple person (prop .:. "birthPlace") (resc .:. "Berlin")-  triple person (dbo .:. "birthDate") birth-  triple person (foaf .:. "name") name-  triple person (dbo .:. "deathDate") death+  triple_ person (prop .:. "birthPlace") (resc .:. "Berlin")+  triple_ person (dbo .:. "birthDate") birth+  triple_ person (foaf' .:. "name") name+  triple_ person (dbo .:. "deathDate") death -  filterExpr $ birth .<. ("1900-01-01" :: Text, xsd .:. "date")+  filterExpr_ $ birth .<. ("1900-01-01" :: Text, xsd' .:. "date") -  optional $ triple person (prop .:. "KnownFor") knownfor+  optional_ $ triple_ person (prop .:. "KnownFor") knownfor    selectVars [name, birth, death, person, knownfor]
tests/Database/HSparql/QueryGeneratorTest.hs view
@@ -1,5 +1,8 @@ {-# LANGUAGE QuasiQuotes #-}-{-# LANGUAGE PostfixOperators  #-}+{-# LANGUAGE PostfixOperators #-}+{-# LANGUAGE TypeSynonymInstances #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE OverloadedStrings #-}  module Database.HSparql.QueryGeneratorTest ( testSuite ) where @@ -9,7 +12,7 @@  import Data.Text (Text) import qualified Data.Text as T-import Data.String.QQ (s)+import qualified Data.String.QQ as Str  import Database.HSparql.QueryGenerator @@ -33,14 +36,14 @@  normalizeWhitespace :: Text -> Text normalizeWhitespace = T.strip-                      . (T.replace "  " " ")-                      . (T.replace "  " " ")-                      . (T.replace "  " " ")-                      . (T.replace "\n" " ")+                      . T.replace "  " " "+                      . T.replace "  " " "+                      . T.replace "  " " "+                      . T.replace "\n" " "  queryTexts :: [(Text, Text)] queryTexts =-  [ ( [s|+  [ ( [Str.s| PREFIX dbpedia: <http://dbpedia.org/resource/> PREFIX dbprop: <http://dbpedia.org/property/> PREFIX foaf: <http://xmlns.com/foaf/0.1/>@@ -67,7 +70,7 @@         selectVars [name, page]     ) -  , ( [s|+  , ( [Str.s| PREFIX dbpedia: <http://dbpedia.org/resource/> PREFIX dbprop: <http://dbpedia.org/property/> PREFIX foaf: <http://xmlns.com/foaf/0.1/>@@ -100,7 +103,7 @@         return ConstructQuery { queryConstructs = [construct] }     ) -  , ( [s|+  , ( [Str.s| PREFIX dbpedia: <http://dbpedia.org/resource/> DESCRIBE dbpedia:Edinburgh WHERE {  } |]     , createQuery $ do@@ -109,7 +112,7 @@         return DescribeQuery { queryDescribe = uri }     ) -  , ( [s|+  , ( [Str.s| PREFIX dbpedia: <http://dbpedia.org/resource/> PREFIX dbprop: <http://dbpedia.org/property/> ASK {@@ -127,7 +130,7 @@     )    -- https://github.com/robstewart57/hsparql/pull/31-  , ( [s|+  , ( [Str.s| PREFIX : <http://example1.com/> PREFIX ex: <http://example2.com/> SELECT ?x0 WHERE {@@ -156,7 +159,7 @@     )    -- https://www.w3.org/TR/sparql11-query/#OptionalMatching-  , ( [s|+  , ( [Str.s| PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?x1 ?x2 WHERE {@@ -180,7 +183,7 @@     )    -- https://www.w3.org/TR/sparql11-query/#alternatives-  , ( [s|+  , ( [Str.s| PREFIX dc10: <http://purl.org/dc/elements/1.0/> PREFIX dc11: <http://purl.org/dc/elements/1.1/> @@ -202,7 +205,7 @@     )    -- https://www.w3.org/TR/sparql11-query/#neg-notexists-  , ( [s|+  , ( [Str.s| PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX foaf: <http://xmlns.com/foaf/0.1/> @@ -228,7 +231,7 @@         selectVars [person]     ) -  , ( [s|+  , ( [Str.s| PREFIX ex: <http://example.com/>  SELECT ?x0 ?x1@@ -249,7 +252,7 @@     )    -- Count distinct subjects and objects query-  , ( [s|+  , ( [Str.s| SELECT ((COUNT(?x0)) AS ?x4) WHERE {@@ -280,7 +283,7 @@     )    -- Count number of instances of each class in the dataset.-  , ( [s|+  , ( [Str.s| SELECT ?x1 ((COUNT(?x0)) AS ?x2) WHERE {   ?x0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?x1 . } GROUP BY ?x1@@ -298,7 +301,7 @@     )    -- Count number of resources typed with a class from Wikidata.-  , ( [s|+  , ( [Str.s| SELECT ((COUNT(?x0)) AS ?x2) WHERE {   ?x0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?x1 .   FILTER (CONTAINS((STR(?x1)), "http://www.wikidata.org/entity")) .@@ -317,7 +320,7 @@     )    -- Create a federated query-  , ( [s|+  , ( [Str.s| PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?x1 WHERE {   <http://example.org/myfoaf/I> foaf:knows ?x0 .@@ -341,7 +344,7 @@     )    -- Create query containing property paths-  , ( [s|+  , ( [Str.s| PREFIX foaf: <http://xmlns.com/foaf/0.1/>  SELECT ?x0 ?x1 WHERE {@@ -361,7 +364,7 @@         selectVars [s, o]     ) -  , ( [s|+  , ( [Str.s| PREFIX foaf: <http://xmlns.com/foaf/0.1/>  SELECT ?x0 ?x1 WHERE {@@ -380,7 +383,7 @@         selectVars [s, o]     ) -  , ( [s|+  , ( [Str.s| PREFIX foaf: <http://xmlns.com/foaf/0.1/>  SELECT ?x0 ?x1 WHERE {@@ -399,7 +402,7 @@         selectVars [s, o]     ) -  , ( [s|+  , ( [Str.s| PREFIX foaf: <http://xmlns.com/foaf/0.1/>  SELECT ?x0 ?x1 WHERE {@@ -418,7 +421,7 @@         selectVars [s, o]     ) -  , ( [s|+  , ( [Str.s| PREFIX foaf: <http://xmlns.com/foaf/0.1/>  SELECT ?x0 ?x1 WHERE {@@ -438,7 +441,7 @@         selectVars [s, o]     ) -  , ( [s|+  , ( [Str.s| PREFIX ex: <http://example.com/>  SELECT ?x0 ?x1 WHERE {@@ -458,7 +461,7 @@         selectVars [s, o]     ) -  , ( [s|+  , ( [Str.s| PREFIX ex: <http://example.com/>  SELECT ?x0 ?x1 WHERE {@@ -478,7 +481,7 @@         selectVars [s, o]     ) -  , ( [s|+  , ( [Str.s| PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> @@ -500,7 +503,7 @@         selectVars [s, o]     ) -  , ( [s|+  , ( [Str.s| PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>  SELECT ?x0 ?x1 WHERE {@@ -519,7 +522,7 @@         selectVars [s, o]     ) -  , ( [s|+  , ( [Str.s| PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>  SELECT ?x0 ?x1 WHERE {@@ -538,7 +541,7 @@         selectVars [s, o]     ) -  , ( [s|+  , ( [Str.s| PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> @@ -560,7 +563,7 @@         selectVars [s, o]     ) -  , ( [s|+  , ( [Str.s| PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>  SELECT ?x0 ?x1 WHERE {
tests/Wikidata.hs view
@@ -4,7 +4,6 @@ module Wikidata where  import Control.Monad (forM_)-import Data.Maybe import Database.HSparql.Connection import Database.HSparql.QueryGenerator @@ -19,8 +18,8 @@   p <- var   o <- var -  triple s p o+  triple_ s p o -  limit 10+  limit_ 10    selectVars [s, p, o]