Can an extra operation help explain things?
- Dominant language
- Haskell
- Stars
- 98
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
```haskell
appEval :: forall a (b :: TYPE rep).
(a -> b) -> Eval a -> b
appEval f (Eval (IO m)) =
case runRW# m of
(# _, a #) -> f a
```
Ignoring levity polymorphism, this could be implemented
```haskell
appEval f m = runEval (f <$> m)
```
Moreover,
```haskell
runEval = appEval id
```
But what makes this interesting, I think, is its relationship with `>>=`: aside from arity wibbles,
```haskell
m >>= f = appEval f m
```
This strikes me as a really pleasant property.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the existing Eval, runEval, and appEval definitions, along with the relationship to >>= described in the issue. Determine whether the proposed operation has a concrete API role and how its semantics would be validated; done means an agreed design with corresponding tests or documentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100