gren-lang / gren-lang/compiler

Move extensibility to use-site

Open
#240 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Haskell
Stars
503
Forks
29
PR merge metrics
No merged PRs in 30d

Description

Copying this idea from elm slack, by Changlin Li

[…] RE Roc, I agree I've been meaning to try it out. There's one small UX thing about composability that I wish Roc did differently (essentially I don't think that type synonyms themselves should express whether they are extensible, but the extensibility should be delayed to the call site, so that e.g. in hypothetical Elm syntax type MyRecord = {a : Int, b : String} could be used at the callsite as myFunctionWithExtensibleRecord :: a ++ MyRecord -> Int, which would also allow type synonyms to be nicely merged together (e.g. type MyBigRecord = MyRecord ++ MyOtherRecord) without needing to decide beforehand which type synonyms are meant to be extensible and which aren't, since that's usually practically ends up being more relevant for callsites

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

No files, tests, or entry points are named. Start by reviewing the compiler's existing handling of type synonyms and extensibility, then read the six-comment discussion to clarify the proposed use-site behavior and how merged synonyms should work. Done requires an agreed design and corresponding compiler tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.