Commit graph

440 commits

Author SHA1 Message Date
John Wiegley 54492e3905
Merge branch 'master' into string_context_255 2018-10-15 12:45:05 -07:00
gb 411afaca51 remove deprecation warnings so travis will succeed 2018-10-06 18:35:56 -04:00
Patrick Hilhorst 2e330b4601
s/attribut /attribute / 2018-10-02 22:13:32 +02:00
gb 4baa4f7108 change Nix.NixString module to Nix.String 2018-09-23 16:03:44 -04:00
gb be056b3dd7 builds with -Werror -Wno-deprecations 2018-09-16 16:30:24 -04:00
gb 0a5e692b1c Merge branch 'string_context_255' of https://github.com/gbwey9/hnix into string_context_255 2018-09-16 15:22:53 -04:00
gb cfa4824fb3 remove semigroup monoid and replace with nixstring methods 2018-09-16 14:02:02 -04:00
John Wiegley dddf425a22
Merge branch 'master' into string_context_255 2018-09-15 22:35:13 -07:00
gb ae6725871b removed executable permissions 2018-09-15 20:32:38 -04:00
gb dc940b8d04 fix windows line endings on these files 2018-09-15 20:16:35 -04:00
gb 6f1ed3c2e9 documented methods;added more methods with deprecation 2018-09-15 20:04:54 -04:00
Silvan Mosberger f189b69f51
More precise freeVars 2018-09-11 05:23:58 +02:00
John Wiegley bb26529c73
Merge pull request #360 from Infinisil/parser-exports
Parser exports
2018-09-10 11:57:54 -07:00
Georges Dubus 0e3ecd5ac3 Avoid corrupting the value being printed in Pretty.dethunk 2018-09-10 17:18:34 +02:00
Silvan Mosberger 08326ce34a
Parser: export symbol and whiteSpace 2018-09-10 05:10:35 +02:00
Silvan Mosberger 9a74e0cd99
Parser: Export useful partial parsers 2018-09-10 04:28:33 +02:00
Silvan Mosberger c01fa83cb6
Parser: Unify parser names 2018-09-10 04:10:53 +02:00
Silvan Mosberger 67934d030a
Parser: Make Result Functior 2018-09-10 03:30:15 +02:00
gb a57aa711df tests run 2018-09-09 11:47:04 -04:00
gb 2fadbe3090 add new nixstring version with warnings 2018-09-09 11:01:09 -04:00
John Wiegley 833851392d
Merge remote-tracking branch 'origin/master' into pending 2018-09-07 13:16:28 -07:00
John Wiegley 99626e9ab9
The use of liftM2 (<|>) was executing too much of both arguments
This is demonstrated by the following example, courtesy of Ryan Trinkle:

    let x = with x; with { a = 5; }; a; in x

Although the dynamic scopes visible at 'a' happen to be [<thunk: { a = 5; }>,
<thunk: x>], we were forcing each thunk before doing the M.lookup, and then
performing (<|>) on the M.lookup.

Fixes #347
2018-09-07 13:08:30 -07:00
Jude Taylor a604a74af9 make mapAttrs take both arguments 2018-09-04 14:17:14 -07:00
Domen Kožar 4501319e81
<<loop>> is already GHC RTS error, tweak a bit 2018-09-03 21:17:50 +01:00
John Wiegley 7c9211d6e0
Merge pull request #352 from pikajude/path-tarball
Support tarballs in NIX_PATH and -I
2018-09-03 10:04:19 -07:00
John Wiegley 34054285e3
Merge pull request #332 from obsidiansystems/issue-327-fix
Fix missing parenthesis in pretty printing selector
2018-09-03 10:04:07 -07:00
John Wiegley ed99b7ad18
Merge branch 'master' into mapattrs 2018-09-02 19:15:04 -07:00
John Wiegley e31ad9cb30
Merge branch 'master' into issue-327-fix 2018-09-02 19:12:08 -07:00
Jude Taylor 84e0594139 fix ghc 8.2 build 2018-09-02 15:20:17 -07:00
Jude Taylor 368f7e038c support tarballs in NIX_PATH and -I 2018-09-02 11:25:24 -07:00
John Wiegley 7d549d67c6
Merge remote-tracking branch 'origin/master' into pending 2018-08-23 21:08:12 -07:00
Jörg Thalheim c890965bb4 add builtins.{bitAnd,bitOr,bitXor) 2018-08-20 17:04:55 -05:00
John Wiegley 0613d1d604
Finish implementation of cycle detection during normalization 2018-08-10 17:50:07 -04:00
John Wiegley f0b6b6b223
Change NValueNF to use Free instead of Fix
This allows us to detect and report cycles during normalization.

See #348
2018-08-09 22:09:00 -04:00
Matthew Bauer 10fe907c50 Add builtins.mapAttrs
Fixes #341
2018-08-09 18:23:13 -04:00
Matthew Bauer d538a96723 Fix missing parenthesis in pretty printing selector
Fixes #327

Another case of missing parenthesis. From the issue:

> prettyNix $ ("x" @@ "y") @. "z"
  x y.z

When it should be:
  (x y).z

Adding non-associative wrapParens seems to fix it. Not sure if this is
the best way but trying a few things & running the test suite still
seem to work.
2018-08-08 17:17:19 -04:00
John Wiegley 266793a287
Improve an error message 2018-08-07 14:06:50 -04:00
John Wiegley 456e0811bc
Merge remote-tracking branch 'origin/master' into pending 2018-08-06 16:15:14 -04:00
Domen Kožar 6033a49e6d
Implement addErrorContext as id 2018-08-06 21:09:30 +01:00
John Wiegley b0541ebd24
Some minor refactoring 2018-08-05 16:12:04 -04:00
John Wiegley 023dbe55ea
Change tracing output from normalFormBy 2018-08-05 15:51:59 -04:00
John Wiegley f262046f34
Change coerceToString to also take a coerceMore argument 2018-08-05 15:51:42 -04:00
John Wiegley 49584cbae5
Reformat a function body 2018-08-05 15:49:16 -04:00
John Wiegley 2e04e5a7b2
Change rendering of NormalLoop errors 2018-08-05 15:48:52 -04:00
John Wiegley e8a7368a92
Some whitespace changes 2018-08-05 15:48:44 -04:00
John Wiegley 1af979e836
true and false shouldn't be in the reservedNames list
Fixes #343
2018-08-05 12:20:00 -04:00
John Wiegley 8e664631e2
If an exception occurs when forcing a thunk, cleanup the "active" bit 2018-08-05 12:00:43 -04:00
John Wiegley edaf59b56a
Add a bogus MonadCatch instance for (Lint s) 2018-08-05 12:00:33 -04:00
John Wiegley bef6db5beb
Minor reformatting 2018-08-05 10:40:28 -04:00
Daniel Krol 13f548c7af Fix previous attempted cosmetic refactor which broke eval-okay-overrides test 2018-08-05 10:25:22 -04:00