Commit Graph

52 Commits

Author SHA1 Message Date
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
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
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
Simon Jakobi b4e3b3b2f4
Improve the documentation in Nix.{Atoms,Expr.Types} (#662)
This also removes some commented out TH from the haddocks
2020-07-03 01:35:30 +02:00
Simon Jakobi 5c8c1cc16f We unconditionally depend on deepseq >= 1.4.3 now 2019-10-22 00:18:12 +02:00
Simon Jakobi ff39add9af Remove instance for old binary versions 2019-10-22 00:05:52 +02:00
Simon Jakobi 5f4cef9922 We unconditionally have hashable >= 1.2.5 now 2019-10-22 00:03:52 +02:00
Simon Jakobi 8ed7d765dd Require base >= 4.11
There were multiple build failures with GHC-8.2 due
to (<>) and Semigroup not being in scope.
2019-10-21 23:46:35 +02:00
Anton-Latukha c03a40acea upd texts of more messages
Heterogeneous: consisting of dissimilar elements.

Heterogenous:
  1. not originating within the body;
  (ex: "You are NOT of the body!" by Dr. Leonard "Bones" McCoy)
  2. of foreign origin;
  3. heterogeneous.
2019-08-04 15:00:57 -07:00
Silvan Mosberger 82b2d8af7f Use NSet for both recursive and non-recursive sets
Simplifies the AST
2019-07-25 14:10:44 -07:00
John Wiegley 9b046a80c7
Remove unnecessary trailing space 2019-03-18 21:41:27 -07:00
John Wiegley 94e0be3882
Reformat all sources with Brittany, to restore consistency 2019-03-17 14:47:38 -07:00
John Wiegley 28a1410013
Split off NCited into its own file 2019-03-12 07:21:24 -07:00
Madeline Haraj 28ab983408
Add syntactic holes 2019-03-10 10:23:28 -07:00
John Wiegley ba5b23a6e3
Bump minimum supported version to GHC 8.4.4 2018-11-19 09:46:02 -08:00
Patrick Hilhorst 2e330b4601
s/attribut /attribute / 2018-10-02 22:13:32 +02:00
John Wiegley e8a7368a92
Some whitespace changes 2018-08-05 15:48:44 -04:00
John Wiegley 738ef09bf9
Make NUnaryOp and NBinaryOp both Enum and Bounded 2018-05-14 21:22:04 -07:00
John Wiegley b60a15dc0d
Change the way that serialise is guarded from inclusion
Fixes #312
2018-05-11 12:15:18 -07:00
John Wiegley 35fb7dc974
Add instance Lift (Fix NExprF) for GHC 8.0 2018-05-10 15:35:53 -07:00
John Wiegley e06ab95236
Allow NFData instances for NExpr and NExprLoc on GHC 8.0 2018-05-10 15:26:37 -07:00
John Wiegley 15baa5c8b8
Track attribute source positions in the binding, not the key name 2018-05-09 01:25:01 -07:00
John Wiegley ba0dc19d2d
Work from mightybyte: Minimize deps required, for building with GHCJS 2018-05-08 16:41:15 -07:00
John Wiegley ce3b0d70e9
Move all of the parsing code into a single module, for optimization 2018-05-07 12:06:56 -07:00
John Wiegley e7a6456a35 Make use of lens-family to provide some utility lenses/traversals 2018-05-06 10:43:43 -07:00
John Wiegley 6c2149f767 Remove code TODOs, which have been changed into GitHub issues 2018-04-26 17:13:22 -07:00
John Wiegley 4163d35a09 nixpkgs allows let with no bindings in some places
At the beginning of arangodb/default.nix:

```
{ stdenv, fetchFromGitHub
, openssl, zlib, python2Packages, readline, cmake, python }:

let
in stdenv.mkDerivation rec {
  version = "3.3.4";
  name    = "arangodb-${version}";
```
2018-04-18 23:42:13 -07:00
John Wiegley a21d88657a Add several more JSON related instances 2018-04-17 14:06:59 -07:00
John Wiegley 146780c024 Add ToJSON/FromJSON for NExpr itself 2018-04-17 13:54:42 -07:00
John Wiegley 9d2834099e Expand the hashability of NExpr and related structures 2018-04-17 13:54:42 -07:00
John Wiegley 64a10669ac Provide ToJSON/FromJSON instances for NExpr
This is not the same as the JSON format used by Nix, but is intended for other
uses where one wishes to write analysis programs over expression trees, where
hnix is only being used to convert the source code to its JSON representation.
2018-04-17 12:58:56 -07:00
John Wiegley 8dad64c10d Add more instances to Atoms and Expr.Types 2018-04-17 12:53:41 -07:00
John Wiegley a3c4bbfb76 Use NonEmpty for let bindings and attribute selector paths
Note that Nix allows inherit; and inherit (foo);, so we cannot make the list
of inherited names non-empty, even though the former constructions have no
meaning.
2018-04-17 12:46:41 -07:00
John Wiegley 5bda1b48c3 Hashable r => NExprF r is now Hashable 2018-04-17 11:59:54 -07:00
John Wiegley f4fbbe7903 Make NKeyName and NString instances of Hashable 2018-04-17 11:33:20 -07:00
John Wiegley 5ce5ac8791 Get rid of ConvertValue in favor of Nix.Context
There remains some simplification work to be done, still, as there is much
duplication in Builtins.hs as things stand now. At least for now only one type
class-based, automatic conversion mechanism exists.
2018-04-15 01:43:01 -07:00
John Wiegley b621ffee0a Move the caching support code into its own Nix.Cache module 2018-04-11 20:21:02 -07:00
John Wiegley 22175aa927 Use the serialise library on non-Linux systems, compact on Linux 2018-04-11 17:59:42 -07:00
John Wiegley 031826f01b Remove the Convertible type constraint synonym 2018-04-11 14:16:33 -07:00
John Wiegley 978710aa7d Remember how much indentation was stripped from multi-line strings 2018-04-11 12:06:14 -07:00
John Wiegley 77bc4cb334 Restore strictness annotations
It doesn't help speed, but seems to reduce max resident.
2018-04-10 22:52:30 -07:00
John Wiegley 5efa46e516 Add Binary instances for NExpr 2018-04-10 18:57:17 -07:00
John Wiegley 01d1ae99a7 Fix ind-string-14 2018-04-10 18:45:57 -07:00
John Wiegley a7e7e84795 Drop dependency on insert-ordered-containers
Fixes #161
2018-04-10 11:58:08 -07:00
John Wiegley 9d7f25d368 All is building with Megaparsec now, but many parsing tests fail 2018-04-09 17:12:16 -07:00
John Wiegley 9beb9364e0 The Megaparsec version of Parser.hs is at least compiling 2018-04-09 16:11:31 -07:00
John Wiegley d964b7bb29 Allow expression trees to be deepseq'd 2018-04-09 02:07:40 -07:00
John Wiegley 8da8ea2b66 Remove unnecessary strictness annotations from types
This improves speed a bit on my system, parsing all the nixpkgs files.
2018-04-09 00:59:50 -07:00
John Wiegley 4c2eebbe40 Refactor evaluation using a type class 2018-04-09 00:52:10 -07:00