avh4 / avh4/elm-debug-controls

Make Debug.Control.choice take a nonempty list

Open
#11 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Elm
Stars
25
Forks
4
PR merge metrics
No merged PRs in 30d

Description

In the documentation for [Debug.Control.choice](https://package.elm-lang.org/packages/avh4/elm-debug-controls/latest/Debug-Control#choice) it says
> This will crash if you provide an empty list.

Why not change the type signature to `( String, Control a ) -> List ( String, Control a ) -> Control a` so that can never happen?

Contributor guide

Open the contributing guide

Research direction

Start with the linked Debug.Control.choice documentation and locate the function's implementation and current type signature. Review how choices are constructed and used, then establish whether the proposed nonempty-list API is appropriate and ensure the empty-list case is no longer possible and the documentation matches the resulting behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
elm
Domain
tooling
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.