implemented pwRemoveService

This commit is contained in:
Jonathan Lamothe
2018-12-31 14:09:13 -05:00
parent 82c53ce446
commit b52380a10b
3 changed files with 80 additions and 1 deletions

View File

@@ -44,7 +44,7 @@ module Password (
-- ** Password Checkers
pwCountUpper, pwCountLower, pwCountDigits, pwCountSpecial, pwCount,
-- ** Database Functions
pwHasService, pwSetService, pwGetService, pwSearch
pwHasService, pwSetService, pwGetService, pwRemoveService, pwSearch
) where
import Control.Lens (makeLenses, over, set, (^.))
@@ -297,6 +297,16 @@ pwGetService
-- not found
pwGetService = M.lookup
-- | removes a service from the database
pwRemoveService
:: String
-- ^ the service being removed
-> PWDatabase
-- ^ the database the service is being removed from
-> PWDatabase
-- ^ the resulting database
pwRemoveService = M.delete
-- | searches for a service
pwSearch
:: String