Skip to content

Commit d9ea71c

Browse files
Gabriella439mergify[bot]
authored andcommitted
Fix assertions in body of let bindings (#1518)
* Fix assertions in body of `let` bindings Fixes #1517 * No need to unpack `Binding`
1 parent 6d0251f commit d9ea71c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

dhall/src/Dhall/Lint.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ removeUnusedBindings _ = Nothing
4444
fixAsserts :: Expr s a -> Maybe (Expr s a)
4545
fixAsserts (Let (Binding { value = Equivalent x y, ..}) body) =
4646
Just (Let (Binding { value = Assert (Equivalent x y), .. }) body)
47+
fixAsserts (Let binding (Equivalent x y)) =
48+
Just (Let binding (Assert (Equivalent x y)))
4749
fixAsserts _ =
4850
Nothing
4951

0 commit comments

Comments
 (0)