Skip to content

Comments

Add module_info.get_all#645

Open
eric-wieser wants to merge 11 commits intomasterfrom
eric-wieser/module_info.get_all
Open

Add module_info.get_all#645
eric-wieser wants to merge 11 commits intomasterfrom
eric-wieser/module_info.get_all

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;

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