From 50baea5e1e482be3c4fcc13c9a45b1083243f681 Mon Sep 17 00:00:00 2001 From: Guillaume Maudoux Date: Tue, 3 Nov 2020 00:00:55 +0100 Subject: [PATCH] Fix `assert` parser to accept top-level nix forms --- src/Nix/Parser.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Nix/Parser.hs b/src/Nix/Parser.hs index 4992cb9..2f682c7 100644 --- a/src/Nix/Parser.hs +++ b/src/Nix/Parser.hs @@ -268,7 +268,7 @@ nixIf = annotateLocation1 nixAssert :: Parser NExprLoc nixAssert = annotateLocation1 ( NAssert - <$> (reserved "assert" *> nixExpr) + <$> (reserved "assert" *> nixToplevelForm) <*> (semi *> nixToplevelForm) "assert" )