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

Return computed tables with annotate #81

Open
mvoidex opened this issue Oct 7, 2016 · 2 comments
Open

Return computed tables with annotate #81

mvoidex opened this issue Oct 7, 2016 · 2 comments

Comments

@mvoidex
Copy link
Collaborator

mvoidex commented Oct 7, 2016

I need both import table and module table:

itbl = importTable env m
defs = moduleSymbols itbl m
tbl = moduleTable itbl m

But I also need annotated module

annotated = annotate env m

The problem is that annotate computes these tables too (and it takes noticeable time), but doesn't return it. Can we have new function, which annotates module and also returns these tables?

@phischu
Copy link
Contributor

phischu commented Oct 23, 2016

Would an alternative annotation function that takes the module table as an argument be ok too?

annotateWithTable ::
  (Data l, Eq l, SrcInfo l) =>
  Environment -> Global.Table -> Module l -> Module (Scoped l)

Then you would compute the module table (and import table) yourself and provide it to this function.

@mvoidex
Copy link
Collaborator Author

mvoidex commented Oct 23, 2016

Yes, it will be ok

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

No branches or pull requests

2 participants