Commit graph

118 commits

Author SHA1 Message Date
John Wiegley b24598b3a3 Add top-level __valueSize
Fixes #253
2018-04-28 17:12:32 -07:00
John Wiegley ad18b950ac Turn warnings into errors 2018-04-28 16:26:32 -07:00
John Wiegley 100c41db6d Run the repl in the same MonadNix environment as Main.hs
Fixes #204
2018-04-28 16:26:32 -07:00
John Wiegley 05ca87a732 Several improvements to error reporting; add new --thunks option 2018-04-25 13:00:41 -07:00
John Wiegley 2de8c7cf84 More fixes to error reporting 2018-04-24 12:25:40 -07:00
John Wiegley 01bcb86d3f Further improvements to error rendering, but not all done yet 2018-04-24 11:12:20 -07:00
John Wiegley 9864a8c7a5 Rework the way that info frames and error are handled
There is still work to be done to render the new "typed frames", and to
convert all the current string based frame into typed frames. This will pave
the way forward to smarter error messages that can be browsed in intelligent
environments like Emacs and the browser.
2018-04-24 02:15:28 -07:00
John Wiegley a60181df3a Add --flags=optimize for cabal configure 2018-04-22 14:33:38 -07:00
John Wiegley 96a0c387dd Merge Nix.Trace and Nix.Reduce into Nix.Reduce
Since almost all of that code had to do with program reduction. addTracing and
tracingEvalExpr have moved into Exec.hs, since they depend on MonadNix.
2018-04-21 10:28:09 -07:00
John Wiegley 8a93068102 Rename Nix.Core back to Nix.Eval, since Nix.Eval was now almost empty 2018-04-21 10:11:34 -07:00
John Wiegley 86b09103d6 Move production of a reduced test case to --reduce, improve --trace 2018-04-20 22:36:40 -07:00
John Wiegley 47e8829a28 Rename Nix.StringOperations to Nix.Strings 2018-04-20 17:05:21 -07:00
John Wiegley 986a3043da Add a constant-folding tree transformer: Reduce.reduceExpr 2018-04-20 02:57:23 -07:00
John Wiegley 0ff6c7a1e4 Move tracing code into its own file 2018-04-18 21:43:18 -07:00
John Wiegley 92217059b5 Add --flags=tracing, and document it in README.md 2018-04-18 16:28:21 -07:00
John Wiegley 8d25aa461d Add --json option to hnix, which can render both expressions and values 2018-04-17 14:24:52 -07:00
John Wiegley f4fbbe7903 Make NKeyName and NString instances of Hashable 2018-04-17 11:33:20 -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 99189e9536 The basic REPL now works; doesn't allow establishing definitions yet 2018-04-12 16:46:34 -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 96df58fb29 Split off command-line options processing into a new Nix.Options module 2018-04-11 20:53:38 -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 941d4f9fd3 Add testing code for writing out Nix parses as compact regions 2018-04-11 14:35:17 -07:00
John Wiegley cd4aa33abd Run the tests with threading enabled, for parallel execution 2018-04-11 13:53:55 -07:00
John Wiegley 74de14dc7d Restore the linter, to some degree, at least for the language tests 2018-04-10 21:02:01 -07:00
John Wiegley 5efa46e516 Add Binary instances for NExpr 2018-04-10 18:57:17 -07:00
John Wiegley dcd081d899 Add directory dependency for the tests 2018-04-10 12:38:14 -07:00
John Wiegley a7e7e84795 Drop dependency on insert-ordered-containers
Fixes #161
2018-04-10 11:58:08 -07:00
John Wiegley 81c63a98d5 Comment out -fexpose-all-unfoldings while profiling 2018-04-10 09:02:59 -07:00
John Wiegley 8f37f37986 Down to 16 basic test failures with megaparsec 2018-04-09 21:35:46 -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 b1fb73d363 Remove Trifecta and parsec, begin switch to megaparsec 2018-04-09 10:16:25 -07:00
John Wiegley 4c2eebbe40 Refactor evaluation using a type class 2018-04-09 00:52:10 -07:00
John Wiegley 3681d51dd6 Create modules Nix.Monad.Lazy, Nix.Monad.Lint, Nix.Monad.Context 2018-04-07 23:14:08 -07:00
John Wiegley 9dcd7b37b6 Factor some code into new module Nix.Normal 2018-04-07 15:25:39 -07:00
John Wiegley c8e9012778 Some minor fixups for compilation 2018-04-07 15:13:58 -07:00
John Wiegley deb592b11d Undo changes to hnix.cabal 2018-04-07 15:08:48 -07:00
Doug Beardsley 1b7dac071d Test to catch a bug in builtins.match
Also added infrastructure for comparing against current nix behavior,
not just current nix tests.
2018-04-07 15:07:09 -07:00
John Wiegley ea6a98f602 Implement builtins.tryEval 2018-04-07 14:33:15 -07:00
John Wiegley 935c7c5ee1 Remove some unnecessary code from package.yaml 2018-04-07 14:17:17 -07:00
John Wiegley 954ffccebb Ensure in the tests that hnix.cabal is not edited directly 2018-04-07 12:09:49 -07:00
John Wiegley 443129315d Use hpack and move all the Nix sources into a src/ directory 2018-04-07 12:02:33 -07:00
John Wiegley d9047cc216 Factor out some code into new module Nix.Value 2018-04-07 11:38:12 -07:00
Doug Beardsley 002a7ad1b9 Replace pcre-light with regex-tdfa
The regex-tdfa package implements POSIX extended regular expressions,
which are what Nix uses.
2018-04-06 11:46:56 -06:00
John Wiegley 1a01f85de9 Implement builtins.match, and add a dependency on pcre-light 2018-04-05 23:50:32 -07:00
John Wiegley 9d5a7f8a27 Remove some settings from hnix.cabal 2018-04-05 21:10:06 -07:00
Doug Beardsley 42fbb1faa9 The eval-okay-xml test case passes
Still need to decide what to do with commented out instances
2018-04-05 17:06:00 -06:00
John Wiegley 51b55f3e2d Pin insert-ordered-containers to a custom version 2018-04-05 13:23:22 -07:00
John Wiegley 1363d20f18 Bump working version to 0.5.0 2018-04-05 13:23:14 -07:00