Ken Micklas
37152002b0
Implement appendContext
2019-03-10 15:45:53 -04:00
Emmanuel Denloye-Ito
c51d966d44
Add tests for mapAttrs and changed hackyMakeNixStringWithoutContext to principledMakeNixStringWithoutContext in Builtins.hs
2019-03-10 11:17:36 -07:00
Emmanuel Denloye-Ito
586f1de62d
Less than test ( #461 )
...
References issue #438
Co-authored-by: John Wiegley <johnw@newartisans.com>
2019-03-10 11:16:36 -07:00
Ken Micklas
22048ccc89
Clean up syntax in getContext
2019-03-10 14:09:29 -04:00
Ken Micklas
718c94e0bb
Merge branch 'master' into vs-context-primops
2019-03-10 13:48:58 -04:00
Emily Pillmore
f3970d49b9
Add principled 'fetchurl' + tests
...
Tests are masked until store work is done
2019-03-10 10:07:03 -07:00
John Ericson
5ddb79009d
Depend on hnix-store-core and use it for printHash32
2019-03-10 08:59:05 -07:00
Vaibhav Sagar
4b8dff9aa8
Nix.Builtins: add getContext and appendContext primops
2019-03-09 19:30:56 -05:00
Ryan Trinkle
4e9ec1a964
Improve error message in case read
fails in splitVersion
2019-03-09 15:55:31 -05:00
Doug Beardsley
aa4156c5f6
Add test for currentSystem and remove hacky call
2019-03-08 23:22:43 -05:00
Ken Micklas
ad0d2d2bf8
Use WithStringContext(T) for nvalueToJSON
2018-12-13 16:59:51 -05:00
Ken Micklas
824615aabe
Merge branch 'master' into xml-string-context
2018-12-10 15:48:29 -05:00
Doug Beardsley
7d2f9d874a
Move json code into separate module
2018-12-09 13:57:58 -05:00
Ken Micklas
b1d48c5364
Accumulate string context in builtins.toXML
2018-12-06 18:11:06 -05:00
Doug Beardsley
38147f81a9
Fix toJSON context handling and add test case
2018-12-05 14:59:42 -05:00
Doug Beardsley
5c6b1ff285
Fix replaceStrings and add test case to catch mistake
2018-12-05 11:53:59 -05:00
Doug Beardsley
5b1117f6b9
Add test case for placeholder and get it passing
2018-12-05 08:43:31 -05:00
Doug Beardsley
23250a3433
Misc cleanup
2018-12-05 06:26:59 -05:00
Doug Beardsley
1748e7ce7a
Fix behavior of baseNameOf
2018-12-03 05:00:50 -05:00
Félix Baylac
512a8e0f10
Change builtins.storeDir type to String
...
Co-authored-by: Basile Henry <bjm.henry@gmail.com>
2018-12-02 20:59:50 +00:00
Shea Levy
952e2603ea
Revert "Merge pull request #413 from haskell-nix/xml-string-context"
...
Let's try to find a way to avoid exporting the NixString constructors
first.
This reverts commit ed07384563
, reversing
changes made to 4bfe2cc60c
.
2018-11-25 08:03:30 -05:00
Doug Beardsley
a39a5518ea
Merge remote-tracking branch 'origin/pending' into remove-fromnix-text-instances
2018-11-24 15:22:54 -05:00
Ken Micklas
1457362184
Accumulate string context in builtins.toXML
2018-11-23 12:48:44 -05:00
Doug Beardsley
31c327c406
Rename back to hacky
2018-11-21 01:55:56 -05:00
Doug Beardsley
09d9919367
Fix misleading name
2018-11-21 01:54:15 -05:00
Doug Beardsley
9e11410f6e
Make note to fix toFile
2018-11-21 01:50:24 -05:00
Doug Beardsley
d87122a0f2
Fix context handling in replaceStrings
2018-11-21 01:21:53 -05:00
John Wiegley
ba5b23a6e3
Bump minimum supported version to GHC 8.4.4
2018-11-19 09:46:02 -08:00
Doug Beardsley
8a97be7250
Fix behavior of match to properly return nulls
2018-11-19 09:01:34 -05:00
Doug Beardsley
a29a54b4f9
Merge remote-tracking branch 'origin/pending' into remove-fromnix-text-instances
2018-11-19 07:10:02 -05:00
Doug Beardsley
5dd3e2d7ce
Remove Text FromValue, ToValue, FromNix, and ToNix
...
This commit makes the handling of string context much more explicit and correct
throughout entire codebase.
2018-11-19 07:04:08 -05:00
Ryan Trinkle
0a82ab26ce
Merge remote-tracking branch 'origin/pending' into abstract-scopes
2018-11-18 15:04:30 -05:00
Doug Beardsley
602c673cba
Merge pull request #397 from haskell-nix/coerceToString-boolean-blindness
...
Create data types to avoid coerceToString boolean blindness
2018-11-17 19:00:29 -05:00
Ken Micklas
3beeaa6a79
Add and use fromStringNoContext
2018-11-17 18:40:22 -05:00
Ken Micklas
ff1166aba6
replace *StringIgnoreContextMaybe with more accurate *GetStringNoContext
2018-11-17 18:40:22 -05:00
Ken Micklas
340e97e8d3
Use principledStringIngoreContextMaybe for builtins.compareVersions
2018-11-17 18:40:22 -05:00
Ken Micklas
306d710527
Use principled* functions for builtins.splitVersion
2018-11-17 18:40:22 -05:00
Doug Beardsley
4edcda00e4
Create data types to avoid coerceToString boolean blindness
2018-11-17 18:26:10 -05:00
Doug Beardsley
ba7fc3446d
Remove hackyModifyNixContents
2018-11-17 16:23:41 -05:00
Ryan Trinkle
d60130c566
Abstract Scopes
2018-11-17 16:21:03 -05:00
Doug Beardsley
d949b9c1e1
Make coerceToString return NixString
2018-11-17 16:08:02 -05:00
Ryan Trinkle
c2be721454
Factor out HTTP requests
2018-11-16 17:17:38 -05:00
Ryan Trinkle
2884c4f918
Factor out filesystem functionality into MonadFile
2018-11-16 15:16:17 -05:00
gb
4baa4f7108
change Nix.NixString module to Nix.String
2018-09-23 16:03:44 -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
6f1ed3c2e9
documented methods;added more methods with deprecation
2018-09-15 20:04:54 -04:00
Silvan Mosberger
9a74e0cd99
Parser: Export useful partial parsers
2018-09-10 04:28:33 +02:00
gb
2fadbe3090
add new nixstring version with warnings
2018-09-09 11:01:09 -04:00
Jude Taylor
a604a74af9
make mapAttrs take both arguments
2018-09-04 14:17:14 -07: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
ed99b7ad18
Merge branch 'master' into mapattrs
2018-09-02 19:15:04 -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
Matthew Bauer
10fe907c50
Add builtins.mapAttrs
...
Fixes #341
2018-08-09 18:23:13 -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
f262046f34
Change coerceToString to also take a coerceMore argument
2018-08-05 15:51:42 -04:00
John Wiegley
50740972de
'import' should never carry over the lexical scope of its parent file
...
Fixes #334
2018-08-04 15:08:36 -04:00
gb
fd2bbb66e9
fixes to match latest master: tests ran
2018-07-28 15:32:15 -04:00
gb
9c3e5e995c
update fork from master contd
2018-07-28 14:17:37 -04:00
gb
ea3b675f28
update fork from master
2018-07-28 13:23:23 -04:00
Félix Baylac-Jacqué
d3cbcf791c
Builtins.div cannot divide by 0
...
Fixes #277 .
2018-06-12 21:54:28 +02:00
Dmitry Rets
3a096cc93b
Implement top-level __findFile.
...
Fixes https://github.com/haskell-nix/hnix/issues/248 .
2018-05-20 23:39:24 +02:00
John Wiegley
60231bd38a
Merge branch 'master' into master
2018-05-14 21:15:07 -07:00
hsloan
f7ff858ef9
add builtins.toFile
2018-05-14 22:54:34 -04:00
John Wiegley
6aa64760d1
Make use of lens-family to provide some utility lenses/traversals
2018-05-14 22:45:43 -04:00
Blair Archibald
b89cba0525
Fix #280 . unsafeGetAttrPos should return null.
...
According to the expected test output, unsafeGetAttrPos should fail silently and
return null if it can't find a position for the field (e.g when looking up
builtins).
2018-05-14 22:45:43 -04:00
John Wiegley
45da41666b
Make use of attrsetGet in another place
2018-05-14 22:45:43 -04:00
John Wiegley
35fb7dc974
Add instance Lift (Fix NExprF) for GHC 8.0
2018-05-10 15:35:53 -07:00
John Wiegley
dbd8468862
In Builtins.hs, just include derivation.nix directly
2018-05-10 13:51:14 -07:00
John Wiegley
1d5c0370ae
Simplify definition of getAttr
2018-05-10 00:09:42 -07:00
John Wiegley
8ebac49b95
Make builtins.toString much better behaved
2018-05-09 22:17:32 -07:00
John Wiegley
ba0dc19d2d
Work from mightybyte: Minimize deps required, for building with GHCJS
2018-05-08 16:41:15 -07:00
gb
43c145252d
NixString is in its own module hiding the constructors
2018-05-08 16:47:50 -04:00
John Wiegley
449d6611df
Remove the Uri type, it's just sugar
...
Fixes #308
2018-05-08 12:15:50 -07:00
John Wiegley
f1faf50bcb
Merge branch 'master' into string_context_255
2018-05-06 10:47:23 -07:00
John Wiegley
e7a6456a35
Make use of lens-family to provide some utility lenses/traversals
2018-05-06 10:43:43 -07:00
Blair Archibald
aae7f13ab1
Fix #280 . unsafeGetAttrPos should return null.
...
According to the expected test output, unsafeGetAttrPos should fail silently and
return null if it can't find a position for the field (e.g when looking up
builtins).
2018-05-06 13:17:43 +01:00
John Wiegley
9e50e9e069
Make use of attrsetGet in another place
2018-05-06 00:35:29 -07:00
gb
8e7d9d32fa
add string context
2018-05-03 08:07:54 -04:00
John Wiegley
b1b027286b
Fix a warning in Builtins.hs
2018-05-02 21:39:23 -07:00
John Wiegley
a627d885e8
Implement builtins.fetchurl
...
Squashed commit of the following:
commit 15b10d898e0457237f07cda9e5e9525bac0e95f6
Author: John Wiegley <johnw@newartisans.com>
Date: Wed May 2 16:33:30 2018 -0700
Update Exec.hs
commit d4a886dccf2715f1c1790e01adc242c352e7f427
Merge: 02afb27 4caacc1
Author: John Wiegley <johnw@newartisans.com>
Date: Wed May 2 16:08:55 2018 -0700
Merge branch 'master' into http
commit 02afb275f2078c1184a901da3ea0262630fefeea
Author: John Wiegley <johnw@newartisans.com>
Date: Wed May 2 16:08:42 2018 -0700
Update Exec.hs
commit 3733ce5888adb7161d2f57a16204ab953e9c4d7d
Author: John Wiegley <johnw@newartisans.com>
Date: Wed May 2 16:07:08 2018 -0700
Update Builtins.hs
commit 4402be6d04ac34156d50f8ee29f9af300de75ce5
Merge: 2c60097 13f3ebd
Author: John Wiegley <johnw@newartisans.com>
Date: Wed May 2 15:06:28 2018 -0700
Merge branch 'master' into http
commit 2c600976bb3a5d9267a0f313487dd0ab1a6ce1f7
Merge: 4a9d1a5 555ce95
Author: John Wiegley <johnw@newartisans.com>
Date: Wed May 2 14:25:59 2018 -0700
Merge branch 'master' into http
commit 4a9d1a56d463567ad155a58fc39f5b24e2636120
Merge: 4dd46f2 431006f
Author: John Wiegley <johnw@newartisans.com>
Date: Wed May 2 14:20:57 2018 -0700
Merge branch 'master' into http
commit 4dd46f21e3f594c4f7ae5bee8412a7841e566d4c
Author: Ian-Woo Kim <ianwookim@gmail.com>
Date: Sun Apr 29 12:51:11 2018 -0700
generated hnix.cabal
commit c87ae993fb7dbb1117f03133862799e1549c4259
Author: Ian-Woo Kim <ianwookim@gmail.com>
Date: Sat Apr 28 16:55:11 2018 -0700
remove dep from hnix.cabal
commit 0bb8856c8759ad3c67a0b4eb1d26b6195da82667
Author: Ian-Woo Kim <ianwookim@gmail.com>
Date: Sat Apr 28 16:53:54 2018 -0700
remove http-client stuff from default.nix
commit d298756a2ba4376f8cb3c54fb723a00697e0821d
Author: Ian-Woo Kim <ianwookim@gmail.com>
Date: Sat Apr 28 15:49:59 2018 -0700
getURL is implemented for both http and https
commit a3d66c07a097aedb03f30bcc636fcb3d5717e1fe
Merge: c4cb48a a73eae5
Author: Ian-Woo Kim <ianwookim@gmail.com>
Date: Sat Apr 28 15:14:32 2018 -0700
Merge branch 'builtin2' into http
commit c4cb48a8a756e82fb7d389ff501b2a85001dba38
Author: Ian-Woo Kim <ianwookim@gmail.com>
Date: Sat Apr 28 15:13:25 2018 -0700
add getURL function
commit ff23fc18ed16075353a58725d7d08f41605a6070
Author: Ian-Woo Kim <ianwookim@gmail.com>
Date: Sat Apr 28 15:06:40 2018 -0700
use http-client-* instead of HTTP
commit fcbe40f3bea84607a9d7849a9f3d2fc3a6cb9bef
Author: Ian-Woo Kim <ianwookim@gmail.com>
Date: Sat Apr 28 14:58:07 2018 -0700
add HTTP
commit a73eae573a193dbb8361e03b584a6cd55e7c427a
Author: Ian-Woo Kim <ianwookim@gmail.com>
Date: Sat Apr 28 14:36:24 2018 -0700
implement fetchurl (as a copy of fetchTarball)
2018-05-02 21:38:39 -07:00
hsloan
c1561ea711
Implement builtins.currentTime
2018-05-02 21:32:00 -07:00
Alex Rozenshteyn
a355366f32
Add builtins.hasContext
2018-05-02 20:54:51 -07:00
John Wiegley
fe0357c572
Merge branch 'master' into merge257
2018-05-02 14:22:47 -07:00
John Wiegley
431006f524
Merge pull request #263 from gdevanla/master
...
add TopLevel placeHolder to builtins module
2018-05-02 14:19:10 -07:00
John Wiegley
0b74225bcb
Update Builtins.hs
2018-05-02 14:18:45 -07:00
gb
b07927a136
cleanup exec'
2018-05-02 14:10:49 -07:00
gb
d07888ed35
implemented builtins.trace
2018-05-02 13:58:30 -07:00
John Wiegley
acda2b3337
Use Exception rather than Frame, reduce constraints imposed by forceThunk
2018-05-01 20:34:41 -04:00
John Wiegley
c934c690e3
Add attrsetGet helper function to Builtins.hs
2018-04-30 21:48:45 -04:00
John Wiegley
bdce698e36
Merge remote-tracking branch 'origin/pr/272'
2018-04-30 19:48:14 -04:00
John Wiegley
70acb77826
Merge branch 'master' into master
2018-04-29 18:02:46 -07:00
Guru Devanla
0268b5cf2b
remove extra spaces
2018-04-29 15:15:38 -07:00
Guru Devanla
eefc698bde
fix type of builtin.placeholder, add tests
2018-04-29 15:10:52 -07:00
Tim Sears
a49a424813
add builtins.mul, issue #250
2018-04-29 11:43:06 -07:00
Guru Devanla
2819ccbc8f
merged from origin
2018-04-29 10:37:16 -07:00