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
John Wiegley
01e805e106
Update default.nix to use megaparsec 7.0.4
2018-11-22 09:53:04 -08:00
John Wiegley
2447e7e044
Remove the use of hpack
...
Fixes #411
2018-11-22 09:15:50 -08:00
John Wiegley
e0669ce3c3
Merge branch 'master' into doOptimize-doProfiling
2018-11-22 08:57:09 -08:00
Domen Kožar
ef3bc04a7c
Be able to pass doOptimize/doProfiling flags to nix build
2018-11-22 09:53:43 +00:00
Vaibhav Sagar
017ce7667a
Bump Megaparsec to 7.0.4
2018-11-22 01:16:11 -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
John Ericson
04abd357bd
Switch to prettyprinter
2018-11-17 12:02:26 -05:00
Ryan Trinkle
6d2daf0ecd
WIP: Refactor MonadVar to use ref-tf's MonadRef instead
...
TODO:
* Upstream GEq (STRef s)
* Eliminate shim functions
2018-11-16 14:11:37 -05:00
gb
4baa4f7108
change Nix.NixString module to Nix.String
2018-09-23 16:03:44 -04:00
gb
6f1ed3c2e9
documented methods;added more methods with deprecation
2018-09-15 20:04:54 -04:00
gb
a57aa711df
tests run
2018-09-09 11:47:04 -04:00
John Wiegley
b9b0723037
Update hnix.cabal
2018-08-23 21:06:56 -07:00
John Wiegley
f0b6b6b223
Change NValueNF to use Free instead of Fix
...
This allows us to detect and report cycles during normalization.
See #348
2018-08-09 22:09:00 -04:00
gb
fd2bbb66e9
fixes to match latest master: tests ran
2018-07-28 15:32:15 -04:00
John Wiegley
9ed0597e40
Update default.nix and .cabal file
2018-07-25 11:53:48 -07:00
John Wiegley
4fffd51438
Bump version to 0.5.2, regenerate hnix.cabal
2018-07-19 15:15:25 -07:00
John Wiegley
578a3551c9
Merge remote-tracking branch 'origin/master' into pending
2018-07-19 15:14:16 -07:00
Silvan Mosberger
69dcb30c89
Loosen deriving-compat bounds
2018-07-19 19:30:57 +02:00
John Wiegley
c060fa9d4e
Corrections to default.nix
2018-07-17 13:31:29 -07:00
John Wiegley
2a598d539e
Merge remote-tracking branch 'origin/master' into pending
2018-07-17 11:39:04 -07:00
John Wiegley
74df7d67f1
Add a build-tool-depends section to package.yaml
2018-06-27 12:51:34 -07:00
John Wiegley
b0826b9166
Use megaparsec 6.5.0
2018-06-27 11:36:04 -07:00
Félix Baylac-Jacqué
721ddd4f53
Test NSelect reduction
2018-06-25 17:19:39 +02:00
John Wiegley
471712f11f
Switch PrettyPrintTests from QuickCheck to Hedgehog
...
The reason being that we get better shrinking by default, and no orphan
instances.
2018-05-14 21:22:04 -07:00
John Wiegley
eef2ec2512
Only use compact with GHC 8.2, as per the documentation for compact
2018-05-10 16:12:42 -07:00
John Wiegley
892ce63e1a
Don't guard compact based on the version
2018-05-10 15:35:31 -07:00
John Wiegley
865984b428
Permit building with GHC 8.0, extend the Travis build matrix
2018-05-10 15:07:32 -07:00
John Wiegley
14138bfc97
Update GitHub link to point to haskell-nix
2018-05-10 13:57:53 -07:00
John Wiegley
dbd8468862
In Builtins.hs, just include derivation.nix directly
2018-05-10 13:51:14 -07:00
John Wiegley
addea54208
Add more missing files
2018-05-09 10:59:08 -07:00
John Wiegley
f5155a12dd
Add files missing from Hackage tarball, bump to 0.5.1
2018-05-09 10:43:25 -07:00
John Wiegley
ba0dc19d2d
Work from mightybyte: Minimize deps required, for building with GHCJS
2018-05-08 16:41:15 -07:00
John Wiegley
ce3b0d70e9
Move all of the parsing code into a single module, for optimization
2018-05-07 12:06:56 -07:00
John Wiegley
2457efdaa3
Only invoke pretty/parser tests if PRETTY_TESTS=<N> for some N>0
2018-05-06 22:13:30 -07:00
John Wiegley
1895cff9cc
Update hnix.cabal
2018-05-06 10:43:51 -07:00
John Wiegley
e7a6456a35
Make use of lens-family to provide some utility lenses/traversals
2018-05-06 10:43:43 -07:00
Matthew Pickering
b0ed29b3df
Add QuickCheck test for pretty printer and parser
...
I have not spent any time optimising the generated programs but they do
not look totally unreasonable from a cursory inspection.
Fixes #158
2018-05-06 10:31:52 +00: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
John Wiegley
ee8ba02dfd
Much more work on type inference; report multiple possible types
...
This is needed because of a function like this:
x: y: x + y
This is polymorphic, but over exactly four possibilities:
int -> int
int -> float
float -> int
float -> float
The "type" is really the combination of the four, since we don't yet have a
mechanism like type classes, which could have rendered this as a single type:
(Num a, Num b) => (x :: a): (y :: b): x + y
Going this route will require that we manage an implicit type classes
hierarchy, and perform unification on constraints as well as types. In the
interim, I just lifted the unification algorithm into the LogicT monad, and
use back-tracking search to find all the possible types an expression could
be.
The main problem with using LogicT, however, is that there are many types
it *couldn't* be, and in the case of a unification failure, it not yet clear
what the type should have been. For example:
"foo" + 2
Should the string have been a float or an integer or a path? Or should the
integer have been a string? So for now we report all the possibilities, since
it's not obvious which part of the expression is in error:
hnix: Type error: TypeInferenceErrors
[ UnificationFail (TCon "integer") (TCon "string")
, UnificationFail (TCon "string") (TCon "path")
, UnificationFail (TCon "string") (TCon "float")
, UnificationFail (TCon "string") (TCon "integer")
]
This is a case where enumerating types rather than trying to make them compact
using type classes might actually be an improvement, since the errors here
would have been only slightly less numerous:
string != Num a => a
string != path
integer != string
Clearly a better reporting mechanism is needed to clarify these problems. I
can imagine that in an IDE, there would be a squiggly under both sides of the
expression, each suggesting the type that was expected for that argument under
the assumption that the other argument (the one not be inspected) was the
correct one.
2018-05-01 20:49:10 -04:00
John Wiegley
f662d44c56
Hindley-Milner is close to working, just the MonadFix problem again
2018-04-30 21:52:25 -04:00
John Wiegley
bda103bc11
Don't include ghc-datasize if --flags=profiling is set
2018-04-30 21:48:45 -04:00
John Wiegley
7f01cc8bb8
valueSize will not work with GHC 8.4 right now
...
ghc-heap-view hasn't been updated yet
2018-04-28 18:29:37 -07:00
John Wiegley
8d0a67b52c
Only turn on -Werror for Travis
2018-04-28 18:21:24 -07:00
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