Commit graph

850 commits

Author SHA1 Message Date
John Wiegley 846b2d9b16
Merge pull request #176 from kaychaks/bench-patch
Fix errors while running benchmarks
2018-04-13 19:36:52 -07:00
John Wiegley 58b65d2ce1 Don't evaluate to normal form by default in the top level evaluators 2018-04-13 19:29:18 -07:00
John Wiegley c5f001a7d4 For now, allow pathExists to accept a string 2018-04-13 18:35:51 -07:00
John Wiegley e57470c645 Fix an evaluation scoping problem with 'with' statement and lambdas 2018-04-13 18:33:59 -07:00
John Wiegley 6c9cbf241a Rewrite ToNix/FromNix, although Builtins.hs is not using it yet 2018-04-13 18:09:12 -07:00
John Wiegley 7f6a64da04 More corrections to the search path logic
Fixes #112
2018-04-13 16:37:11 -07:00
John Wiegley fb0466769d Further minor simplification 2018-04-13 10:43:18 -07:00
John Wiegley caa897af4a Introduce new helper function Exec.foldNixPath 2018-04-13 10:38:57 -07:00
Kaushik Chakraborty b2e10a5a2f
updated as suggested by @vaibhavsagar 2018-04-13 13:54:18 +05:30
John Wiegley 78b185c5b5 Add a strange hack needed to get a test to run 2018-04-13 01:20:58 -07:00
John Wiegley 3edc7edbd3 Allow path == str and path != str 2018-04-13 01:20:40 -07:00
John Wiegley c9c2db5cb8 Correct the behavior of baseNameOf 2018-04-13 01:20:33 -07:00
John Wiegley b6b3c61176 Add the __nixPath builtin 2018-04-13 01:20:24 -07:00
John Wiegley ef489753e7 Fix to find env path 2018-04-13 00:52:09 -07:00
John Wiegley 14bc5360f4 More work on supporting -I and completing env paths 2018-04-13 00:34:49 -07:00
Kaushik Chakraborty f58da563bb
modifications in default.nix to take care of errors running benchmarks; update README with a separate section on benchmarks 2018-04-13 12:36:45 +05:30
John Wiegley 999e1c7ae1 Reformat some paragraphs in the README 2018-04-12 21:20:23 -07:00
John Wiegley 70cebb2aa4 Minor simplifications in the parser 2018-04-12 21:20:03 -07:00
John Wiegley 3788cb4e75
Merge pull request #175 from vaibhavsagar/patch-1
README.md: clone recursively
2018-04-12 21:17:46 -07:00
Vaibhav Sagar 2c03be1008 README.md: clone recursively 2018-04-13 12:16:54 +08:00
John Wiegley f48b41ad71
Merge pull request #174 from vaibhavsagar/patch-1
Replace `cabal` with `runhaskell Setup.hs`
2018-04-12 21:07:44 -07:00
Vaibhav Sagar 9f9c607b53
Replace cabal with runhaskell Setup.hs
This mimics what `nixpkgs` does and works even if the user doesn't have `cabal` installed globally.
2018-04-13 12:06:22 +08:00
John Wiegley 99189e9536 The basic REPL now works; doesn't allow establishing definitions yet 2018-04-12 16:46:34 -07:00
John Wiegley e6abbdc91e Add two more basic parsing tests 2018-04-12 14:22:55 -07:00
John Wiegley 709cc5247e Add code for doing Hindley-Milner type inference, and a repl
This code was written by Stephen Diehl and Kwang Yul Seo, which they released
under an MIT license as the project poly_constraints:

    https://github.com/kseo/poly_constraints

The code is added to hnix right now as mainly a placeholder, and will need to
be modified before it can be used.
2018-04-12 10:53:50 -07:00
John Wiegley 3c7bbdda36 Add a further note to the README 2018-04-12 10:28:16 -07:00
John Wiegley d3a01cc073 Resolve some warnings 2018-04-12 10:26:54 -07:00
John Wiegley 8176dad56a Some minor updates to the README; no longer mention cabal2nix 2018-04-12 10:26:30 -07:00
John Wiegley b0b372e151 Further work on env paths 2018-04-11 22:22:55 -07:00
John Wiegley 9a089712aa Create new __includes builtin, set by --include/-I 2018-04-11 22:02:31 -07:00
John Wiegley 371380c98f Add support for the --attr/-A option 2018-04-11 21:31:48 -07:00
John Wiegley 90e4a3ec37 Add preliminary parsing of .flags files, though more work is needed 2018-04-11 21:02:37 -07:00
John Wiegley 96df58fb29 Split off command-line options processing into a new Nix.Options module 2018-04-11 20:53:38 -07:00
John Wiegley f3ee76f4ae Support handling of --arg and --argstr, though with some changes
optparse-applicative can't really support "--arg name value", so instead we
require "--arg name=value", printing an error message if the user attempts the
former.
2018-04-11 20:46:52 -07:00
John Wiegley a1a4fac2e9 Change the way some error messages are displayed 2018-04-11 20:46:44 -07:00
John Wiegley 38b24f5fc1 Add new helper function isClosureNF 2018-04-11 20:22:06 -07:00
John Wiegley 036031ca3e Some whitespace formatting in default.nix 2018-04-11 20:21:52 -07:00
John Wiegley 39e175be85 Rename some helper functions 2018-04-11 20:21:34 -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 1604028f0f Update evalWith in Lint.hs 2018-04-11 17:41:57 -07:00
John Wiegley 1d637519fe Another minor simplification 2018-04-11 16:52:49 -07:00
John Wiegley 805ea3ecc5 Resolve a warning 2018-04-11 14:35:30 -07:00
John Wiegley 941d4f9fd3 Add testing code for writing out Nix parses as compact regions 2018-04-11 14:35:17 -07:00
John Wiegley 031826f01b Remove the Convertible type constraint synonym 2018-04-11 14:16:33 -07:00
John Wiegley 27c3875934 Use hnix to process nixpkgs in the tests 2018-04-11 13:56:31 -07:00
John Wiegley e9299dce7b Implement builtins.fetchTarball at the moment by calling nix-instantiate 2018-04-11 13:56:18 -07:00
John Wiegley 7b70e02218 Avoid an error when there are no stack frames to report 2018-04-11 13:56:03 -07:00
John Wiegley cd4aa33abd Run the tests with threading enabled, for parallel execution 2018-04-11 13:53:55 -07:00
John Wiegley 978710aa7d Remember how much indentation was stripped from multi-line strings 2018-04-11 12:06:14 -07:00