patch 0.0.3.0 → 0.0.3.1
raw patch · 4 files changed
+11/−3 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- ChangeLog.md +4/−0
- patch.cabal +1/−1
- src/Data/Patch/MapWithMove.hs +3/−1
- src/Data/Patch/MapWithPatchingMove.hs +3/−1
ChangeLog.md view
@@ -1,5 +1,9 @@ # Revision history for patch +## 0.0.3.1++* Replace `fromJust` with something easier to debug.+ ## 0.0.3.0 * Create `PatchMapWithPatchingMove` variant which supports moves with a patch.
patch.cabal view
@@ -1,5 +1,5 @@ Name: patch-Version: 0.0.3.0+Version: 0.0.3.1 Synopsis: Infrastructure for writing patches which act on other types. Description: In this library, a patch is something which can be applied, analogous to a
src/Data/Patch/MapWithMove.hs view
@@ -202,7 +202,9 @@ putRemainingKeys $ Set.delete k fromKs return $ NodeInfo (From_Move k) $ Just undefined -- There's an existing value, and it's here, so no patch necessary else do- (fromK, remainingKeys) <- return . fromMaybe (error "patchThatChangesMap: impossible: fromKs was empty") $ Set.minView fromKs -- There's an existing value, but it's not here; move it here+ (fromK, remainingKeys) <- return $+ fromMaybe (error "PatchMapWithMove.patchThatChangesMap: impossible: fromKs was empty") $+ Set.minView fromKs -- There's an existing value, but it's not here; move it here putRemainingKeys remainingKeys return $ NodeInfo (From_Move fromK) $ Just undefined Map.traverseWithKey f newByIndex
src/Data/Patch/MapWithPatchingMove.hs view
@@ -268,7 +268,9 @@ putRemainingKeys $ Set.delete k fromKs return $ NodeInfo (From_Move k mempty) $ Just undefined -- There's an existing value, and it's here, so no patch necessary else do- (fromK, remainingKeys) <- return . fromJust $ Set.minView fromKs -- There's an existing value, but it's not here; move it here+ (fromK, remainingKeys) <- return $+ fromMaybe (error "PatchMapWithPatchingMove.patchThatChangesMap: impossible: fromKs was empty") $+ Set.minView fromKs -- There's an existing value, but it's not here; move it here putRemainingKeys remainingKeys return $ NodeInfo (From_Move fromK mempty) $ Just undefined Map.traverseWithKey f newByIndex