Skip to content

Commit 5219f3b

Browse files
committed
Revert "Implement Eq and Hash for Type"
This reverts commit 91af963.
1 parent 68235c6 commit 5219f3b

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

src/chc.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ impl Function {
389389
}
390390

391391
/// A logical term.
392-
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
392+
#[derive(Debug, Clone)]
393393
pub enum Term<V = TermVarIdx> {
394394
Null,
395395
Var(V),
@@ -984,7 +984,7 @@ impl Pred {
984984
}
985985

986986
/// An atom is a predicate applied to a list of terms.
987-
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
987+
#[derive(Debug, Clone)]
988988
pub struct Atom<V = TermVarIdx> {
989989
pub pred: Pred,
990990
pub args: Vec<Term<V>>,
@@ -1077,7 +1077,7 @@ impl<V> Atom<V> {
10771077
/// While it allows arbitrary [`Atom`] in its `Atom` variant, we only expect atoms with known
10781078
/// predicates (i.e., predicates other than `Pred::Var`) to appear in formulas. It is our TODO to
10791079
/// enforce this restriction statically. Also see the definition of [`Body`].
1080-
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1080+
#[derive(Debug, Clone)]
10811081
pub enum Formula<V = TermVarIdx> {
10821082
Atom(Atom<V>),
10831083
Not(Box<Formula<V>>),
@@ -1296,7 +1296,7 @@ impl<V> Formula<V> {
12961296
}
12971297

12981298
/// The body part of a clause, consisting of atoms and a formula.
1299-
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1299+
#[derive(Debug, Clone)]
13001300
pub struct Body<V = TermVarIdx> {
13011301
pub atoms: Vec<Atom<V>>,
13021302
/// NOTE: This doesn't contain predicate variables. Also see [`Formula`].

src/rty.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ where
8888
/// In Thrust, function types are closed. Because of that, function types, thus its parameters and
8989
/// return type only refer to the parameters of the function itself using [`FunctionParamIdx`] and
9090
/// do not accept other type of variables from the environment.
91-
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
91+
#[derive(Debug, Clone)]
9292
pub struct FunctionType {
9393
pub params: IndexVec<FunctionParamIdx, RefinedType<FunctionParamIdx>>,
9494
pub ret: Box<RefinedType<FunctionParamIdx>>,
@@ -156,7 +156,7 @@ impl FunctionType {
156156
}
157157

158158
/// The kind of a reference, which is either mutable or immutable.
159-
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
159+
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
160160
pub enum RefKind {
161161
Mut,
162162
Immut,
@@ -181,7 +181,7 @@ where
181181
}
182182

183183
/// The kind of a pointer, which is either a reference or an owned pointer.
184-
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
184+
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
185185
pub enum PointerKind {
186186
Ref(RefKind),
187187
Own,
@@ -221,7 +221,7 @@ impl PointerKind {
221221
}
222222

223223
/// A pointer type.
224-
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
224+
#[derive(Debug, Clone)]
225225
pub struct PointerType<T> {
226226
pub kind: PointerKind,
227227
pub elem: Box<RefinedType<T>>,
@@ -334,7 +334,7 @@ impl<T> PointerType<T> {
334334
/// Note that the current implementation uses tuples to represent structs. See
335335
/// implementation in `crate::refine::template` module for details.
336336
/// It is our TODO to improve the struct representation.
337-
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
337+
#[derive(Debug, Clone)]
338338
pub struct TupleType<T> {
339339
pub elems: Vec<RefinedType<T>>,
340340
}
@@ -458,7 +458,7 @@ impl EnumDatatypeDef {
458458
/// An enum type.
459459
///
460460
/// An enum type includes its type arguments and the argument types can refer to outer variables `T`.
461-
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
461+
#[derive(Debug, Clone)]
462462
pub struct EnumType<T> {
463463
pub symbol: chc::DatatypeSymbol,
464464
pub args: IndexVec<TypeParamIdx, RefinedType<T>>,
@@ -560,7 +560,7 @@ impl<T> EnumType<T> {
560560
}
561561

562562
/// A type parameter.
563-
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
563+
#[derive(Debug, Clone)]
564564
pub struct ParamType {
565565
pub idx: TypeParamIdx,
566566
}
@@ -589,7 +589,7 @@ impl ParamType {
589589
}
590590

591591
/// An underlying type of a refinement type.
592-
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
592+
#[derive(Debug, Clone)]
593593
pub enum Type<T> {
594594
Int,
595595
Bool,
@@ -995,7 +995,7 @@ impl<T> ShiftExistential for RefinedTypeVar<T> {
995995
/// A formula, potentially equipped with an existential quantifier.
996996
///
997997
/// Note: This is not to be confused with [`crate::chc::Formula`] in the [`crate::chc`] module, which is a different notion.
998-
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
998+
#[derive(Debug, Clone)]
999999
pub struct Formula<V> {
10001000
pub existentials: IndexVec<ExistentialVarIdx, chc::Sort>,
10011001
pub body: chc::Body<V>,
@@ -1236,7 +1236,7 @@ impl<T> Instantiator<T> {
12361236
}
12371237

12381238
/// A refinement type.
1239-
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1239+
#[derive(Debug, Clone)]
12401240
pub struct RefinedType<FV = Closed> {
12411241
pub ty: Type<FV>,
12421242
pub refinement: Refinement<FV>,

0 commit comments

Comments
 (0)