p_select_match_p :: RDF g => (g -> Triples) -> g -> Property
p_select_match_p =
  p_select_match_fn same mkPattern
  where
    same = equivNode equiv predicateOf
    equiv (UNode u1) (UNode u2) = B.last (value u1) == B.last (value u2)
    equiv _          _          = error $ "GraphTestUtils.p_select_match_p.equiv"
    mkPattern t = (Nothing, Just (\n -> lastChar n == lastChar (predicateOf t)) , Nothing)
    lastChar (UNode uri) = B.last $ value uri
    lastChar _           = error "GraphTestUtils.p_select_match_p.lastChar"
p_select_match_p :: RDF g => (g -> Triples) -> g -> Property
p_select_match_p =
  p_select_match_fn same mkPattern
  where
    same = equivNode equiv predicateOf
    equiv (UNode u1) (UNode u2) = B.last (value u1) == B.last (value u2)
    equiv _          _          = error $ "GraphTestUtils.p_select_match_p.equiv"
    mkPattern t = (Nothing, Just (\n -> lastChar n == lastChar (predicateOf t)) , Nothing)
    lastChar (UNode uri) = B.last $ value uri
    lastChar _           = error "GraphTestUtils.p_select_match_p.lastChar"
p_select_match_p =
  p_select_match_fn same mkPattern
  where
    same = equivNode equiv predicateOf
    equiv (UNode u1) (UNode u2) = B.last (value u1) == B.last (value u2)
    equiv _          _          = error $ "GraphTestUtils.p_select_match_p.equiv"
    mkPattern t = (Nothing, Just (\n -> lastChar n == lastChar (predicateOf t)) , Nothing)
    lastChar (UNode uri) = B.last $ value uri
    lastChar _           = error "GraphTestUtils.p_select_match_p.lastChar"