diff --git a/crates/ir/src/lib.rs b/crates/ir/src/lib.rs index ecf132b..f2eeb46 100644 --- a/crates/ir/src/lib.rs +++ b/crates/ir/src/lib.rs @@ -23,7 +23,6 @@ #![warn(missing_docs)] use std::{ - collections::BTreeMap, fmt::{self, Debug}, hash::Hash, str::FromStr, @@ -52,7 +51,14 @@ use serde::{Deserialize, Serialize}; #[derive_where(Hash; T: HashProgramInfo)] #[cfg_attr(feature = "serde", derive_where(Deserialize, Serialize; T: SerdeProgramInfo))] pub struct Program { - pub relations: BTreeMap>, + /// A list of all relations defined in the program. + /// + /// The relations are identified by [ProgramInfo::RelationLabel], although + /// the [Program] type does not commit to using one particular structure + /// over another for mapping relation labels to their entries. This allows + /// flexibility in deferring trait bounds to when an efficient index is + /// actually needed. + pub relations: Vec>, /// The list of assumptions in this program. pub assumptions: Vec>, @@ -418,7 +424,7 @@ pub trait ProgramInfo { /// The type of relation identifiers. /// /// These labels discriminate relation entries in a [Program]. - type RelationLabel: Ord + Info; + type RelationLabel: Info; /// Metadata for an assumption. type AssumptionMeta: Info;