Merge pull request #49 from sifmelcara/master

API: remove unnecessary type class constraint on listReplace
This commit is contained in:
Jonathan Daugherty 2016-04-03 16:29:30 -07:00
commit 77aae73810

View File

@ -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