Compare commits
4 Commits
f88cb0ecea
...
2fcb4eae1e
Author | SHA1 | Date |
---|---|---|
Michele Guerini Rocco | 2fcb4eae1e | |
Michele Guerini Rocco | 6c3e5a5c4e | |
Michele Guerini Rocco | cfe3ac83eb | |
Michele Guerini Rocco | 5de13cdc3d |
10
Main.hs
10
Main.hs
|
@ -13,8 +13,8 @@ import qualified Database.LevelDB as L
|
|||
import qualified Database.LevelDB.Streaming as LS
|
||||
|
||||
-- Error handling
|
||||
import Control.Exception as BE
|
||||
import Control.Monad.Catch as CE
|
||||
import Control.Exception as BE
|
||||
import Control.Monad.Catch as CE
|
||||
|
||||
-- Configuration
|
||||
import qualified Options.Applicative as O
|
||||
|
@ -32,7 +32,7 @@ import Data.List (nub)
|
|||
import Data.Maybe (mapMaybe)
|
||||
import Data.Function ((&))
|
||||
import Data.Default (def)
|
||||
import Control.Monad (mapM_, when)
|
||||
import Control.Monad (when)
|
||||
import Control.Monad.Reader (ReaderT, runReaderT, asks)
|
||||
import Control.Monad.Except (ExceptT, runExceptT, throwError)
|
||||
import System.FilePath (joinPath, takeBaseName, (</>))
|
||||
|
@ -189,8 +189,8 @@ deleteQuotaOrigins = do
|
|||
S.restrict (by whitelist quota)
|
||||
return (quota ! #origin)
|
||||
when (not dry) $
|
||||
S.deleteFrom_ cookies (by whitelist)
|
||||
return (n, nub bad)
|
||||
S.deleteFrom_ quotaOrigins (by whitelist)
|
||||
return (length bad, nub bad)
|
||||
where
|
||||
-- check if quota is not whitelisted
|
||||
by whitelist quota = S.not_ (S.true `S.isIn` matches)
|
||||
|
|
Loading…
Reference in New Issue