Skip to content

Commit 2fb0de7

Browse files
committed
Expr: Types: Annotated: pattern NLet(_->AnnF)
1 parent 060ddfc commit 2fb0de7

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/Nix/Expr/Types/Annotated.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,8 @@ pattern NHasAttrAnnF ann x p = AnnF ann (NHasAttr x p)
231231
pattern NAbsAnnF :: SrcSpan -> Params r-> r -> NExprLocF r
232232
pattern NAbsAnnF ann x b = AnnF ann (NAbs x b)
233233

234-
pattern NLet_ :: SrcSpan -> [Binding r] -> r -> NExprLocF r
235-
pattern NLet_ ann x b = AnnF ann (NLet x b)
234+
pattern NLetAnnF :: SrcSpan -> [Binding r] -> r -> NExprLocF r
235+
pattern NLetAnnF ann x b = AnnF ann (NLet x b)
236236

237237
pattern NIf_ :: SrcSpan -> r -> r -> r -> NExprLocF r
238238
pattern NIf_ ann c t e = AnnF ann (NIf c t e)
@@ -245,7 +245,7 @@ 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, NLet_, NIf_, NWith_, NAssert_, NSynHole_ #-}
248+
{-# complete NConstantAnnF, NStrAnnF, NSymAnnF, NListAnnF, NSetAnnF, NLiteralPathAnnF, NEnvPathAnnF, NUnaryAnnF, NBinaryAnnF, NSelectAnnF, NHasAttrAnnF, NAbsAnnF, NLetAnnF, NIf_, NWith_, NAssert_, NSynHole_ #-}
249249

250250

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

src/Nix/Reduce.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ staticImport pann path = do
114114
(StaticKey "__cur_file" :| mempty)
115115
(Fix (NLiteralPathAnnF pann path))
116116
pos
117-
x' = Fix $ NLet_ span [cur] x
117+
x' = Fix $ NLetAnnF span [cur] x
118118
modify $ first $ HM.insert path x'
119119
local
120120
(const (pure path, mempty)) $
@@ -260,7 +260,7 @@ reduce (NWith_ ann scope body) =
260260

261261
-- | Reduce a let binds section by pushing lambdas,
262262
-- constants and strings to the body scope.
263-
reduce (NLet_ ann binds body) =
263+
reduce (NLetAnnF ann binds body) =
264264
do
265265
binds' <- traverse sequence binds
266266
body' <-
@@ -287,7 +287,7 @@ reduce (NLet_ ann binds body) =
287287
-- NamedVar (StaticKey name _ :| []) _ ->
288288
-- name `S.member` names
289289
-- _ -> True
290-
pure $ Fix $ NLet_ ann binds' body'
290+
pure $ Fix $ NLetAnnF ann binds' body'
291291
-- where
292292
-- go m [] = pure m
293293
-- go m (x:xs) = case x of

tests/ParserTests.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ case_simpleLoc =
646646
in foo
647647
|]
648648
(Fix
649-
(NLet_
649+
(NLetAnnF
650650
(mkSpan 1 1 4 7)
651651
[ NamedVar
652652
(StaticKey "foo" :| [])

0 commit comments

Comments
 (0)