File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -218,13 +218,20 @@ reduce base@(NSelect_ _ _ attrs _)
218218
219219-- | Reduce a set by inlining its binds outside of the set
220220-- if none of the binds inherit the super set.
221- reduce e@ (NSet_ ann NNonRecursive binds) = do
222- let usesInherit = flip any binds $ \ case
223- Inherit {} -> True
224- _ -> False
225- if usesInherit
226- then clearScopes @ NExprLoc $ Fix . NSet_ ann NNonRecursive <$> traverse sequence binds
227- else Fix <$> sequence e
221+ reduce e@ (NSet_ ann NNonRecursive binds) =
222+ do
223+ let
224+ usesInherit =
225+ any
226+ (\ case
227+ Inherit {} -> True
228+ _ -> False
229+ )
230+ binds
231+
232+ if usesInherit
233+ then clearScopes @ NExprLoc $ Fix . NSet_ ann NNonRecursive <$> traverse sequence binds
234+ else Fix <$> sequence e
228235
229236-- Encountering a 'rec set' construction eliminates any hope of inlining
230237-- definitions.
You can’t perform that action at this time.
0 commit comments