on develop help sign in
fix bug in patchThatSortsMapWith. buggy implementation violates the invariant
commit8c1378db2f671948c03fe41eea686b7c07fcc349 authorJohannes Gerer <oss@johannesgerer.com> dateSun 20 Oct 2019, 20:37 (7 years ago) parent55a1e29
1 file changed+1−1
src/Reflex/Patch/MapWithMove.hs+1−1
src/Reflex/Patch/MapWithMove.hs+1−1
@@ -155,7 +155,7 @@ patchThatSortsMapWith cmp m = PatchMapWithMove $ Map.fromList $ catMaybes $ zipW
155155 Just (from, to)
156156 reverseMapping = Map.fromList $ catMaybes $ zipWith f unsorted sorted
157157 g (to, _) (from, _) = if to == from then Nothing else
158− let Just movingTo = Map.lookup from reverseMapping
158+ let Just movingTo = Map.lookup to reverseMapping
159159 in Just (to, NodeInfo (From_Move from) $ Just movingTo)
160160
161161-- | Create a 'PatchMapWithMove' that, if applied to the first 'Map' provided,