Skip to content
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

Non-bijectional 'dimapBijection' #47

Closed
chshersh opened this issue May 23, 2018 · 0 comments
Closed

Non-bijectional 'dimapBijection' #47

chshersh opened this issue May 23, 2018 · 0 comments
Assignees
Labels
codec Conversion between TOML and custom user data types

Comments

@chshersh
Copy link
Contributor

dimapBijection works good for things like Num and newtypes but if you have functions like:

parseMyType :: Text -> Maybe MyType
showMyType  :: MyType -> Text

you will have some problems with dimapping just pair of functions for str converter 😞

So new combinator should be created. Also, since dimapBijection is used very often let's make it name shorter (just dimap) and let's call new function mdimap (stands for maybe dimap).

@chshersh chshersh added the codec Conversion between TOML and custom user data types label May 23, 2018
@chshersh chshersh added this to the v1.0.0: Public release milestone May 23, 2018
@chshersh chshersh self-assigned this May 23, 2018
chshersh added a commit that referenced this issue May 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codec Conversion between TOML and custom user data types
Projects
None yet
Development

No branches or pull requests

1 participant