Skip to content

Commit c20fece

Browse files
committed
Fix doctest
1 parent 0f9c108 commit c20fece

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

libs/cardano-data/src/Data/OMap/Strict.hs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,13 +304,12 @@ extractKeys ks (OMap sseq kv) =
304304
--
305305
-- >>> :set -XFlexibleInstances -XMultiParamTypeClasses
306306
-- >>> import Data.OMap.Strict
307-
-- >>> import Lens.Micro
308-
-- >>> instance HasOKey Int (Int, Char) where okeyL = _1
307+
-- >>> instance HasOKey Int (Int, Char) where toOKey = fst
309308
-- >>> let m = fromFoldable $ zip [1,2] ['a','b'] :: OMap Int (Int, Char)
310309
-- >>> m
311310
-- StrictSeq {fromStrict = fromList [(1,(1,'a')),(2,(2,'b'))]}
312311
-- >>> let adjustingFn (k, v) = (k, succ v) -- Changes the value
313-
-- >>> let overwritingAdjustingFn (k,v) = (succ k, v) -- Changes the `okeyL`.
312+
-- >>> let overwritingAdjustingFn (k,v) = (succ k, v) -- Modify the key.
314313
-- >>> adjust adjustingFn 1 m
315314
-- StrictSeq {fromStrict = fromList [(1,(1,'b')),(2,(2,'b'))]}
316315
-- >>> adjust overwritingAdjustingFn 1 m

0 commit comments

Comments
 (0)