Skip to content

Commit d1b7982

Browse files
committed
Expr: Types: Annotated: pattern NWith(_->AnnF)
1 parent 2e90ec9 commit d1b7982

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/Nix/Exec.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ instance MonadNix e t f m => MonadEval (NValue t f m) m where
233233
evalWith c b = do
234234
scope <- currentScopes
235235
span <- currentPos
236-
let f = join $ addProvenance . Provenance scope . NWith_ span Nothing . pure
236+
let f = join $ addProvenance . Provenance scope . NWithAnnF span Nothing . pure
237237
f <$> evalWithAttrSet c b
238238

239239
evalIf c t f = do

src/Nix/Expr/Types/Annotated.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,15 +237,15 @@ pattern NLetAnnF ann x b = AnnF ann (NLet x b)
237237
pattern NIfAnnF :: SrcSpan -> r -> r -> r -> NExprLocF r
238238
pattern NIfAnnF ann c t e = AnnF ann (NIf c t e)
239239

240-
pattern NWith_ :: SrcSpan -> r -> r -> NExprLocF r
241-
pattern NWith_ ann x y = AnnF ann (NWith x y)
240+
pattern NWithAnnF :: SrcSpan -> r -> r -> NExprLocF r
241+
pattern NWithAnnF ann x y = AnnF ann (NWith x y)
242242

243243
pattern NAssert_ :: SrcSpan -> r -> r -> NExprLocF r
244244
pattern NAssert_ ann x y = AnnF ann (NAssert x y)
245245

246246
pattern NSynHole_ :: SrcSpan -> VarName -> NExprLocF r
247247
pattern NSynHole_ ann x = AnnF ann (NSynHole x)
248-
{-# complete NConstantAnnF, NStrAnnF, NSymAnnF, NListAnnF, NSetAnnF, NLiteralPathAnnF, NEnvPathAnnF, NUnaryAnnF, NBinaryAnnF, NSelectAnnF, NHasAttrAnnF, NAbsAnnF, NLetAnnF, NIfAnnF, NWith_, NAssert_, NSynHole_ #-}
248+
{-# complete NConstantAnnF, NStrAnnF, NSymAnnF, NListAnnF, NSetAnnF, NLiteralPathAnnF, NEnvPathAnnF, NUnaryAnnF, NBinaryAnnF, NSelectAnnF, NHasAttrAnnF, NAbsAnnF, NLetAnnF, NIfAnnF, NWithAnnF, NAssert_, NSynHole_ #-}
249249

250250

251251
pattern PNConstant :: SrcSpan -> NAtom -> NExprLoc

src/Nix/Reduce.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,8 @@ reduce (NSetAnnF ann Recursive binds) =
255255

256256
-- Encountering a 'with' construction eliminates any hope of inlining
257257
-- definitions.
258-
reduce (NWith_ ann scope body) =
259-
clearScopes @NExprLoc $ Fix <$> liftA2 (NWith_ ann) scope body
258+
reduce (NWithAnnF ann scope body) =
259+
clearScopes @NExprLoc $ Fix <$> liftA2 (NWithAnnF ann) scope body
260260

261261
-- | Reduce a let binds section by pushing lambdas,
262262
-- constants and strings to the body scope.

0 commit comments

Comments
 (0)