Skip to content

Instantly share code, notes, and snippets.

@idontgetoutmuch
Created September 6, 2019 13:42
Show Gist options
  • Select an option

  • Save idontgetoutmuch/7f44bf7d4bc5687cdda005fef87070fc to your computer and use it in GitHub Desktop.

Select an option

Save idontgetoutmuch/7f44bf7d4bc5687cdda005fef87070fc to your computer and use it in GitHub Desktop.
-p vs -E
sundials@sundials:~/chebApprox$ nix-shell -E 'with import <nixpkgs> { config.allowUnfree = true; config.allowBroken = true; }; haskellPackages.ghcWithPackages (pkgs: [pkgs.accelerate])'
[nix-shell:~/chebApprox]$ ghci
GHCi, version 8.6.5: http://www.haskell.org/ghc/ :? for help
Prelude> import Data.Array.Accelerate
<no location info>: error:
Could not find module ‘Data.Array.Accelerate’
It is not a module in the current program, or in any known package.
Prelude> :q
Leaving GHCi.
[nix-shell:~/chebApprox]$ exit
sundials@sundials:~/chebApprox$ nix-shell -p "haskellPackages.ghcWithPackages (pkgs: [pkgs.accelerate])"
[nix-shell:~/chebApprox]$ ghci
GHCi, version 8.6.5: http://www.haskell.org/ghc/ :? for help
Prelude> import Data.Array.Accelerate
Prelude Data.Array.Accelerate>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment