Skip to content

Commit 2c9d3f4

Browse files
committed
{Expr.Types.Annotated, Eval}: m use Ann{F,E}
1 parent db7ca45 commit 2c9d3f4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Nix/Eval.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ framedEvalExprLoc =
562562
-- | Takes annotated expression. Strip from annotation. Evaluate.
563563
evalContent
564564
:: MonadNixEval v m
565-
=> Compose (Ann ann) NExprF (m v)
565+
=> AnnF ann NExprF (m v)
566566
-> m v
567567
evalContent = eval . annotated . getCompose
568568

src/Nix/Expr/Types/Annotated.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ instance Binary NExprLoc
140140
-- * Other
141141

142142
stripAnnotation :: Functor f => Fix (AnnF ann f) -> Fix f
143-
stripAnnotation = unfoldFix (annotated . getCompose . unFix)
143+
stripAnnotation = unfoldFix (stripAnn . unFix)
144144

145145
stripAnn :: AnnF ann f r -> f r
146146
stripAnn = annotated . getCompose
@@ -181,7 +181,7 @@ deltaInfo :: SourcePos -> (Text, Int, Int)
181181
deltaInfo (SourcePos fp l c) = (toText fp, unPos l, unPos c)
182182

183183
nNull :: NExprLoc
184-
nNull = Fix $ Compose $ Ann nullSpan $ NConstant NNull
184+
nNull = AnnE nullSpan $ NConstant NNull
185185
{-# inline nNull #-}
186186

187187
nullSpan :: SrcSpan

0 commit comments

Comments
 (0)