reflex
reflex copied to clipboard
Provide a library function to convert from `Incremental t (PatchDMap (Const2 k a) Identity)` to `Incremental t (PatchMap k a)`
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.