fix build with older ghc

null only used to work on lists, not sets.

Fixes the Android build and probably also i386ancient.

This commit was sponsored by mo on Patreon.
This commit is contained in:
Joey Hess 2018-09-12 14:10:08 -04:00
parent 2743224658
commit c63d28b39b
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -21,6 +21,7 @@ import Types.UUID
import Types.MetaData
import qualified Data.Map as M
import qualified Data.Set as S
import Data.Default
data FileTransition
@ -53,7 +54,7 @@ dropDead f content trustmap = case getLogVariety f of
else ChangeFile $ Presence.showLog newlog
Just RemoteMetaDataLog ->
let newlog = dropDeadFromRemoteMetaDataLog trustmap $ MetaData.simplifyLog $ MetaData.parseLog content
in if null newlog
in if S.null newlog
then RemoveFile
else ChangeFile $ MetaData.showLog newlog
Just OtherLog -> PreserveFile