Commit Graph

175 Commits

Author SHA1 Message Date
Guillaume Maudoux b6b06224c5 Remove very verbose debug statements 2020-11-18 09:42:06 +01:00
Guillaume Maudoux 19790fd1fc Show faulty string in fromStringNoContext error 2020-11-18 09:42:06 +01:00
Anton-Latukha 0cb3946ee7
clean-up: (return -> pure)
M  main/Main.hs
M  main/Repl.hs
M  src/Nix/Builtins.hs
M  src/Nix/Convert.hs
M  src/Nix/Effects.hs
M  src/Nix/Effects/Basic.hs
M  src/Nix/Eval.hs
M  src/Nix/Exec.hs
M  src/Nix/Expr/Types.hs
M  src/Nix/Json.hs
M  src/Nix/Lint.hs
M  src/Nix/Normal.hs
M  src/Nix/Options/Parser.hs
M  src/Nix/Parser.hs
M  src/Nix/Scope.hs
M  src/Nix/String.hs
M  src/Nix/TH.hs
M  src/Nix/Thunk/Basic.hs
M  src/Nix/Utils.hs
M  src/Nix/Value.hs
M  src/Nix/Value/Equal.hs
M  src/Nix/XML.hs
M  tests/EvalTests.hs
M  tests/Main.hs
M  tests/NixLanguageTests.hs
M  tests/ParserTests.hs
M  tests/TestCommon.hs
2020-09-21 01:57:52 +03:00
Anton-Latukha c3f4d72dfd
clean-up: parens
M  main/Repl.hs
M  src/Nix/Builtins.hs
M  src/Nix/Cited.hs
M  src/Nix/Exec.hs
M  src/Nix/Expr/Types/Annotated.hs
M  src/Nix/Pretty.hs
2020-09-18 15:58:28 +03:00
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 1a2d627a58 Use prettyprinter-1.7.0
Changelog:
http://hackage.haskell.org/package/prettyprinter-1.7.0/changelog

hnix is likely to be affected by this change:

> Use floor instead of round to compute ribbon width.

…due to its use of custom `LayoutOptions`.
2020-08-07 12:21:12 +03:00
Anton-Latukha 48f1dbb13a
clean-up Monad.Trans imports
M  src/Nix/Exec.hs
M  src/Nix/Reduce.hs
2020-06-03 02:37:39 +03:00
John Wiegley 9d63f952e9
Merge remote-tracking branch 'sjakobi/ghc-gte-8.4' 2020-01-13 18:13:37 -08:00
Guillaume Maudoux 975d6dea93 Refactor execBinaryOp to demand values where needed.
This spliste execBinaryOp in two parts where the second conatains all
the logic that relies on the assumption that values are already in
"demanded".
2019-11-27 17:16:43 -08:00
Simon Jakobi 4cd94bf687 Remove some redundant GHC version checks 2019-10-21 23:52:22 +02:00
Anton-Latukha f258d00796 Exec: LANGUAGE: rm {DeriveFunctor,GeneralizedNewtypeDeriving,ViewPatterns} 2019-08-04 09:14:41 -07:00
Linus Heckemann a57fc62d84 exec: fix some list and null behaviour
null is not equal to the empty list, and cannot be concatenated to
either end of a list.
2019-06-25 20:23:50 +02:00
John Wiegley 4607639774 Remove the NValueNF type, as it provides little utility 2019-03-27 21:16:01 -07:00
John Wiegley 77c52fd43c Revise Nix.Standard 2019-03-23 00:49:03 -07:00
John Wiegley d1ada44817
Run brittany 2019-03-18 21:47:43 -07:00
John Wiegley 77d67b106c
8 test failures remaining 2019-03-18 18:20:07 -07:00
John Wiegley df3e79d945
Port over most of Builtins.hs 2019-03-18 15:27:12 -07:00
John Wiegley 439ae6ce0d
More work toward harmonization; now down to porting Builtins 2019-03-18 14:01:48 -07:00
John Wiegley 522585a7f1
Begin work on harmonizing the two different value representations 2019-03-18 11:41:46 -07:00
John Wiegley 29c48fa8e3
Run Brittany again 2019-03-17 22:46:15 -07:00
John Wiegley 18c49f6a0d
Reorganize code in Nix.Value, creating new Nix.Value.Equal 2019-03-17 22:44:22 -07:00
John Wiegley 015ced236e
Simplify Standard by splitting off Cited.Basic 2019-03-17 18:43:23 -07:00
John Wiegley aa66560bf7
Get rid of implicit conversions to and from thunks 2019-03-17 15:30:20 -07:00
John Wiegley 94e0be3882
Reformat all sources with Brittany, to restore consistency 2019-03-17 14:47:38 -07:00
John Wiegley 5c10be3e3b
More cleanup, get rid of the Eq and Ord instances for NValue'
They had dubious semantics anyway; there is now only valueEqM and valueNFEq.
2019-03-16 23:35:16 -07:00
John Wiegley 1a6978fe6b
Change NValueNF so that the Pure case preserves the looped thunk 2019-03-16 23:13:13 -07:00
John Wiegley 492a3ae0bc
Factor out thunk id representation into its own class, MonadThunkId 2019-03-16 16:23:40 -07:00
John Wiegley 3c2801cbc7
More minor cleanup, add a new README-design.md 2019-03-16 11:41:48 -07:00
John Wiegley 6ae5764221
All type checks, but many instance definitions are still missing 2019-03-16 01:10:47 -07:00
John Wiegley 145e69c9a4
Further work on Standard.hs 2019-03-15 22:54:29 -07:00
John Wiegley 209a9ae9a5
Create Nix/Thunk/Standard.hs 2019-03-15 17:59:38 -07:00
John Wiegley 14b2b9a66d
Exec.hs now type checks, but we haven't restored thunking 2019-03-15 12:38:59 -07:00
John Wiegley 5d9c858f5d
More work toward getting Exec.hs to compile 2019-03-14 23:18:16 -07:00
John Wiegley 996266bbdc
More work in Exec.hs 2019-03-14 22:00:23 -07:00
John Wiegley ace0fc10d5
Further progress 2019-03-14 15:10:41 -07:00
John Wiegley 39fd51c1a8 Split Nix.Thunk into Nix.Var, Nix.Thunk and Nix.Thunk.Basic
This is in preparation for further generalization of the thunk/value scheme
used by the execution code.
2019-03-11 08:42:46 -07:00
John Wiegley f397b80a9c Factor out citation information to its own data structure 2019-03-10 16:07:13 -07:00
John Wiegley 41d44b018c Guard against infinitely recursive function calls
Fixes #432
2019-03-10 14:11:03 -07:00
John Wiegley 106fd7957f
Update to the latest hnix conventions 2019-03-10 10:41:31 -07:00
Madeline Haraj 28ab983408
Add syntactic holes 2019-03-10 10:23:28 -07:00
John Wiegley eae6bf542f Split MonadFreshId off into its own file 2019-03-10 08:58:27 -07:00
Ken Micklas 6a5718458d Fix MonadFreshId instances in wrong places 2019-03-09 20:26:56 -05:00
Ken Micklas d9293cf034 Fix Nix.Exec 2019-03-09 20:26:19 -05:00
Ryan Trinkle bd867a3bef When forming derivationStrict arguments, supply `args` as a list rather than a string
Perhaps this used to be different, but as of nix-instantiate 2.1.3, `args` may not be a string
2019-03-09 16:04:41 -05:00
Doug Beardsley a39a5518ea Merge remote-tracking branch 'origin/pending' into remove-fromnix-text-instances 2018-11-24 15:22:54 -05:00
John Ericson f227911ce0 Merge remote-tracking branch 'origin/master' into prettyprinter 2018-11-20 18:23:15 -05:00
John Wiegley ba5b23a6e3
Bump minimum supported version to GHC 8.4.4 2018-11-19 09:46:02 -08: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