Skip to content

Commit

Permalink
dhall to-directory-tree: Fix support for empty Maps
Browse files Browse the repository at this point in the history
Fixes #2598
  • Loading branch information
Gabriella439 committed Oct 6, 2024
1 parent dc48911 commit d7d7abe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dhall/src/Dhall/DirectoryTree.hs
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ toDirectoryTree allowSeparators path expression = case expression of
RecordLit keyValues ->
Map.unorderedTraverseWithKey_ process $ recordFieldValue <$> keyValues

ListLit (Just (Record [ ("mapKey", recordFieldValue -> Text), ("mapValue", _) ])) [] ->
return ()
ListLit (Just (App List (Record [ ("mapKey", recordFieldValue -> Text), ("mapValue", _) ]))) [] ->
Directory.createDirectoryIfMissing allowSeparators path

ListLit _ records
| not (null records)
Expand Down

0 comments on commit d7d7abe

Please sign in to comment.