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

Codegen: Standardize and implement --packages handling for all backend #226

Open
bladyjoker opened this issue Jun 12, 2024 · 0 comments
Open
Labels
codegen enhancement New feature or request

Comments

@bladyjoker
Copy link
Contributor

bladyjoker commented Jun 12, 2024

Currently, Haskell and Purescript backends handle foreign LB references without considering the package they are in. This is something the Codegen can't decide and has to be provided by the user (Nix wrappers basically collect and provide this information).

However, because Haskell and Purescript don't care about packages when handling imports, this problem didn't arise until we started implementing Rust and Typescript backends.

Regardless, I think it should be done the same way everywhere, so let's implement the same --packages and pkgMap :: Map LB.ModuleName (BackendPackageName backend) and properly resolve this.

I'd even say let's use PackageImports in Haskell so it's abundantly clear where every module is sourced from.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codegen enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

1 participant