You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is more of a "is there any way to do this / could this functionality be supported in future" question rather than an issue:
When translating from haskell to dhall, I want to have my output be a collection of dhall files connected by imports rather than one big file. Currently I'm doing this by translating and then traversing the resulting dhall expression, splitting out subexpressions and replacing them with import statements, but I would much prefer to be able to mark a split point in the haskell representation rather than having to scan for it in the dhall expression.
The two initial ideas I had for this are both currently not supported as far as I can tell:
A custom ToDhall instance that would produce an import statement / an expression containing imports / a list of expressions containing imports and their respective subpaths ... -> can't do that bc the types of embed and declared are limited to import free expressions
Build my own ToSplitDhall typeclass to do this -> the problem with this is a bit harder to express but I think the core of the issue here is that I can't find a way to build an expression with a hole that I can slot an existing subexpression into
Am I missing something and there is already a way to do this?
If not, was it intentionally omitted or just hasn't been needed so far?
The text was updated successfully, but these errors were encountered:
yeah that's what I thought, but even then I am still restricted to Expr Src Void so no imports (unless I purposely misuse the import type parameter, which I'd rather not), meaning I would still have to go through the resulting expressions and replace subexpressions with import statements, right?
This is more of a "is there any way to do this / could this functionality be supported in future" question rather than an issue:
When translating from haskell to dhall, I want to have my output be a collection of dhall files connected by imports rather than one big file. Currently I'm doing this by translating and then traversing the resulting dhall expression, splitting out subexpressions and replacing them with import statements, but I would much prefer to be able to mark a split point in the haskell representation rather than having to scan for it in the dhall expression.
The two initial ideas I had for this are both currently not supported as far as I can tell:
embed
anddeclared
are limited to import free expressionsAm I missing something and there is already a way to do this?
If not, was it intentionally omitted or just hasn't been needed so far?
The text was updated successfully, but these errors were encountered: