Skip to content

Commit d943809

Browse files
authored
Merge pull request #38 from reflex-frp/bugfix/node-info-field-order
Correct field order of `PatchMapWithMove.NodeInfo`
2 parents e8af74a + 9b7a117 commit d943809

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

ChangeLog.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Revision history for patch
22

3+
## 0.0.5.2 - 2022-01-09
4+
5+
* Correct field order of `PatchMapWithMove.NodeInfo`.
6+
7+
When we this was reimplemented as a pattern synonym wrapper in 0.0.5.0, we
8+
accidentally flipped the argument order. Reversing it now to match 0.0.4.0
9+
and restore compatibility. The previous releases in the 0.0.5.\* series will
10+
correspondingly be deprecated.
11+
312
## 0.0.5.1 - 2021-12-28
413

514
* New dep of `base-orphans` for old GHC to get instances honestly instead of

patch.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Name: patch
2-
Version: 0.0.5.1
2+
Version: 0.0.5.2
33
Synopsis: Data structures for describing changes to other data structures.
44
Description:
55
Data structures for describing changes to other data structures.

src/Data/Patch/MapWithMove.hs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ module Data.Patch.MapWithMove
4242
-- * Node Info
4343
, NodeInfo
4444
( NodeInfo
45-
, _nodeInfo_to
4645
, _nodeInfo_from
46+
, _nodeInfo_to
4747
, ..
4848
)
4949
, bitraverseNodeInfo
@@ -228,13 +228,13 @@ deriving instance (Eq k, Eq p) => Eq (NodeInfo k p)
228228
deriving instance (Ord k, Ord p) => Ord (NodeInfo k p)
229229

230230
{-# COMPLETE NodeInfo #-}
231-
pattern NodeInfo :: To k -> From k v -> NodeInfo k v
232-
_nodeInfo_to :: NodeInfo k v -> To k
231+
pattern NodeInfo :: From k v -> To k -> NodeInfo k v
233232
_nodeInfo_from :: NodeInfo k v -> From k v
234-
pattern NodeInfo { _nodeInfo_to, _nodeInfo_from } = NodeInfo'
233+
_nodeInfo_to :: NodeInfo k v -> To k
234+
pattern NodeInfo { _nodeInfo_from, _nodeInfo_to } = NodeInfo'
235235
PM.NodeInfo
236-
{ PM._nodeInfo_to = _nodeInfo_to
237-
, PM._nodeInfo_from = Coerce _nodeInfo_from
236+
{ PM._nodeInfo_from = Coerce _nodeInfo_from
237+
, PM._nodeInfo_to = _nodeInfo_to
238238
}
239239

240240
_NodeInfo

0 commit comments

Comments
 (0)