fn fresh_type(&mut self, ty: MLType) -> Type {
        use Type::*;
        match ty {
            MLType::Int => Int,
            MLType::Var(v) => Var(v),
            MLType::Arrow(ty1, ty2) => {
                let ty1 = self.fresh_type(*ty1);
                let ty2 = self.fresh_type(*ty2);

                let rv1 = self.fresh_reg_var_mut();
                let rv2 = self.fresh_reg_var_mut();

                let ae = self.fresh_arrow_effect_mut();

                Type::arrow(PType { ty: ty1, reg: rv1 }, ae, PType { ty: ty2, reg: rv2 })
            }
        }
    }
/// Returns a fresh type.
/// Assumes `self` is a consistent basis.
Returns a fresh type.
Assumes `self` is a consistent basis.
Returns a fresh type . Assumes ` self ` is a consistent basis .
fn fresh_type(&mut self, ty: MLType) -> Type {
        use Type::*;
        match ty {
            MLType::Int => Int,
            MLType::Var(v) => Var(v),
            MLType::Arrow(ty1, ty2) => {
                let ty1 = self.fresh_type(*ty1);
                let ty2 = self.fresh_type(*ty2);
                let rv1 = self.fresh_reg_var_mut();
                let rv2 = self.fresh_reg_var_mut();
                let ae = self.fresh_arrow_effect_mut();
                Type::arrow(PType { ty: ty1, reg: rv1 }, ae, PType { ty: ty2, reg: rv2 })
            }
        }
    }
fn fresh_type ( & mut self , ty : MLType ) -> Type { use Type :: * ; match ty { MLType :: Int => Int , MLType :: Var ( v ) => Var ( v ) , MLType :: Arrow ( ty1 , ty2 ) => { let ty1 = self . fresh_type ( * ty1 ) ; let ty2 = self . fresh_type ( * ty2 ) ; let rv1 = self . fresh_reg_var_mut ( ) ; let rv2 = self . fresh_reg_var_mut ( ) ; let ae = self . fresh_arrow_effect_mut ( ) ; Type :: arrow ( PType { ty : ty1 , reg : rv1 } , ae , PType { ty : ty2 , reg : rv2 } ) } } }
Returns a fresh type.
Returns a fresh type .
&mut self
ty
MLType
&mut self
ty
MLType