avoid relying on crazy monoid instance

This code worked as intended, but only by accident, because of this
instance:

instance Monoid b => Monoid (x -> b) where mempty = const (mempty :: b)

Let's be explicit that we throw away the error message.
This commit is contained in:
Joey Hess 2020-01-17 13:49:12 -04:00
parent e78bf29725
commit 1ce722d86f
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -112,7 +112,8 @@ remoteGen m t g = do
let c = fromMaybe M.empty $ M.lookup cu m
pc <- if null c
then pure mempty
else either mempty id . parseRemoteConfig c <$> configParser t
else either (const mempty) id . parseRemoteConfig c
<$> configParser t
generate t g u pc gc rs >>= \case
Nothing -> return Nothing
Just r -> Just <$> adjustExportImport (adjustReadOnly (addHooks r)) rs