Skip to content

Commit 1bf48bf

Browse files
authored
dhall to-directory-tree: Fix support for empty Maps (#2609)
Fixes #2598
1 parent dc48911 commit 1bf48bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dhall/src/Dhall/DirectoryTree.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@ toDirectoryTree allowSeparators path expression = case expression of
179179
RecordLit keyValues ->
180180
Map.unorderedTraverseWithKey_ process $ recordFieldValue <$> keyValues
181181

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

185185
ListLit _ records
186186
| not (null records)

0 commit comments

Comments
 (0)