haskell / haskell/random

Missing `instance Random Natural`

Open Beginner friendly
#197 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
59
Forks
56
PR merge metrics
No merged PRs in 30d

Description

I am missing `instance Random Natural`; [there is an instance for `Integer`](https://hackage-content.haskell.org/package/random-1.3.1/docs/src/System.Random.html#line-494), so by the principle of least surprise there should also be one for `Natural`.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by comparing the existing Integer instance in the linked System.Random source with the surrounding typeclass implementations, then locate where Natural instances belong in this repository. Add the corresponding Random Natural behavior and tests, with completion shown by the test suite passing and Natural random generation matching the established Integer semantics.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.