-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#311] Reimplement custom State #316
Conversation
Resolves #311
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know why your PR is still not approved? Because I chose not to approve it. But they will.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's very nice! Final touch: can we now reimplement diwrap
using single coerce
? 🙂
-- | @since 1.3.0.0 | ||
instance Applicative TomlState where | ||
pure :: a -> TomlState a | ||
pure a = TomlState (Just a,) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a very elegant implementation!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work!
@@ -136,7 +136,7 @@ diwrap | |||
(Coercible a b) | |||
=> TomlCodec a | |||
-> TomlCodec b | |||
diwrap = dimap coerce coerce | |||
diwrap = coerce |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Current mood: reimplementing mtl
just to use coerce
🤣
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:bad_guys: 🤣
Resolves #311