p_query_matched_spo :: RDF g => (g -> Triples) -> g -> Property
p_query_matched_spo _triplesOf gr =
  classify (null ts) "trivial" $
    forAll (tripleFromGen _triplesOf gr) f
  where
    ts = _triplesOf gr
    f t = case t of
            Nothing   ->  True
            (Just t') ->  [t'] == queryT gr t'

-- query as in p_query_matched_spo after duplicating a triple in the
-- graph, so that we can verify that the results just have 1, even
-- if the graph itself doesn't ensure that there are no dupes internally.
p_query_matched_spo :: RDF g => (g -> Triples) -> g -> Property
p_query_matched_spo _triplesOf gr =
  classify (null ts) "trivial" $
    forAll (tripleFromGen _triplesOf gr) f
  where
    ts = _triplesOf gr
    f t = case t of
            Nothing   ->  True
            (Just t') ->  [t'] == queryT gr t'

-- query as in p_query_matched_spo after duplicating a triple in the
-- graph, so that we can verify that the results just have 1, even
-- if the graph itself doesn't ensure that there are no dupes internally.
p_query_matched_spo _triplesOf gr =
  classify (null ts) "trivial" $
    forAll (tripleFromGen _triplesOf gr) f
  where
    ts = _triplesOf gr
    f t = case t of
            Nothing   ->  True
            (Just t') ->  [t'] == queryT gr t'

-- query as in p_query_matched_spo after duplicating a triple in the
-- graph, so that we can verify that the results just have 1, even
-- if the graph itself doesn't ensure that there are no dupes internally.