Skip to content

Commit fbb34c5

Browse files
committed
Expr: Types: Annotated: pattern NAssert(_->AnnF)
1 parent d1b7982 commit fbb34c5

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/Nix/Exec.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ instance MonadNix e t f m => MonadEval (NValue t f m) m where
260260
(nverr $ Assertion span c)
261261
(do
262262
scope <- currentScopes
263-
let f = join (addProvenance . Provenance scope . NAssert_ span (pure c) . pure)
263+
let f = join (addProvenance . Provenance scope . NAssertAnnF span (pure c) . pure)
264264
f <$> body
265265
)
266266
b

src/Nix/Expr/Types/Annotated.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,12 +240,12 @@ pattern NIfAnnF ann c t e = AnnF ann (NIf c t e)
240240
pattern NWithAnnF :: SrcSpan -> r -> r -> NExprLocF r
241241
pattern NWithAnnF ann x y = AnnF ann (NWith x y)
242242

243-
pattern NAssert_ :: SrcSpan -> r -> r -> NExprLocF r
244-
pattern NAssert_ ann x y = AnnF ann (NAssert x y)
243+
pattern NAssertAnnF :: SrcSpan -> r -> r -> NExprLocF r
244+
pattern NAssertAnnF 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, NWithAnnF, NAssert_, NSynHole_ #-}
248+
{-# complete NConstantAnnF, NStrAnnF, NSymAnnF, NListAnnF, NSetAnnF, NLiteralPathAnnF, NEnvPathAnnF, NUnaryAnnF, NBinaryAnnF, NSelectAnnF, NHasAttrAnnF, NAbsAnnF, NLetAnnF, NIfAnnF, NWithAnnF, NAssertAnnF, NSynHole_ #-}
249249

250250

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

src/Nix/Reduce.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ reduce e@(NIfAnnF _ b t f) =
306306

307307
-- | Reduce an assert atom to its encapsulated
308308
-- symbol if the assertion is a boolean constant.
309-
reduce e@(NAssert_ _ b body) =
309+
reduce e@(NAssertAnnF _ b body) =
310310
(\case
311311
Fix (NConstantAnnF _ (NBool b')) | b' -> body
312312
_ -> Fix <$> sequence e

0 commit comments

Comments
 (0)