diff --git a/lang/ast/src/traits/subst.rs b/lang/ast/src/traits/subst.rs index fc2004213c..470b6c3cae 100644 --- a/lang/ast/src/traits/subst.rs +++ b/lang/ast/src/traits/subst.rs @@ -1,3 +1,5 @@ +use std::fmt::Debug; + use crate::ctx::*; use crate::Variable; use crate::*; @@ -9,7 +11,7 @@ use crate::*; /// Trait for entities which can be used as a substitution. /// In order to be used as a substitution an entity has to provide a method /// to query it for a result for a given deBruijn Level. -pub trait Substitution: Shift + Clone { +pub trait Substitution: Shift + Clone + Debug { fn get_subst(&self, ctx: &LevelCtx, lvl: Lvl) -> Option>; } @@ -37,7 +39,7 @@ impl Substitution for Vec> { /// An assignment is the simplest form of a substitution which provides just /// one mapping from a variable (represented by a DeBruijn Level) to an expression. -#[derive(Clone)] +#[derive(Clone, Debug)] pub struct Assign { pub lvl: Lvl, pub exp: Box, @@ -116,7 +118,7 @@ impl SwapWithCtx for T { // // -#[derive(Clone)] +#[derive(Clone, Debug)] struct SwapSubst { fst1: usize, fst2: usize, diff --git a/lang/transformations/src/lifting/fv.rs b/lang/transformations/src/lifting/fv.rs index c2d6ae6ca6..19df4b7e76 100644 --- a/lang/transformations/src/lifting/fv.rs +++ b/lang/transformations/src/lifting/fv.rs @@ -348,13 +348,13 @@ struct NewVar { } /// Substitution in the body of the new definition -#[derive(Clone)] +#[derive(Clone, Debug)] pub struct FVBodySubst<'a> { inner: &'a FVSubst, } /// Substitution in the type parameters of the new definition -#[derive(Clone)] +#[derive(Clone, Debug)] pub struct FVParamSubst<'a> { inner: &'a FVSubst, }