@@ -245,6 +245,14 @@ pub type Obligations<'tcx, O> = Vec<Obligation<'tcx, O>>;
245245pub type PredicateObligations < ' tcx > = Vec < PredicateObligation < ' tcx > > ;
246246pub type TraitObligations < ' tcx > = Vec < TraitObligation < ' tcx > > ;
247247
248+ /// The following types:
249+ /// * `WhereClauseAtom`
250+ /// * `DomainGoal`
251+ /// * `Goal`
252+ /// * `Clause`
253+ /// are used for representing the trait system in the form of
254+ /// logic programming clauses. They are part of the interface
255+ /// for the chalk SLG solver.
248256#[ derive( Clone , Copy , PartialEq , Eq , Hash , Debug ) ]
249257pub enum WhereClauseAtom < ' tcx > {
250258 Implemented ( ty:: TraitPredicate < ' tcx > ) ,
@@ -270,6 +278,7 @@ pub enum QuantifierKind {
270278
271279#[ derive( Clone , PartialEq , Eq , Hash , Debug ) ]
272280pub enum Goal < ' tcx > {
281+ // FIXME: use interned refs instead of `Box`
273282 Implies ( Vec < Clause < ' tcx > > , Box < Goal < ' tcx > > ) ,
274283 And ( Box < Goal < ' tcx > > , Box < Goal < ' tcx > > ) ,
275284 Not ( Box < Goal < ' tcx > > ) ,
@@ -289,8 +298,11 @@ impl<'tcx> From<DomainGoal<'tcx>> for Clause<'tcx> {
289298 }
290299}
291300
301+ /// This matches the definition from Page 7 of "A Proof Procedure for the Logic of Hereditary
302+ /// Harrop Formulas".
292303#[ derive( Clone , PartialEq , Eq , Hash , Debug ) ]
293304pub enum Clause < ' tcx > {
305+ // FIXME: again, use interned refs instead of `Box`
294306 Implies ( Vec < Goal < ' tcx > > , DomainGoal < ' tcx > ) ,
295307 DomainGoal ( DomainGoal < ' tcx > ) ,
296308 ForAll ( Box < ty:: Binder < Clause < ' tcx > > > ) ,
0 commit comments