haskell / haskell/mwc-random

Move splitGen to mwc-randon

Open
#39 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
61
Forks
27
PR merge metrics
No merged PRs in 30d

Description

We have following function in statistics:

``` .haskell
splitGen :: Int -> GenIO -> IO [GenIO]
splitGen n gen
| n <= 0 = return []
| otherwise =
fmap (gen:) . replicateM (n-1) $
initialize =<< (uniformVector gen 256 :: IO (U.Vector Word32))
```

I thing it makes sense to move it to `mwc-random` and generalize to `PrimMonad`. We however need to understand consequences of such splitting algorithm

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating splitGen in the statistics component and reading its current callers and behavior. Then review the mwc-random generator API and assess the consequences of generalizing the split to PrimMonad; done means an agreed algorithm, moved functionality, and coverage for its observable behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
backend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.