mlabs-haskell / mlabs-haskell/lambda-buffers

Codegen: Standardize and implement `--packages` handling for all backend

Open
#226 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

codegen enhancement
Dominant language
Haskell
Stars
32
Forks
1
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The payload names no files or tests. Start by locating the existing --packages handling in the Haskell and Purescript backends, then compare the Rust and Typescript backend entry points. Done means package mappings are supplied and resolved consistently across all backends, with Haskell imports made explicit through PackageImports.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell, rust, typescript
Domain
compilers, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.