reflex icon indicating copy to clipboard operation
reflex copied to clipboard

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

Open mpickering opened this issue 4 years ago • 0 comments

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.

mpickering avatar Mar 16 '20 10:03 mpickering