gren-lang / gren-lang/compiler
Parameter expansion for partial function application
Nobody has claimed this yet.
- Dominant language
- Haskell
- Stars
- 503
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
A not too uncommon pattern is to use partial application for defining new functions. Something like:
’’’
div : List Attribute -> List (Html msg) -> Html msg
div =
node "div"
’’’
Unfortunetly, this guarantees that the calls to ’div’ goes through the slow/curried form of function application.
It should be possible to convert the above form into:
’’’
div : List Attribute -> List (Html msg) -> Html msg
div a b =
node "div" a b
’’’
Turning a partial application into a total application, thus staying on the fast path.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named in the issue. Start by locating the compiler handling for partial function application, then determine how the shown partial definition can be expanded while preserving its type and behavior.
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
- Mostly clear
- Newbie friendliness
- 35/100