Unverified Commit 419650fd authored by Vaibhav Sagar's avatar Vaibhav Sagar Committed by GitHub

Merge pull request #1306 from teto/ghc8-env

improve flake by distinguishing different goals (development vs final executable vs with a jupyter environment)
parents 4e12b44d 1e710bf3
......@@ -87,11 +87,11 @@
"pre-commit-hooks": "pre-commit-hooks"
},
"locked": {
"lastModified": 1633827357,
"narHash": "sha256-TjTkSYMjce1ejPVvidnFWluxij6LGZV5TSmx2IQPYX4=",
"lastModified": 1637213318,
"narHash": "sha256-ZgxPwV7t4DyGYP7aXoetq+JHtd73XlOV2fYSflQmOXw=",
"owner": "haskell",
"repo": "haskell-language-server",
"rev": "195fa4c0fff2fcc0c0001b28216b36a890629cd2",
"rev": "311107eabbf0537e0c192b2c377d282505b4eff1",
"type": "github"
},
"original": {
......
......@@ -20,19 +20,26 @@
inherit system;
};
ihaskellEnv = compilerVersion:
compilerVersionFromHsPkgs = hsPkgs:
pkgs.lib.replaceStrings [ "." ] [ "" ] hsPkgs.ghc.version;
mkEnv = hsPkgs:
import ./release.nix {
compiler = "ghc${compilerVersion}";
compiler = "ghc${compilerVersionFromHsPkgs hsPkgs}";
nixpkgs = pkgs;
};
mkExe = hsPkgs: (mkEnv hsPkgs).ihaskellExe;
ghcDefault = ghc8107;
ghc884 = pkgs.haskell.packages.ghc884;
ghc8107 = pkgs.haskell.packages.ghc8107;
ghc921 = pkgs.haskell.packages.ghc921;
mkDevShell = hsPkgs:
let
myIHaskell = (mkPackage hsPkgs);
compilerVersion = pkgs.lib.replaceStrings [ "." ] [ "" ] hsPkgs.ghc.version;
compilerVersion = compilerVersionFromHsPkgs hsPkgs;
myModifier = drv:
pkgs.haskell.lib.addBuildTools drv (with hsPkgs; [
......@@ -51,19 +58,29 @@
name = "ihaskell";
returnShellEnv = false;
modifier = pkgs.haskell.lib.dontCheck;
overrides = (ihaskellEnv compilerVersion).ihaskellOverlay ;
overrides = (mkEnv hsPkgs).ihaskellOverlay ;
withHoogle = true;
};
in {
packages = {
ihaskell = mkDevShell ghc8107;
ihaskell8107 = mkDevShell ghc8107;
ihaskell884 = mkDevShell ghc884;
ihaskellEnv = ihaskellEnv ghc8107;
ihaskell-dev = mkDevShell ghcDefault;
ihaskell-dev-921 = mkDevShell ghc921;
ihaskell-dev-8107 = mkDevShell ghc8107;
ihaskell-dev-884 = mkDevShell ghc884;
ihaskell = mkExe ghcDefault;
ihaskell-8107 = mkExe ghc8107;
ihaskell-921 = mkExe ghc921;
# I actually wish those would disappear ? let jupyterWith or use deal with it
ihaskell-env = mkEnv ghcDefault;
ihaskell-env-8107 = mkEnv ghc8107;
};
defaultPackage = self.packages.${system}.ihaskell;
devShell = self.packages.${system}.ihaskell-dev;
});
}
......@@ -14,7 +14,6 @@ module IHaskell.Eval.Hoogle (
import qualified Data.ByteString.Char8 as CBS
import qualified Data.ByteString.Lazy as LBS
import Data.Either (either)
import IHaskellPrelude
import Data.Aeson
......
......@@ -20,7 +20,6 @@ import IHaskellPrelude
import Data.Char (toLower)
import Data.List (maximumBy, inits)
import Prelude (head, tail)
import Control.Monad (msum)
#if MIN_VERSION_ghc(8,4,0)
import GHC hiding (Located, Parsed)
......
......@@ -85,10 +85,6 @@ import FastString
#endif
import GHC
import Control.Monad (void)
import Data.Function (on)
import Data.List (nubBy)
import StringUtils (replace)
#if MIN_VERSION_ghc(9,0,0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment