@@ -313,10 +313,10 @@ pruneTree opts = foldFixM $ \(FlaggedF (b, Compose x)) -> do
313313 NAbs params (Just body) -> Just $ NAbs (pruneParams params) body
314314
315315 NList l | reduceLists opts -> Just $ NList (catMaybes l)
316- | otherwise -> Just $ NList (map (fromMaybe nNull) l)
316+ | otherwise -> Just $ NList (fmap (fromMaybe nNull) l)
317317 NSet recur binds
318318 | reduceSets opts -> Just $ NSet recur (mapMaybe sequence binds)
319- | otherwise -> Just $ NSet recur (map (fmap (fromMaybe nNull)) binds)
319+ | otherwise -> Just $ NSet recur (fmap (fmap (fromMaybe nNull)) binds)
320320
321321 NLet binds (Just body@ (Fix (Compose (Ann _ x)))) ->
322322 Just $ case mapMaybe pruneBinding binds of
@@ -386,10 +386,10 @@ pruneTree opts = foldFixM $ \(FlaggedF (b, Compose x)) -> do
386386 pruneParams (Param n) = Param n
387387 pruneParams (ParamSet xs b n)
388388 | reduceSets opts = ParamSet
389- (map (second (maybe (Just nNull) (Just . fromMaybe nNull))) xs)
389+ (fmap (second (maybe (Just nNull) (Just . fromMaybe nNull))) xs)
390390 b
391391 n
392- | otherwise = ParamSet (map (second (fmap (fromMaybe nNull))) xs) b n
392+ | otherwise = ParamSet (fmap (second (fmap (fromMaybe nNull))) xs) b n
393393
394394 pruneBinding :: Binding (Maybe NExprLoc ) -> Maybe (Binding NExprLoc )
395395 pruneBinding (NamedVar _ Nothing _) = Nothing
@@ -398,7 +398,7 @@ pruneTree opts = foldFixM $ \(FlaggedF (b, Compose x)) -> do
398398 pruneBinding (Inherit _ [] _) = Nothing
399399 pruneBinding (Inherit (join -> Nothing ) _ _) = Nothing
400400 pruneBinding (Inherit (join -> m) xs pos) =
401- Just (Inherit m (map pruneKeyName xs) pos)
401+ Just (Inherit m (fmap pruneKeyName xs) pos)
402402
403403reducingEvalExpr
404404 :: (Framed e m , Has e Options , Exception r , MonadCatch m , MonadIO m )
0 commit comments