Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add module_info.get_all #645

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Conversation

eric-wieser
Copy link
Member

@eric-wieser eric-wieser commented Nov 2, 2021

The motivation here is to teach doc-gen about empty default.lean files.

@eric-wieser
Copy link
Member Author

eric-wieser commented Nov 4, 2021

What's the easiest way to convert an std::vector<T> into a vm_obj holding a list? I was hoping to_obj had an overload for that.

@gebner
Copy link
Member

gebner commented Nov 4, 2021

I think vm_list.h is everything we have. Copy&pasted from to_obj(buffer<expr> const &):

    vm_obj obj = mk_vm_nil();
    for (unsigned i = ls.size(); i > 0; i--)
        obj = mk_vm_cons(to_obj(ls[i - 1]), obj);
    return obj;

src/library/vm/vm_list.h Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants