-
Notifications
You must be signed in to change notification settings - Fork 244
called with unexpected argument '__functor' #542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm trying to fix this error with a stack-to-nix setup like shown here (which has a small typo btw) https://input-output-hk.github.io/haskell.nix/user-guide/stack-projects/#creating-the-package-set but then I get the error
|
Thanks for the heads up. As well as the typo there were some places |
This was a nice idea, but in practice it did not work unless you were explicitly extracting just `config`, `overlays` and `system` (see #542). ``` ~/iohk/haskell.nix$ nix-build -E 'import <nixpkgs> (import ./.)' error: anonymous function at /nix/store/f7mwvx7gl8lwjiqmpv60xapc3crvc474-nixpkgs-20.03pre194824.1f56d679f40/nixpkgs/pkgs/top-level/default.nix:20:1 called with unexpected argument '__functor', at /nix/store/f7mwvx7gl8lwjiqmpv60xapc3crvc474-nixpkgs-20.03pre194824.1f56d679f40/nixpkgs/pkgs/top-level/impure.nix:84:1 ``` This change will replace #542 errors with #707 errors.
This was a nice idea, but in practice it did not work unless you were explicitly extracting just `config`, `overlays` and `system` (see #542). ``` ~/iohk/haskell.nix$ nix-build -E 'import <nixpkgs> (import ./.)' error: anonymous function at /nix/store/f7mwvx7gl8lwjiqmpv60xapc3crvc474-nixpkgs-20.03pre194824.1f56d679f40/nixpkgs/pkgs/top-level/default.nix:20:1 called with unexpected argument '__functor', at /nix/store/f7mwvx7gl8lwjiqmpv60xapc3crvc474-nixpkgs-20.03pre194824.1f56d679f40/nixpkgs/pkgs/top-level/impure.nix:84:1 ``` This change will replace #542 errors with #709 errors.
This was a nice idea, but in practice it did not work unless you were explicitly extracting just `config`, `overlays` and `system` (see #542). ``` ~/iohk/haskell.nix$ nix-build -E 'import <nixpkgs> (import ./.)' error: anonymous function at /nix/store/f7mwvx7gl8lwjiqmpv60xapc3crvc474-nixpkgs-20.03pre194824.1f56d679f40/nixpkgs/pkgs/top-level/default.nix:20:1 called with unexpected argument '__functor', at /nix/store/f7mwvx7gl8lwjiqmpv60xapc3crvc474-nixpkgs-20.03pre194824.1f56d679f40/nixpkgs/pkgs/top-level/impure.nix:84:1 ``` This change will replace #542 errors with #709 errors.
Now the V1 interface is gone we will not see any more of these (with the latest haskell.nix), but we may see #709 instead. |
This was a nice idea, but in practice it did not work unless you were explicitly extracting just `config`, `overlays` and `system` (see input-output-hk#542). ``` ~/iohk/haskell.nix$ nix-build -E 'import <nixpkgs> (import ./.)' error: anonymous function at /nix/store/f7mwvx7gl8lwjiqmpv60xapc3crvc474-nixpkgs-20.03pre194824.1f56d679f40/nixpkgs/pkgs/top-level/default.nix:20:1 called with unexpected argument '__functor', at /nix/store/f7mwvx7gl8lwjiqmpv60xapc3crvc474-nixpkgs-20.03pre194824.1f56d679f40/nixpkgs/pkgs/top-level/impure.nix:84:1 ``` This change will replace input-output-hk#542 errors with input-output-hk#709 errors.
This is likely to be a common issue for people upgrading to the latest version of haskell.nix.
If you get an error like this after updating then the simplest fix is to update the nix
code to use the new API.
For example you may need to go from:
to
You will need both the addition of
{}
and the use of.nixpkgsArgs
.The text was updated successfully, but these errors were encountered: