Skip to content

Derive macro? #11

@Pat-Lafon

Description

@Pat-Lafon

Hey! This is a super cool crate. I actually just had someone introduce me to this topic and it was cool to see a crate that does it. I was curious if there had been any thought into implementing a derive macro for this? I'm not 100% on the details but I'm imagining something like

#[derive(HConsed, Debug, Hash, Clone, PartialEq, Eq)]
enum Term {
    Var(usize),
    Lam(Term),
    App(Term, Term)
}

instead of currently

type Term = HConsed<ActualTerm> ;

#[derive(Debug, Hash, Clone, PartialEq, Eq)]
enum ActualTerm {
    Var(usize),
    Lam(Term),
    App(Term, Term)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions