group predicate subsequences by first instantiated arg (#1053)
This commit is contained in:
@@ -219,7 +219,6 @@ pub enum PredicateClause {
|
||||
}
|
||||
|
||||
impl PredicateClause {
|
||||
// TODO: add this to `Term` in `crate::parser` like `first_arg`.
|
||||
pub(crate) fn args(&self) -> Option<&[Term]> {
|
||||
match self {
|
||||
PredicateClause::Fact(term, ..) => match term {
|
||||
@@ -237,6 +236,13 @@ impl PredicateClause {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct ClauseSpan {
|
||||
pub left: usize,
|
||||
pub right: usize,
|
||||
pub instantiated_arg_index: usize,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum ModuleSource {
|
||||
Library(Atom),
|
||||
|
||||
Reference in New Issue
Block a user