`Data.Functor.void` needs a way to specify the type of discarded value
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 24/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- backend
Research direction
The issue identifies Data.Functor.void and proposes a more flexible voidAt signature, but names no source file or test. Start by locating the void definition and its tests, then check how the proposed visible type application fits the project’s conventions. Done means the desired type can be specified and the behavior is covered by tests.
Written by the indexing model from the issue text.
Description
I have following code snippet:
post :: forall m a. DecodeJson a => Monad m => String -> m a
deleteFoo = do
void $ post "http://localhost/delete"
type checker complains with:
No type class instance was found for
Data.Argonaut.Encode.Class.DecodeJson t3
Current version of void function cannot get type parameter:
deleteFoo = do
void @Unit $ post "http://localhost/delete"
An expression of polymorphic type
with the invisible type variable f:
forall f a. Functor f => f a -> f Unit
cannot be applied to:
Boolean
I suggest to rewrite void function to make it more flexible:
voidAt :: forall @a f . Functor f => f a -> f Unit
voidAt = void
- Dominant language
- PureScript
- Stars
- 168
- Forks
- 90
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing 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.
More from purescript/purescript-prelude
-
Difficulty 2/5 1-3 hours Newbie friendliness 57/100
purescript/purescript-prelude#317 · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 32/100
purescript/purescript-prelude#312 · 5 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
purescript/purescript-prelude#310 · 5 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
purescript/purescript-prelude#307 · 1 comment · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
purescript/purescript-prelude#305 · 5 comments ·
All issues in purescript/purescript-prelude
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Maintainers usually reply within 1 day
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
milind-soni/OpenMausBot#5829 ·
Maintainers usually reply within 1 day