Commit Graph

2126 Commits

Author SHA1 Message Date
Guillaume Maudoux 2af45ba385 Fix unused param warning 2020-11-18 10:04:09 +01:00
Guillaume Maudoux 5c72d9530c Restore some `sort -k4` of order in the builtins 2020-11-18 09:42:06 +01:00
Guillaume Maudoux 50baea5e1e Fix `assert` parser to accept top-level nix forms 2020-11-18 09:42:06 +01:00
Guillaume Maudoux dc31c5e64f Fix pathExists to also accept dirs 2020-11-18 09:42:06 +01:00
Guillaume Maudoux 53b4db2525 Fix builtins.substring for negative lengths 2020-11-18 09:42:06 +01:00
Guillaume Maudoux 3ac720b5aa Complete and cleanup builtins list 2020-11-18 09:42:06 +01:00
Guillaume Maudoux 2a7a447a7d Fix occurences of name-shadowing 2020-11-18 09:42:06 +01:00
Guillaume Maudoux b6b06224c5 Remove very verbose debug statements 2020-11-18 09:42:06 +01:00
Guillaume Maudoux 19790fd1fc Show faulty string in fromStringNoContext error 2020-11-18 09:42:06 +01:00
Guillaume Maudoux d32a6fbaf3 Fix isString to refrain from coercing values
Derivations can be automatically coerced to strings. They are however
not strings and `isString` should return `False` on them.
2020-11-18 09:42:06 +01:00
Guillaume Maudoux 48ed345075 Disable debug logging on thunk force 2020-11-18 09:42:06 +01:00
Guillaume Maudoux 59698de718 Handle errors located in raw strings 2020-11-18 09:42:06 +01:00
Joe Hermaszewski 6bc278c859
Merge pull request #759 from haskell-nix/joe-actions
Bump install-haskell cachix-action and install-nix-action
2020-11-17 18:39:36 +08:00
Joe Hermaszewski c0f5b691d1 Bump install-haskell cachix-action and install-nix-action
Closes https://github.com/haskell-nix/hnix/issues/758

install-nix-action requires an explicit `nix_path` now, do not set this
when it is just used to install nix-instantiate for tests
2020-11-17 15:31:27 +08:00
Joe Hermaszewski b1f7397807
Merge pull request #756 from layus/fix-impl
Make `->` right assosciative
2020-11-17 14:58:21 +08:00
Guillaume Maudoux e2ad934492 Make `->` right assosciative
As per the nix source code 61e816217b/src/libexpr/parser.y (L296-L307)

