File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -650,8 +650,9 @@ ekey keys pos f e@(Fix x) | (NSet NNonRecursive xs, ann) <- fromNExpr x =
650650 maybe
651651 e
652652 (\ v ->
653- let entry = NamedVar (NE. map StaticKey keys) v pos in
654- Fix (toNExpr (NSet NNonRecursive (entry : xs), ann)))
653+ let entry = NamedVar (StaticKey <$> keys) v pos in
654+ Fix $ toNExpr ( NSet NNonRecursive $ [entry] <> xs, ann )
655+ )
655656 <$>
656657 f Nothing
657658 where
Original file line number Diff line number Diff line change @@ -355,7 +355,7 @@ pruneTree opts =
355355 prune = \ case
356356 NStr str -> pure $ NStr $ pruneString str
357357 NHasAttr (Just aset) attr ->
358- pure $ NHasAttr aset $ NE. map pruneKeyName attr
358+ pure $ NHasAttr aset $ pruneKeyName <$> attr
359359 NAbs params (Just body) -> pure $ NAbs (pruneParams params) body
360360
361361 NList l -> pure $ NList $
@@ -379,7 +379,7 @@ pruneTree opts =
379379 (mapMaybe pruneBinding binds)
380380
381381 NSelect (Just aset) attr alt ->
382- pure $ NSelect aset (NE. map pruneKeyName attr) ( join alt)
382+ pure $ NSelect aset (pruneKeyName <$> attr) $ join alt
383383
384384 -- These are the only short-circuiting binary operators
385385 NBinary NAnd (Just (AnnE _ larg)) _ -> pure larg
@@ -449,7 +449,7 @@ pruneTree opts =
449449
450450 pruneBinding :: Binding (Maybe NExprLoc ) -> Maybe (Binding NExprLoc )
451451 pruneBinding (NamedVar _ Nothing _ ) = Nothing
452- pruneBinding (NamedVar xs (Just x) pos) = pure $ NamedVar (NE. map pruneKeyName xs) x pos
452+ pruneBinding (NamedVar xs (Just x) pos) = pure $ NamedVar (pruneKeyName <$> xs) x pos
453453 pruneBinding (Inherit _ [] _ ) = Nothing
454454 pruneBinding (Inherit (join -> Nothing ) _ _ ) = Nothing
455455 pruneBinding (Inherit (join -> m) xs pos) = pure $ Inherit m (pruneKeyName <$> xs) pos
You can’t perform that action at this time.
0 commit comments