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

updateTargets API #152

Closed
edsko opened this issue Dec 30, 2013 · 4 comments
Closed

updateTargets API #152

edsko opened this issue Dec 30, 2013 · 4 comments

Comments

@edsko
Copy link
Collaborator

edsko commented Dec 30, 2013

From 0.8 ide-backend supports an updateTargets functionality, which makes it possible to only compile certain modules. At the moment this has type

updateTargets :: Maybe [ModuleName] -> IdeSessionUpdate ()

one could also envision

updateTargets :: Maybe [FilePath] -> IdeSessionUpdate ()

or

updateTargets :: Maybe [Either ModuleName FilePath] -> IdeSessionUpdate ()
@snoyberg
Copy link
Member

Given that the rest of the API works via FilePaths, I would have thought FilePath would be used here too. The main reason I think that would be necessary would be when dealing with multiple Main modules; if the API is ModuleName-based, how will ide-backend know which file to focus on?

@edsko
Copy link
Collaborator Author

edsko commented Dec 30, 2013

@snoyberg So you're opting for

updateTargets :: Maybe [FilePath] -> IdeSessionUpdate ()

If so, I can easily change the API (and I should do that before releasing).

@snoyberg
Copy link
Member

That's what I think makes sense given our goals here. If you think I'm misunderstanding a use case, please let me know.

@edsko
Copy link
Collaborator Author

edsko commented Dec 30, 2013

No, that makes perfect sense. I'll make that change.

edsko added a commit that referenced this issue Dec 30, 2013
@edsko edsko closed this as completed Dec 30, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants