Commit graph

34 commits

Author SHA1 Message Date
Guillaume Maudoux dc31c5e64f Fix pathExists to also accept dirs 2020-11-18 09:42:06 +01:00
Anton-Latukha b035e373d6
clean-up: m
M  src/Nix/Effects.hs
2020-09-21 01:57:58 +03: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
John Wiegley 9d63f952e9
Merge remote-tracking branch 'sjakobi/ghc-gte-8.4' 2020-01-13 18:13:37 -08:00
Guillaume Maudoux 4ded48a789 Add proper default 'nix' prefix to search paths
The search path of Nix contains by default the "nix" prefix that points
to $datadir/nix/corepkgs, where $datadir defaults to $prefix/lib at
installation time, but can be overriden by NIX_DATA_DIR.

We implemented it using `Paths.hnix.getDataDir` and `NIX_DATA_DIR` to
follow Nix behaviour as closely as possible.

A small discrepancy is that we do the lookup on each invocation, where
Nix caches the searchPath at context creation.
2019-11-26 14:32:29 -07:00
Simon Jakobi 4cd94bf687 Remove some redundant GHC version checks 2019-10-21 23:52:22 +02:00
John Wiegley 77c52fd43c Revise Nix.Standard 2019-03-23 00:49:03 -07:00
John Wiegley 9b046a80c7
Remove unnecessary trailing space 2019-03-18 21:41:27 -07:00
John Wiegley 522585a7f1
Begin work on harmonizing the two different value representations 2019-03-18 11:41:46 -07:00
John Wiegley 015ced236e
Simplify Standard by splitting off Cited.Basic 2019-03-17 18:43:23 -07:00
John Wiegley 94e0be3882
Reformat all sources with Brittany, to restore consistency 2019-03-17 14:47:38 -07:00
John Wiegley f5726cd015
Further work 2019-03-14 10:56:20 -07:00
John Wiegley 6daaf18018
More work on Value.hs 2019-03-13 23:24:11 -07:00
John Wiegley 3cb9834792
Begin abstracting the thunk/value data representation 2019-03-11 22:41:56 -07:00
Ryan Trinkle c655bdb9f2 Factor out MonadIntrospect 2018-11-16 21:30:55 -05:00
Ryan Trinkle 32850cd23e Factor out instantiate and exec 2018-11-16 21:30:51 -05:00
Ryan Trinkle 7f964f8d21 WIP: Eliminate pathExists in favor of doesFileExist
Needs approval from @gbwey9

TODO:
* Actually get rid of pathExists
2018-11-16 17:29:14 -05:00
Ryan Trinkle 5acd886aca Factor out MonadEnv 2018-11-16 17:17:42 -05:00
Ryan Trinkle c2be721454 Factor out HTTP requests 2018-11-16 17:17:38 -05:00
Ryan Trinkle cc7a97b545 Factor out printing text 2018-11-16 17:17:34 -05:00
Ryan Trinkle 2884c4f918 Factor out filesystem functionality into MonadFile 2018-11-16 15:16:17 -05:00
Ryan Trinkle 02e057c5c0 Factor out addPath and toFile_ into MonadStore class 2018-11-16 14:50:58 -05:00
John Wiegley 8bfec34901
Resolve a compiler warning 2018-08-04 16:40:17 -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
Dmitry Rets 3a096cc93b Implement top-level __findFile.
Fixes https://github.com/haskell-nix/hnix/issues/248.
2018-05-20 23:39:24 +02:00
hsloan f7ff858ef9 add builtins.toFile 2018-05-14 22:54:34 -04: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
gb b07927a136 cleanup exec' 2018-05-02 14:10:49 -07:00
gb 6aeaba6209 adding builtins.exec 2018-05-02 13:58:56 -07:00
gb d07888ed35 implemented builtins.trace 2018-05-02 13:58:30 -07:00
John Wiegley b24598b3a3 Add top-level __valueSize
Fixes #253
2018-04-28 17:12:32 -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 e9299dce7b Implement builtins.fetchTarball at the moment by calling nix-instantiate 2018-04-11 13:56:18 -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
Renamed from src/Nix/Monad.hs (Browse further)