-
Notifications
You must be signed in to change notification settings - Fork 211
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 a "dhall parse-tree" command for debugging purposes #1553
Conversation
I'm a little bit reluctant to do this because the internal AST is highly volatile and verbose (especially if we start adding Also, remember that the CBOR representation already plays the role of a language-independent AST and $ dhall encode --json <<< 'toMap {=} : a ? b'
[
27,
[
8,
{}
],
[
3,
11,
[
"a",
0
],
[
"b",
0
]
]
] $ dhall encode --json <<< 'http://a?/'
[
24,
null,
0,
0,
null,
"a",
"",
"/"
] |
Personally I don't find the output of Regarding your compatibility concerns – the usage info already says "for debugging":
Would it help if I add "output may change at any time" or something like that? |
371bf79
to
6767ab3
Compare
I wonder why Hydra complains about a missing
|
@sjakobi: Would it be possible to hide the I also think the subcommand should have Haskell in the name, since it is language-specific (e.g. |
@sjakobi: That seems like a |
I think hiding should be possible, but I haven't gotten it to work yet (see pcapriotti/optparse-applicative#365). |
The error was already present when I didn't use the cabal flags: https://hydra.dhall-lang.org/build/45291/nixlog/3 Am I using
|
@sjakobi: What version of $ cabal2nix cabal://pretty-simple-3.1.0.0
{ mkDerivation, aeson, ansi-terminal, base, bytestring, Cabal
, cabal-doctest, containers, criterion, doctest, Glob, mtl
, optparse-applicative, QuickCheck, stdenv, template-haskell, text
, transformers
}:
mkDerivation {
pname = "pretty-simple";
version = "3.1.0.0";
sha256 = "ea8a062fe7a535a0778ea0f85442551b9a67fad95979fc3e4c617399452c775c";
isLibrary = true;
isExecutable = true;
setupHaskellDepends = [ base Cabal cabal-doctest ];
libraryHaskellDepends = [
ansi-terminal base containers mtl text transformers
];
executableHaskellDepends = [
aeson base bytestring optparse-applicative text
];
testHaskellDepends = [
base doctest Glob QuickCheck template-haskell
];
benchmarkHaskellDepends = [ base criterion text ];
homepage = "https://github.com/cdepillabout/pretty-simple";
description = "pretty printer for data types with a 'Show' instance";
license = stdenv.lib.licenses.bsd3;
} |
I forgot to mention that the version I'm using is: $ cabal2nix --version
cabal2nix 2.8.1 |
For other packages I'm still getting the I've made a bug report: NixOS/cabal2nix#436. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one minor suggestion
… for debugging.
b095165
to
8753094
Compare
Sample output: