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
Consider splitting up the compiler into multiple packages #3633
Comments
I'd suggest only splitting things up once we've identified specific cases where it would be useful to depend on only those things, so perhaps we could just start with the parser. This sort of workflow is supported by Stack and used by projects like yesod, see for example https://github.com/yesodweb/yesod so I'd suggest using whatever Stack expects to see (although I haven't yet looked into what that means exactly). |
I think the parser and corefn stuff would be super useful to have in their own packages 👍 |
The thing about corefn is that right now I think we only define corefn -> json conversion and not the other way; for corefn to be useful on its own we'd need the conversion in the other direction right? |
The other direction is here https://github.com/purescript/purescript/blob/master/src/Language/PureScript/CoreFn/FromJSON.hs#L109 ? |
Lol, ignore me then |
@natefaubion thanks for opening the discussion on this! In spago I sometimes wish we had access to the compiler (mostly for the parser), but we cannot depend on it in the current state as build times would get long. So it could be nice if e.g. the parser was a separate package (e.g. I already tried to depend on So far we avoided being blocked by "depending on the compiler", except for purescript/spago#165, where we might have to choose between:
Since we are open to splitting off packages, I'll make a small proof of concept of implementing the above feature by depending on the compiler as a library, so I'll get a better idea of which package I'd like (most likely just the parser) |
I had a quick look at this (branch) and here's what I'm proposing (if only to stimulate discussion). We add a
In theory all the packages under The issue is that there are certain "core" modules that would probably need to be shared across these packages (e.g. |
With the merge of #3793, this is in happening! Do we want to close this issue, or leave it open to focus on what the end state is and track progress towards that? |
I'd like to close it and discuss further steps in their own issues, personally. |
This was brought up in Slack (primarily by @f-f), and I think it's something we should discuss.
The text was updated successfully, but these errors were encountered: