fram-lang / fram-lang/dbl

Qualified imports

Open
#274 0 comments 0 reactions 0 assignees View on GitHub
0. parsing 1. type inference
Dominant language
OCaml
Stars
45
Forks
28
PR merge metrics
No merged PRs in 30d

Description

Fram supports only 2 types of imports: regular module imports and imports with full namespace opening. Whilst sufficient, this is not an elegant solution and often leads to either excessive boilerplate or namespace pollution. To counteract this problem, we can introduce quantified imports that allows user to manually select stuff to import. For example:
```
import Foo as {function1, Type2}
```
will only introduce two things, rather than full module.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating Fram's import parsing and name-resolution entry points, then trace how regular and full namespace-opening imports are handled. Define the behavior for the example `import Foo as {function1, Type2}` and add tests showing that only the selected names are introduced, including invalid or ambiguous selections.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.