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

Provide a library function to convert from Incremental t (PatchDMap (Const2 k a) Identity) to Incremental t (PatchMap k a) #407

Open
mpickering opened this issue Mar 16, 2020 · 0 comments

Comments

@mpickering
Copy link

It seems that the conversion between Incremental t (PatchDMap (Const2 k a) Identity)
to Incremental t (PatchMap k a) is safe, but I couldn't find a library function which performed the conversion.

Therefore I implemented it as follows:

c :: Incremental t (PatchDMap (Const2 k a) Identity)
             -> Incremental t (PatchMap k a)
c = unsafeMapIncremental dmapToMap (patchDMapToPatchMapWith runIdentity)

A simple blessed function which did this conversion would be good to provide in the library for the purpose of discoverability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant