Skip to content

Commit 8441fe9

Browse files
committed
Expr: Types: Annotated: pattern NLiteralPath(_->AnnF)
1 parent 86089f5 commit 8441fe9

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
@@ -211,7 +211,7 @@ instance MonadNix e t f m => MonadEval (NValue t f m) m where
211211
evalLiteralPath p = do
212212
scope <- currentScopes
213213
span <- currentPos
214-
nvPathP (Provenance scope $ NLiteralPath_ span p) <$>
214+
nvPathP (Provenance scope $ NLiteralPathAnnF span p) <$>
215215
makeAbsolutePath @t @f @m p
216216

217217
evalEnvPath p = do

src/Nix/Expr/Types/Annotated.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ pattern NListAnnF ann x = AnnF ann (NList x)
210210
pattern NSetAnnF :: SrcSpan -> Recursivity -> [Binding r] -> NExprLocF r
211211
pattern NSetAnnF ann recur x = AnnF ann (NSet recur x)
212212

213-
pattern NLiteralPath_ :: SrcSpan -> Path -> NExprLocF r
214-
pattern NLiteralPath_ ann x = AnnF ann (NLiteralPath x)
213+
pattern NLiteralPathAnnF :: SrcSpan -> Path -> NExprLocF r
214+
pattern NLiteralPathAnnF ann x = AnnF ann (NLiteralPath x)
215215

216216
pattern NEnvPath_ :: SrcSpan -> Path -> NExprLocF r
217217
pattern NEnvPath_ ann x = AnnF ann (NEnvPath x)
@@ -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, NLiteralPath_, NEnvPath_, NUnary_, NBinary_, NSelect_, NHasAttr_, NAbs_, NLet_, NIf_, NWith_, NAssert_, NSynHole_ #-}
248+
{-# complete NConstantAnnF, NStrAnnF, NSymAnnF, NListAnnF, NSetAnnF, NLiteralPathAnnF, NEnvPath_, NUnary_, NBinary_, NSelect_, NHasAttr_, NAbs_, NLet_, NIf_, NWith_, 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
@@ -112,7 +112,7 @@ staticImport pann path = do
112112
cur =
113113
NamedVar
114114
(StaticKey "__cur_file" :| mempty)
115-
(Fix (NLiteralPath_ pann path))
115+
(Fix (NLiteralPathAnnF pann path))
116116
pos
117117
x' = Fix $ NLet_ span [cur] x
118118
modify $ first $ HM.insert path x'
@@ -174,7 +174,7 @@ reduce (NBinary_ bann NApp fun arg) = fun >>= \case
174174
f@(Fix (NSymAnnF _ "import")) ->
175175
(\case
176176
-- Fix (NEnvPath_ pann origPath) -> staticImport pann origPath
177-
Fix (NLiteralPath_ pann origPath) -> staticImport pann origPath
177+
Fix (NLiteralPathAnnF pann origPath) -> staticImport pann origPath
178178
v -> pure $ Fix $ NBinary_ bann NApp f v
179179
) =<< arg
180180

0 commit comments

Comments
 (0)