-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add dhall support #61
base: master
Are you sure you want to change the base?
Conversation
@nmattia: I think the issue is that you're reading the original file as text using Another approach is that you can normalize the original file using |
@Gabriel439 The problem here is that I don't want to pull the whole source tree into the nix store; ideally I'd copy only -- baz.dhall
{ foo = ../bar/baz.dhall,
quux = [ ./foo.dhall ]
} and now I could call $ dhall-magic baz.dhall
../bar/baz.dhall
./foo.dhall Using that I can call |
@nmattia: You can't yet query |
@nmattia: Thinking about this more, I don't think that querying Dhall for dependencies would solve your problem. If you were able to query Dhall for the dependencies you'd also be able to directly interpret and normalize the expression using the |
Testing this pull request with siggy-chardust, I find it fails to build looking for an import from
|
@philderbeast: That looks like a broken package description because |
@Gabriel439 https://github.com/BlockScope/flare-timing/blob/master/build/library/Pkg.hs#L57
Running
I will investigate changing to the package folder for the |
@philderbeast: This seems like something that should be fixed in Specifically, when See this for more context: https://github.com/dhall-lang/dhall-lang/wiki/Frequently-Asked-Questions-(FAQ)#imports-relative-to-my-top-level-file-are-not-working In general, Dhall files are not meant to be read directly via
... then you will get a failure (and it should fail). |
Here's a concrete example of the above using the golden tests I added for cabalism/hpack-dhall#4 where
Similarly using
|
@philderbeast: See my previous comment and in particular see this link: https://github.com/dhall-lang/dhall-lang/wiki/Frequently-Asked-Questions-(FAQ)#imports-relative-to-my-top-level-file-are-not-working. The issue is feeding the contents of each file directly to |
I've just published hpack-dhall-0.4.0. Could the executable Line 30 in fa50d9b
|
Fixes #51
@philderbeast this adds support for reading
package.dhall
files (I still need to update the command line arguments and the documentation, but the meat is there). However I doubt that this is going to work if other files are imported frompackage.dhall
, like this:I'm not sure how this can be done in a way that works in the sandbox (dhall-nix suffers from the same problem). @Gabriel439 do you have thoughts on this?