dhall-lang / dhall-haskell

Maintainable configuration files
https://dhall-lang.org/
BSD 3-Clause "New" or "Revised" License
912 stars 213 forks source link

Treat slashes in map keys as instruction to create directories in `to-directory-tree` mode #2460

Open nikita-volkov opened 2 years ago

nikita-volkov commented 2 years ago

Currently compiling the following expression:

[ { mapKey = "A/B", mapValue = "" } ]

results in the following error

You tried to translate the following expression to a directory tree:

↳ [ { mapKey = "A/B", mapValue = "" } ]

... which is not an expression that can be translated to a directory tree.

This makes it impossible to generate dynamically structured directory trees.

mmhat commented 1 year ago

I think this is possible with --allow-path-separators introduced in https://github.com/dhall-lang/dhall-haskell/pull/2437.

(@Gabriella439 @sjakobi This issue should be moved to the dhall-haskell project. Either I don't have the permissions to do that or I fail to see how.)