Skip to content

Commit 400f546

Browse files
committed
TH: quoteExpr{Exp,Pat): strinkle more explicit typing
1 parent 1271be2 commit 400f546

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/Nix/TH.hs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,18 @@ quoteExprExp s =
2222
do
2323
expr <- parseExpr $ fromString s
2424
dataToExpQ
25-
(extQOnFreeVars metaExp expr `extQ` (pure . (TH.lift :: Text -> Q Exp)))
25+
(extQOnFreeVars metaExp expr `extQ` (pure . (TH.lift :: Text -> ExpQ)))
2626
expr
2727

2828
quoteExprPat :: String -> PatQ
2929
quoteExprPat s =
3030
do
31-
expr <- parseExpr $ fromString s
32-
dataToPatQ
33-
(extQOnFreeVars metaPat expr)
31+
expr <- parseExpr @Q $ fromString s
32+
(dataToPatQ @NExpr)
33+
(extQOnFreeVars @_ @NExprLoc @PatQ metaPat expr)
3434
expr
3535

36+
3637
-- | Helper function.
3738
extQOnFreeVars
3839
:: ( Typeable b

0 commit comments

Comments
 (0)