File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 6
6
7
7
{ sources ? import nix/sources.nix ,
8
8
nixpkgs ? import sources . nixpkgs { } ,
9
- compiler ? "default"
9
+ compiler ? "default" ,
10
+ hoogle ? false
10
11
} :
11
12
with nixpkgs ;
12
13
13
14
let defaultCompiler = "ghc" + lib . replaceStrings [ "." ] [ "" ] haskellPackages . ghc . version ;
14
15
haskellPackagesForProject = p :
15
16
if compiler == "default" || compiler == defaultCompiler
16
- then haskellPackages . ghcWithPackages p
17
- # for all other compilers there is no Nix cache so dont bother building deps with NIx
18
- else haskell . packages . ${ compiler } . ghcWithPackages ( _ : [ ] ) ;
17
+ then if hoogle
18
+ then haskellPackages . ghcWithHoogle p
19
+ else haskellPackages . ghcWithPackages p
20
+ # for all other compilers there is no Nix cache so dont bother building deps
21
+ else if hoogle
22
+ then haskell . packages . ${ compiler } . ghcWithHoogle ( _ : [ ] )
23
+ else haskell . packages . ${ compiler } . ghcWithPackages ( _ : [ ] ) ;
19
24
20
25
retrie = with haskell . lib ; dontCheck ( disableLibraryProfiling ( haskellPackages . retrie ) ) ;
21
26
compilerWithPackages = haskellPackagesForProject ( p :
You can’t perform that action at this time.
0 commit comments