Skip to content

Commit d149a4c

Browse files
committed
Expr: Types: TH.Lift NExpr: TH 2.17: fx liftTyped
1 parent d5c76c9 commit d149a4c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Nix/Expr/Types.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ instance TH.Lift NExpr where
631631
pure [| $(TH.lift b) |]
632632
)
633633
#if MIN_VERSION_template_haskell(2,17,0)
634-
liftTyped = TH.liftTyped
634+
liftTyped = TH.unsafeCodeCoerce . TH.lift
635635
#elif MIN_VERSION_template_haskell(2,16,0)
636636
liftTyped = TH.unsafeTExpCoerce . TH.lift
637637
#endif
@@ -677,12 +677,12 @@ stripPositionInfo = transport phi
677677
where
678678
transport f (Fix x) = Fix $ transport f <$> f x
679679

680-
phi (NSet recur binds) = NSet recur $ go <$> binds
681-
phi (NLet binds body) = NLet (go <$> binds) body
680+
phi (NSet recur binds) = NSet recur $ erasePositions <$> binds
681+
phi (NLet binds body) = NLet (erasePositions <$> binds) body
682682
phi x = x
683683

684-
go (NamedVar path r _pos) = NamedVar path r nullPos
685-
go (Inherit ms names _pos) = Inherit ms names nullPos
684+
erasePositions (NamedVar path r _pos) = NamedVar path r nullPos
685+
erasePositions (Inherit ms names _pos) = Inherit ms names nullPos
686686

687687
nullPos :: SourcePos
688688
nullPos = on (SourcePos "<string>") mkPos 1 1

0 commit comments

Comments
 (0)