The bug was found while parsing firefox 5030e5cdc7/pkgs/applications/networking/browsers/firefox/common.nix (L76-L77)
2020-11-16 14:32:00 +01:00
Anton Latukha 26543bb530
default.nix: upd rev (#754) 2020-11-03 18:46:36 +02:00
Anton Latukha b21bb48bf5
hnix.cabal: version: increment to major release 0.11.0 (#751) 2020-11-02 19:13:31 +02:00
Anton Latukha 9d0addaa4b
CHANGELOG.md: add 0.11.0 (#749) 2020-11-02 17:57:04 +02:00
Joe Hermaszewski 75e3a73bbe
Merge pull request #741 from expipiplus1/joe-fix-qq
Fix QQ Text lifting error
2020-11-01 11:47:49 +08:00
Joe Hermaszewski c0ed91f8c2
Merge pull request #744 from expipiplus1/joe-sourcepos-whitespace
Use pre-whitespace position for source end locations
2020-11-01 11:46:38 +08:00
Joe Hermaszewski 6b9d4d1890 Restrict type of parens and brackets to prevent negative use of NExprLoc
it is not generally appropriate to have higher-order parsers operate on
annotated locations as they are liable to perform changes to the parser which
are not captured in the annotation.

See https://github.com/haskell-nix/hnix/pull/739 and
https://github.com/haskell-nix/hnix/pull/744 for examples.
2020-10-29 15:28:02 +02:00
Joe Hermaszewski dba7650bc5 Correct location annotation for parenthesized expressions
At the moment parentheses are not included in the location annotation
for nix expressions. This changes the code to include any parentheses in
the SrcSpan of the underlying expression. Information which is difficult
to recover otherwise.
2020-10-29 15:28:02 +02:00
Joe Hermaszewski 4202bac068 Remove Generic1 instance for NKeyName
See https://github.com/haskell-nix/hnix/issues/225
2020-10-26 18:57:17 -07:00
Joe Hermaszewski 731ed878e1 Use pre-whitespace position for source end locations
Fixes https://github.com/haskell-nix/hnix/issues/743
2020-10-25 17:47:11 +08:00
Joe Hermaszewski 9920802798 Fix QQ Text lifting error
Work around https://gitlab.haskell.org/ghc/ghc/-/issues/12596 using
https://stackoverflow.com/questions/38143464/cant-find-inerface-file-declaration-for-variable
2020-10-23 15:04:28 +08:00
Anton Latukha 820499daff [auto] upd README TOC 2020-10-04 14:30:21 +00:00
Anton Latukha 50c6301b8d
README.md: REPL: add laziness and strictness (#738)
It is not ideal placement, but because of the current CLI design there is no ideal placement at all, except to place implications of every key in its own headline, which would mean to duplicate most of `--help` in README.

#663 already shows that `--help` is not understandable, because currently everything is intermingled.

Further rehashing of README is of course possible, but I see no way to lay-out needed info cleanly (there is a lot of if/else cases) without the redesign of the CLI.
2020-10-04 17:29:50 +03:00
Anton Latukha e18d3cc9a2 [auto] upd README TOC 2020-09-30 18:05:59 +00:00
Anton-Latukha 7b999da3da README.md: m upd and rephrasing 2020-09-30 21:05:26 +03:00
Anton Latukha e1a2a22d63 [auto] upd README TOC 2020-09-30 17:45:19 +00:00
Anton-Latukha 908bd0c287 README.md: HNix REPL: rephrase 2020-09-30 20:44:49 +03:00
Anton-Latukha 7abc3c6ece README.md: form the ghcid section 2020-09-30 20:44:49 +03:00
Anton Latukha 4b4333602e
Merge request #731 default.nix: switch to the GHC 8.10.1, now executable gets build
Switching Nix dev env and its CI to GHC 8.10.

To avoid contribution loop problems, since we pin Nixpkgs in default.nix - it is logical by default CI to follow the supported way of building.

The downsides are:
  * Maintainer would need to solve Nix issues by himself, when wants to update the Nixpkgs revision, or play a wait and pick rev game with Nixpkgs.
  * On the rev update, the `Nix-shell & Hoogle` CI build needs to rebuild the whole Haskell stack from the bottom up, so the rev update process takes a lot of wait time (hours), and also should be done from the repo internal branch to save the already built parts of the stack during rev testing.

Also one CI build was not terminating, so switched to the new rev.
2020-09-30 20:36:28 +03:00
Anton-Latukha c8c9990d9e
CI: GitHub: Nix-dev-env-{main,macOS}: rm Nixpkgs channel from names 2020-09-30 19:14:45 +03:00
Anton-Latukha f91a12d520
default.nix: try new rev
Conduit testing suite does not terminate, lets try recent nixos-20.09 revision.
2020-09-30 19:07:34 +03:00
Anton Latukha 098ae18fb9 [auto] upd README TOC 2020-09-30 15:29:38 +00:00
Anton Latukha 11dc625daf
Merge request #734 README-restructuring-03
Adding `nix-build`.
2020-09-30 18:29:01 +03:00
Anton-Latukha 78ead0428f
README.md: nix-build: add Run the result 2020-09-30 18:25:39 +03:00
Anton-Latukha ef702b48ec
README.md: add Building the project with Nix-build section 2020-09-30 18:25:34 +03:00
Anton-Latukha 5de67e72e1
README.md: upd Using the HNix REPL 2020-09-30 17:56:16 +03:00
Anton-Latukha 100a22d4cd
README.md: fx Building section rank 2020-09-30 17:52:58 +03:00
Anton Latukha 407e30f2c3 [auto] upd README TOC 2020-09-30 14:48:47 +00:00
Anton Latukha 778e6f31ee
Merge request #733 from README restructuring 02
Moving the current "Building" section into "Developing with Cabal".
2020-09-30 17:48:22 +03:00
Anton-Latukha 53ef61eb89
README.md: m upd 2020-09-30 17:41:45 +03:00
Anton-Latukha 2235addf60
README.md: Cabal: Full debud: m rephrasing 2020-09-30 17:38:53 +03:00
Anton-Latukha deb204c01d
README.md mv current Building section into Cabal section
Since Building section is about use of Cabal workflow.
2020-09-30 17:36:15 +03:00
Anton-Latukha 9bc228b3b2
README.md: Cabal: form run HNix 2020-09-30 17:35:15 +03:00
Anton Latukha 8a85734fe8 [auto] upd README TOC 2020-09-30 14:27:27 +00:00
Anton Latukha 35cc977b86
Merge request #732 README restructuring 2020-09-30 17:27:02 +03:00