Skip to content

Commit 1b36922

Browse files
author
Ross MacLeod
committed
fix haddock failure in PatchDMapWithMove
1 parent d7da654 commit 1b36922

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Reflex/Patch/DMapWithMove.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ instance {-# INCOHERENT #-} (GEq k, EqTag k v) => EqTag k (From k v) where
7373
-- |Structure describing a particular change to a key, be it inserting a new key (@From_Insert@), updating an existing key (@From_Insert@ again), deleting a
7474
-- key (@From_Delete@), or moving a key (@From_Move@).
7575
data From (k :: a -> *) (v :: a -> *) :: a -> * where
76+
-- |Insert a new or update an existing key with the given value @v a@
7677
From_Insert :: v a -> From k v a
77-
-- ^Insert a new or update an existing key with the given value @v a@
78+
-- |Delete the existing key
7879
From_Delete :: From k v a
79-
-- ^Delete the existing key
80-
From_Move :: !(k a) -> From k v a
81-
-- ^Move the value from the given key @k a@ to this key. The source key should also have an entry in the patch giving the current key as @_nodeInfo_to@,
80+
-- |Move the value from the given key @k a@ to this key. The source key should also have an entry in the patch giving the current key as @_nodeInfo_to@,
8281
-- usually but not necessarily with @From_Delete@.
82+
From_Move :: !(k a) -> From k v a
8383
deriving (Show, Read, Eq, Ord)
8484

8585
-- |Type alias for the "to" part of a 'NodeInfo'. @'ComposeMaybe' ('Just' k)@ means the key is moving to another key, @ComposeMaybe Nothing@ for any other
@@ -93,7 +93,7 @@ validPatchDMapWithMove = not . null . validationErrorsForPatchDMapWithMove
9393
-- |Enumerate what reasons a 'PatchDMapWithMove' doesn't satisfy its invariants, returning @[]@ if it's valid.
9494
validationErrorsForPatchDMapWithMove :: forall k v. (GCompare k, GEq k, GShow k) => DMap k (NodeInfo k v) -> [String]
9595
validationErrorsForPatchDMapWithMove m =
96-
noSelfMoves `mappend` movesBalanced
96+
noSelfMoves <> movesBalanced
9797
where
9898
noSelfMoves = catMaybes . map selfMove . DMap.toAscList $ m
9999
selfMove (dst :=> NodeInfo (From_Move src) _) | Just _ <- dst `geq` src = Just $ "self move of key " <> gshow src <> " at destination side"

0 commit comments

Comments
 (0)