mirror of
https://github.com/commercialhaskell/stackage-server.git
synced 2026-01-12 04:08:29 +01:00
Handler.Package: fix the empty warning correctly (thanks zudov)
This commit is contained in:
parent
89c8cdb1be
commit
60dcfba8de
@ -16,7 +16,7 @@ import qualified Data.Text.Lazy as LT
|
||||
import Distribution.Package.ModuleForest
|
||||
import Graphics.Badge.Barrier
|
||||
import Control.Lens
|
||||
import Import hiding (empty)
|
||||
import Import
|
||||
import qualified Text.Blaze.Html.Renderer.Text as LT
|
||||
import Text.Email.Validate
|
||||
import Stackage.Database
|
||||
@ -161,13 +161,13 @@ data Identifier
|
||||
--
|
||||
parseIdentitiesLiberally :: Text -> [Identifier]
|
||||
parseIdentitiesLiberally =
|
||||
filter (not . empty) .
|
||||
filter (not . emptyPlainText) .
|
||||
map strip .
|
||||
concatPlains .
|
||||
map parseChunk .
|
||||
T.split (== ',')
|
||||
where empty (PlainText e) = T.null e
|
||||
empty _ = False
|
||||
where emptyPlainText (PlainText e) = T.null e
|
||||
emptyPlainText _ = False
|
||||
strip (PlainText t) = PlainText (T.strip t)
|
||||
strip x = x
|
||||
concatPlains = go
|
||||
|
||||
Loading…
Reference in New Issue
Block a user