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:
parent
e78bf29725
commit
1ce722d86f
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue