Commit graph

2126 commits

Author SHA1 Message Date
Anton-Latukha 18b54986b1
README: unify shell entries: rm $ from shell entries 2020-09-28 21:23:54 +03:00
Anton Latukha d8f38bcece
Merge request #721 m cleam-up
Nothing major.

Clean-up.
One functor fusion.
One replacement with Kleisli composition.
`return -> pure`
2020-09-26 19:20:15 +03:00
Anton-Latukha 003dcb660b
clean-up: m upd: minor tweaks, dropped functor 2020-09-21 01:58:00 +03:00
Anton-Latukha 6fa53d711b
clean-up: Utils.hs: m upd doc 2020-09-21 01:58:00 +03:00
Anton-Latukha 523edca13c
clean-up: {Pretty,Utils,Utils/Fix1}.hs: imports 2020-09-21 01:58:00 +03:00
Anton-Latukha cbeae8cfa1
clean-up: rm pragmas in {Reduce, Utils/Fix1}.hs 2020-09-21 01:58:00 +03:00
Anton-Latukha 84e1d7fc17
clean-up: m upd 2020-09-21 01:58:00 +03:00
Anton-Latukha 0f3eab3aef
clean-up: Pretty.hs: rm Nix.Util as not used 2020-09-21 01:58:00 +03:00
Anton-Latukha fde6764713
clean-up: Pretty.hs: <$>: .Comonad == .Prelude; no <$> in Nix.Utils 2020-09-21 01:57:59 +03:00
Anton-Latukha 64726d71e7
clean-up: Expr/Types.hs: NExprF: upd doc 2020-09-21 01:57:59 +03:00
Anton-Latukha 9fdf471f2b
clean-up: Value.hs: m upd doc 2020-09-21 01:57:59 +03:00
Anton-Latukha c01e156fef
clean-up: Builtins.hs: nixPath: simplify parens 2020-09-21 01:57:59 +03:00
Anton-Latukha 55b0040384
clean-up: Nix/Value.hs: NValueF: fx doc
Also what 's' is referenced here?
2020-09-21 01:57:59 +03:00
Anton-Latukha eb8c2252cb
clean-up: Nix.hs: evaluateExpression: use Kleisli composition 2020-09-21 01:57:59 +03:00
Anton-Latukha b035e373d6
clean-up: m
M  src/Nix/Effects.hs
2020-09-21 01:57:58 +03:00
Anton-Latukha 3774516033
clean-up: Main 2020-09-21 01:57:58 +03:00
Anton-Latukha 32cda24f58
clean-up: Repl: initState: reduce do block 2020-09-21 01:57:58 +03:00
Anton-Latukha 10051fbfc1
clean-up: rm commented-out imports
M  main/Main.hs
M  src/Nix/Reduce.hs
M  src/Nix/Type/Infer.hs
M  tests/EvalTests.hs
2020-09-21 01:57:58 +03:00
Anton-Latukha 0cb3946ee7
clean-up: (return -> pure)
M  main/Main.hs
M  main/Repl.hs
M  src/Nix/Builtins.hs
M  src/Nix/Convert.hs
M  src/Nix/Effects.hs
M  src/Nix/Effects/Basic.hs
M  src/Nix/Eval.hs
M  src/Nix/Exec.hs
M  src/Nix/Expr/Types.hs
M  src/Nix/Json.hs
M  src/Nix/Lint.hs
M  src/Nix/Normal.hs
M  src/Nix/Options/Parser.hs
M  src/Nix/Parser.hs
M  src/Nix/Scope.hs
M  src/Nix/String.hs
M  src/Nix/TH.hs
M  src/Nix/Thunk/Basic.hs
M  src/Nix/Utils.hs
M  src/Nix/Value.hs
M  src/Nix/Value/Equal.hs
M  src/Nix/XML.hs
M  tests/EvalTests.hs
M  tests/Main.hs
M  tests/NixLanguageTests.hs
M  tests/ParserTests.hs
M  tests/TestCommon.hs
2020-09-21 01:57:52 +03:00
Anton-Latukha dd6940fe7b
clean-up: Nix/Builtins.hs: case to maybe 2020-09-18 18:43:59 +03:00
Anton-Latukha 23b143478b
Nix/Convert.hs: fuse functors in one case of fromValueMay
fmap (fmap (, p)) $ fmap (sequence) $ traverse fromValueMay s
fmap (fmap (, p)) . fmap (sequence) $ traverse fromValueMay s
| (fmap f . fmap g) => fmap (f . g)
fmap (fmap (, p) . (sequence)) $ traverse fromValueMay s
| fmap => <$>
fmap (, p) . sequence <$> $ traverse fromValueMay s
2020-09-18 18:43:59 +03:00
Anton-Latukha 85a098bfd5
clean-up: Nix/Convert.hs 2020-09-18 18:43:59 +03:00
Anton-Latukha 4b44d97d9b
clean-up: Nix/Convert.hs: use tuple sectioning 2020-09-18 18:43:59 +03:00
Anton-Latukha c3f4d72dfd
clean-up: parens
M  main/Repl.hs
M  src/Nix/Builtins.hs
M  src/Nix/Cited.hs
M  src/Nix/Exec.hs
M  src/Nix/Expr/Types/Annotated.hs
M  src/Nix/Pretty.hs
2020-09-18 15:58:28 +03:00
Anton-Latukha ffc82fc97e
clean-up: LANGUAGE pragmas
M  Setup.hs
M  main/Repl.hs
M  src/Nix/Builtins.hs
M  src/Nix/Cache.hs
M  src/Nix/Cited.hs
M  src/Nix/Cited/Basic.hs
M  src/Nix/Convert.hs
M  src/Nix/Exec.hs
M  src/Nix/Expr/Types.hs
M  src/Nix/Expr/Types/Annotated.hs
M  src/Nix/Lint.hs
M  src/Nix/Normal.hs
M  src/Nix/Pretty.hs
M  src/Nix/Render/Frame.hs
M  src/Nix/Scope.hs
M  src/Nix/TH.hs
M  src/Nix/Thunk.hs
M  src/Nix/Thunk/Basic.hs
M  src/Nix/Utils.hs
M  src/Nix/Value.hs
M  src/Nix/Value/Equal.hs
2020-09-14 20:54:37 +03:00
Simon Jakobi dfa0435e9e Fix since annotation 2020-09-13 19:13:08 +03:00
Anton-Latukha 410c325b18 cabal, CHANGELOG: 0.10.1 release, unifying the changelog
* "Misc" use was disputed, moving back to use of the "Additional" category.

* Using a (link) pattern for URLs, reasons being:
  * Including the markup into the outlines or hyperlinks considered a
    bad practice and should be used carefully.
  * The human cause:
    The reason for the changelog is so people read through it and get the info.
    Hyperlinks make text colored. Studies of readability have shown that
    people perceive the information of a brightly colored text
   much more poorly than the text of regular coloring.
    And delivering the meaning is what changelog text is for, so the
    informative text should be regularly colored.
  * The technical cause -
    the Hackage does not parse the markup inside the hyperlinks:
    https://hackage.haskell.org/package/hnix-0.10.0/changelog
    Probably because of the reason *1, but Hackage reason alone is enough.
  * Since people perceive and think about the read information mostly linearly
    and in the FIFO manner, `(link)` is put before information text, so links
    are placed in the same space and look more uniform upon reading. And upon
    reading the "link" context gets pushed first from the FIFO mind buffer and
    the further understanding the text the person is not distracted by
    sudden reading (taking-in) of the colored word "link" in the end of the
    semantically challenging text that is required to be understood.

* Dependency requirements of last major versions made literal.

* Link to `(diff)` made more obvious. While professionals tend to look for the
link to the full diff, diff under version number is ambiguous to where the
version number link leads, it can be for example: a GitHub release (where
different forms of packages are provided), diff, commit listing (as it was before
the current change), official forum post, official news... etc.

* Made `(diff)` link to point directly towards the diff.
2020-09-13 17:57:47 +03:00
Anton Latukha 1beaf46cd3
Options/Parser: debugVersionOpt: comment: add nix-build note (#717)
[Remark](https://github.com/haskell-nix/hnix/pull/712#issuecomment-691654639) deserves a comment note in the source code.
2020-09-13 14:10:27 +03:00
Anton Latukha 83c5cea9a4
Options/Parser: add '--long-version' that adds debug information (#712)
Option for debugging and bugreporting purposes.

Current output:
```
Version: 0.9.1
Commit: 2dc211314e
  date: Sat Sep 12 13:31:59 2020 +0300
  branch: 2020-09-12-add-GitRev-to-version
```

Also date and branch is to direct contributors attention to updating (or having
in mind) that.

M  hnix.cabal
M  src/Nix/Options/Parser.hs
2020-09-13 13:51:14 +03:00
Simon Jakobi 775be0d234 Add Ord1 instances for Binding, NExprF, and NKeyName
With data-fix 0.3, these instances are required so an
Ord instance for NExpr can be inferred.
2020-09-13 12:47:24 +03:00
Anton Latukha 5227a2d27f
CHANGELOG: 0.10.0 (#713)
* Prepare release 0.9.2

* CHANGELOG: m upd to 0.9.{2,1}

* Update changelog and version

* CHANGELOG: m upd: unification of structure, forming 0.10.1

Breaking changes into "Breaking" section.

Miscellaneous changes into "Misc" section.

Co-authored-by: Simon Jakobi <simon.jakobi@gmail.com>
2020-09-12 19:56:56 +03:00
Anton-Latukha 2dc211314e src/Nix/Options/Parser.hs: m upd alignment 2020-09-12 13:31:59 +03:00
Anton-Latukha 38215317b9 src/Nix/Options/Parser.hs: add CLI option --version 2020-09-12 13:31:59 +03:00
Anton-Latukha 03545e5309 default.nix: upd rev 2020-09-12 12:20:03 +03:00
Anton-Latukha a613ceb6a5 CI: On-Release-Cabal-Linux: fx 'on/release/created' type
Only on merge to `master` CI checked that YAML does not typecheck for it, so
fixing it posteriorly.
2020-09-12 11:59:38 +03:00
Anton-Latukha e1998798fb default.nix: pin Nixpkgs to last known good revision
Due to number of frequently occuring issues, latest being
the #705, #706, #707, #708, #709,
and upstream Nixpkgs issues, pinning Nixpkgs for Nix Haskell dev env.
2020-09-12 11:59:38 +03:00
Anton-Latukha 3ab3fd0801 hnix.cabal: bump megaparsec bound to 9.1
Changelog: https://hackage.haskell.org/package/megaparsec/changelog
2020-09-11 21:01:30 +03:00
Anton-Latukha 4dbb757296 default.nix: upd neat-interpolation version 2020-09-11 21:01:30 +03:00
Anton Latukha 9d31c56cff
Merge pull request #709 Upd CI, manage Nix builds
* Remove all additional optional informative CI Nix builds, preferring following Hackage currently, and keep Nix dev narrow.

* Add Cabal Hackage builds for all GHCs HNix supports.

* Rename Nix workflows to direct literal meaning of what they are (`Nix-dev-env`).

* Created a release test for middle GHC versions. CI tests always the latest and the oldest version, that seems good enough to track the development process. The middle GHC versions get tested when someone creates a GitHub prerelease/release.
2020-09-10 18:53:41 +03:00
Anton-Latukha f2c5f07b15
CI: GitHub: mv (->Optional-)Nix-dev-env-macOS 2020-09-10 18:35:27 +03:00
Anton-Latukha b1fbc25963
CI: GitHub: mv (Nixpkgs-Linux-main -> Optional-Nix-dev-env-main)
Underlining that Nixpkgs are currently optional.
2020-09-10 18:35:23 +03:00
Anton-Latukha c2e696e86f
CI: GitHub: Cabal-Linux: rm middle GHCs tests in favour release test 2020-09-10 18:04:54 +03:00
Anton-Latukha 10ae6f031e
CI: GitHub: add On-Release-Cabal-Linux
CI build that is triggered on release creation.

A  .github/workflows/On-Release-Cabal-Linux.yml
2020-09-10 18:04:47 +03:00
Anton-Latukha 2d78d84630
CI: GitHub: rm Nixpkgs-Linux-additional
Removing optional informational sake tests.

GHC version Cabal Hackage tests were added
2020-09-10 17:49:49 +03:00
Anton-Latukha 12d108d394
CI: GitHub: Cabal-Linux: test all GHCs
M  .github/workflows/Cabal-Linux.yml
2020-09-10 17:49:49 +03:00
Simon Jakobi 4cd3aa0e17
Remove broken "NixOS 20.03 stable channel, default GHC (8.8)" CI job (#704)
Fixes #700.
2020-09-02 21:07:24 +02:00
Simon Jakobi 93ecf531c4 Remove overlapping [From,To]JSON instances for NExpr
…for compatibility with aeson-1.5.3.

Closes #690.
2020-08-19 15:22:33 -07:00
Anton-Latukha 0449dc4570 Merge update from haskell-with-nixpkgs
* "rev" "default" tracks local default Nixpkgs channel.

* "compiler" "default" tracks default Nixpkgs GHC compiler.

* Properly providing secret to the GitHub CI workflows.

* Clean-up.

* Project freed form reliance on Travis CI.

* Removing unmaintained GHCJS build, in favor for the further move to Haskell to WebAssembly compilation.

---

In terms of the fish shell the rebase merge is done in this way:

```fish
set -l tmpDir "$HOME/src/tmp"
set -l sourceDir 'haskell-with-nixpkgs'
set -l sourceUrl "git@github.com:haskell-nix/$sourceDir.git"
set -l masterDir 'hnix'
set -l masterUrl "git@github.com:haskell-nix/$masterDir.git"
set -l fileList \
default.nix \
build.sh \
ghcjs-build.sh \
Cabal-Linux.yml \
Nixpkgs-GHCJS.yml \
Nixpkgs-Linux-additional.yml \
Nixpkgs-Linux-maim.yml \
Nixpkgs-macOS.yml
mkdir -p "$tmpDir"
rm -rf "$tmpDir/$sourceDir"
rm -rf "$tmpDir/$masterDir"
cd "$tmpDir"
git clone "$sourceUrl" "$sourceDir"
cd "$sourceDir"
git-pass-filter $fileList
cd "$tmpDir"
git clone "$masterUrl" "$masterDir"
cd "$masterDir"
git checkout -b upd-from-"$sourceDir"
git remote add hn "$tmpDir/$sourceDir"
git fetch hn master
git merge -S --allow-unrelated-histories hn/master
```

---

```log
10 files changed, 42 insertions(+), 401 deletions(-)
.github/workflows/Cabal-Linux.yml              |   4 -
.github/workflows/Nixpkgs-Linux-main.yml       |  12 +-
.github/workflows/Nixpkgs-Linux-additional.yml |   4 +-
.github/workflows/Nixpkgs-macOS.yml            |   5 +-
default.nix                                    |  33 +++--
build.sh                                       |  97 ++-------------
.github/workflows/Nixpkgs-GHCJS-turned-off     |  45 -------
ghcjs/nix.conf                                 |   2 -
ghcjs/default.nix                              |  79 ------------
.travis.yml                                    | 162 -------------------------
```
2020-08-18 10:13:36 +03:00
Anton-Latukha c83bbbe587 CI: Cabal-Linux: add caching 2020-08-17 13:22:51 +03:00
Anton-Latukha 23e51ef4f4 CI: Cabal-Linux: group builds together 2020-08-17 13:22:51 +03:00