mirror of
https://github.com/jtdaugherty/brick.git
synced 2024-12-02 11:05:10 +03:00
Merge pull request #49 from sifmelcara/master
API: remove unnecessary type class constraint on listReplace
This commit is contained in:
commit
77aae73810
@ -193,7 +193,7 @@ listRemove pos l | V.null (l^.listElementsL) = l
|
||||
-- | Replace the contents of a list with a new set of elements and
|
||||
-- update the new selected index. If the specified selected index (via
|
||||
-- 'Just') is not in the list bounds, zero is used instead.
|
||||
listReplace :: Eq e => V.Vector e -> Maybe Int -> List e -> List e
|
||||
listReplace :: V.Vector e -> Maybe Int -> List e -> List e
|
||||
listReplace es idx l =
|
||||
let newSel = clamp 0 (V.length es - 1) <$> idx
|
||||
in l & listSelectedL .~ newSel
|
||||
|
Loading…
Reference in New Issue
Block a user