diff --git a/README.md b/README.md index 1cbcec29c..5b5fe332c 100644 --- a/README.md +++ b/README.md @@ -18,28 +18,50 @@ This project aims to be __the universal interface__ to __a growing number of Has __We are currently focusing on using the [Language Server Protocol](https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md) as the interface via which we talk to clients.__ -- [Haskell IDE Engine](#haskell-ide-engine) - - [Features](#features) - - [Installation](#installation) - - [stack on Linux](#installation-with-stack-on-linux) - - [stack on Windows](#installation-with-stack-on-windows) - - [macOS](#installation-on-macos) - - [Nix](#installation-with-nix) - - [ArchLinux](#installation-on-archlinux) - - [Shake](#installation-with-shake) - - [Configuration](#configuration) - - [Editor Integration](#editor-integration) - - Using HIE with [VS Code](#using-hie-with-vs-code), [Sublime Text](#using-hie-with-sublime-text), [Vim/Neovim](#using-hie-with-vim-or-neovim), [Atom](#using-hie-with-atom), [Oni](#using-hie-with-oni), [Emacs](#using-hie-with-emacs), [Spacemacs](#using-hie-with-spacemacs) or [Spacemacs+Nix](#using-hie-with-spacemacs-on-nix-based-projects) - - [Docs on hover/completion](#docs-on-hovercompletion) - - [Contributing](#contributing) - - [Planned Features](#planned-features) - - [It's time to join the project!](#its-time-to-join-the-project) +- [Haskell IDE Engine (HIE)](#haskell-ide-engine-hie) + - [Features](#features) + - [Installation](#installation) + - [Installation with Nix](#installation-with-nix) + - [Installation on ArchLinux](#installation-on-archlinux) + - [Installation from source](#installation-from-source) + - [Linux pre-requirements](#linux-pre-requirements) + - [Windows: long paths (optional)](#windows-long-paths-optional) + - [Download the source code](#download-the-source-code) + - [Choose your GHC version](#choose-your-ghc-version) + - [Install a specific GHC version 8.2.1 - 8.6.3](#install-a-specific-ghc-version-821---863) + - [For GHC 8.0.2](#for-ghc-802) + - [Install *all* available GHC versions](#install-all-available-ghc-versions) + - [Installation with Shake](#installation-with-shake) + - [Install specific GHC Version with Shake](#install-specific-ghc-version-with-shake) + - [Install *all* available GHC versions with Shake](#install-all-available-ghc-versions-with-shake) + - [Configuration](#configuration) + - [Editor Integration](#editor-integration) + - [Using HIE with VS Code](#using-hie-with-vs-code) + - [Using VS Code with Nix](#using-vs-code-with-nix) + - [Using HIE with Sublime Text](#using-hie-with-sublime-text) + - [Using HIE with Vim or Neovim](#using-hie-with-vim-or-neovim) + - [vim-plug](#vim-plug) + - [Vim 8.0](#vim-80) + - [Sample `~/.vimrc`](#sample-vimrc) + - [Using HIE with Atom](#using-hie-with-atom) + - [Using HIE with Emacs](#using-hie-with-emacs) + - [Using HIE with Spacemacs](#using-hie-with-spacemacs) + - [Using HIE with Spacemacs on Nix Based Projects](#using-hie-with-spacemacs-on-nix-based-projects) + - [Using HIE with Oni](#using-hie-with-oni) + - [Docs on hover/completion](#docs-on-hovercompletion) + - [Contributing](#contributing) + - [Planned Features](#planned-features) + - [It's time to join the project!](#its-time-to-join-the-project) + - [Documentation](#documentation) - [Architecture](#architecture) - - [1. BIOS layer](#1-bios-layer) - - [2. Plugin layer](#2-plugin-layer) - - [3. IDE interfacing layer](#3-ide-interfacing-layer) - - [Documentation](#documentation) - - [Troubleshooting](#troubleshooting) + - [Troubleshooting](#troubleshooting) + - [DYLD on macOS](#dyld-on-macos) + - [macOS: Got error while installing GHC 8.6.1 or 8.6.2 - dyld: Library not loaded: /usr/local/opt/gmp/lib/libgmp.10.dylib](#macos-got-error-while-installing-ghc-861-or-862---dyld-library-not-loaded-usrlocaloptgmpliblibgmp10dylib) + - [macOS: Got error while processing diagnostics: unable to load package `integer-gmp-1.0.2.0`](#macos-got-error-while-processing-diagnostics-unable-to-load-package-integer-gmp-1020) + - [cannot satisfy -package-id \](#cannot-satisfy--package-id-package) + - [Is \ base-x?](#is-package-base-x) + - [Is there a hash (#) after \?](#is-there-a-hash--after-package) + - [Otherwise](#otherwise) ## Features @@ -283,6 +305,36 @@ stack ./install.hs hie-8.4.4 stack ./install.hs build-doc-8.4.4 ``` +The Haskell IDE Engine can also be built with `cabal new-build` instead of `stack build`. +This has the advantage that you can decide how the GHC versions have been installed. +However, this approach does currently not work for windows due to a missing feature upstream. +To see what GHC versions are available, the command `stack install.hs cabal-ghcs` can be used. +It will list all GHC versions that are on the path and their respective installation directory. +If you think, this list is incomplete, you can try to modify the PATH variable, such that the executables can be found. +Note, that the targets `cabal-build`, `cabal-build-docs` and `cabal-build-all` depend on the found GHC versions. +They install Haskell IDE Engine only for the found GHC versions. + +An example output is: + +```bash +> stack install.hs cabal-ghcs +****************************************************************** +Found the following GHC paths: +ghc-8.4.4: /opt/bin/ghc-8.4.4 +ghc-8.6.2: /opt/bin/ghc-8.6.2 + +****************************************************************** +``` + +If your desired ghc has been found, you use it to install Haskell IDE Engine. + +```bash +stack install.hs cabal-hie-8.4.4 +stack install.hs cabal-build-doc-8.4.4 +``` + +In general, targets that use `cabal` instead of `stack` are prefixed with `cabal-*` and are identical to their counterpart, except they do not install a GHC if it is missing but fail. + #### Install *all* available GHC versions with Shake *Warning*: Requires 20+ GB of space and potentially more than 2 hours to install, so please be patient! @@ -306,6 +358,18 @@ Then add to VS Code user settings. +To install HIE only for those GHC versions that are present on your system, you use: + +```bash +stack ./install.hs cabal-build-all +``` + +This will: + +- install Haskell Ide Engine for GHC versions that have been found on your path +- name them as expected by the VS Code plugin +- build local hoogle docs for each version + ## Configuration There are some settings that can be configured via a `settings.json` file: diff --git a/install.hs b/install.hs index 3cafa735a..681609fcf 100755 --- a/install.hs +++ b/install.hs @@ -4,6 +4,7 @@ --install-ghc runghc --package shake + --package directory --package tar --package zlib -} @@ -16,6 +17,7 @@ import Development.Shake import Development.Shake.Command import Development.Shake.FilePath import Control.Monad +import System.Directory ( findExecutable ) import System.Environment ( getProgName , unsetEnv ) @@ -47,35 +49,81 @@ main :: IO () main = do -- unset GHC_PACKAGE_PATH for cabal unsetEnv "GHC_PACKAGE_PATH" + + ghcPaths <- findInstalledGhcs + let ghcVersions = map fst ghcPaths + shakeArgs shakeOptions { shakeFiles = "_build" } $ do - want ["help"] - phony "ghc" $ do - ghc <- getGhcPath - command_ [] ghc ["--version"] - liftIO $ putStrLn "GHC" + want ["short-help"] + -- general purpose targets phony "submodules" updateSubmodules - phony "cabal" (getGhcPath >>= installCabal) - phony "all" helpMessage + phony "cabal" (getStackGhcPath mostRecentHieVersion >>= installCabal) + phony "short-help" shortHelpMessage + phony "all" shortHelpMessage phony "help" helpMessage - phony "build" (need (reverse $ map ("hie-" ++) hieVersions)) - phony "build-all" (need ["build"] >> need ["build-docs"]) phony "dist" buildDist + + phony "cabal-ghcs" $ do + let + msg = + "Found the following GHC paths: \n" + ++ unlines + (map (\(version, path) -> "ghc-" ++ version ++ ": " ++ path) + ghcPaths + ) + liftIO $ putStrLn $ embedInStars msg + + + -- stack specific targets + phony "build" (need (reverse $ map ("hie-" ++) hieVersions)) + phony "build-all" (need ["build-docs", "build"]) phony "build-docs" (need (reverse $ map ("build-doc-" ++) hieVersions)) - phony "test" (forM_ hieVersions test) + phony "test" $ do + need ["submodules"] + need ["cabal"] + forM_ hieVersions stackTest + phony "build-copy-compiler-tool" $ forM_ hieVersions buildCopyCompilerTool + forM_ + hieVersions + (\version -> phony ("build-doc-" ++ version) $ stackBuildDoc version) + forM_ + hieVersions + (\version -> phony ("hie-" ++ version) $ do + need ["submodules"] + need ["cabal"] + stackBuildHie version + stackInstallHie version + ) - forM_ hieVersions - (\version -> phony ("build-doc-" ++ version) $ buildDoc version) + -- cabal specific targets + phony "cabal-build" (need (map ("cabal-hie-" ++) ghcVersions)) + phony "cabal-build-all" (need ["cabal-build-docs", "cabal-build"]) + phony "cabal-build-docs" (need (map ("cabal-build-doc-" ++) ghcVersions)) + + phony "cabal-test" $ do + need ["submodules"] + need ["cabal"] + forM_ ghcVersions cabalTest forM_ hieVersions - (\version -> phony ("hie-" ++ version) $ do + (\version -> phony ("cabal-build-doc-" ++ version) $ do + need ["submodules"] + need ["cabal"] + cabalBuildDoc version + ) + forM_ + hieVersions + (\version -> phony ("cabal-hie-" ++ version) $ do + validateCabalNewInstallIsSupported need ["submodules"] need ["cabal"] - buildHie version - installHie version + cabalBuildHie version + cabalInstallHie version ) + -- macos specific targets phony "icu-macos-fix" (need ["icu-macos-fix-install"] >> need ["icu-macos-fix-build"]) phony "icu-macos-fix-install" (command_ [] "brew" ["install", "icu4c"]) @@ -99,7 +147,7 @@ buildDist = do withTempDir (\temporaryDir -> do forM_ hieVersions $ \hieVersion -> do - buildHie hieVersion + stackBuildHie hieVersion -- after building `hie` copy it to the temporary folder localInstallRoot <- getLocalInstallRoot hieVersion copyFile' (localInstallRoot "bin" hie) @@ -137,32 +185,78 @@ updateSubmodules = do command_ [] "git" ["submodule", "sync", "--recursive"] command_ [] "git" ["submodule", "update", "--init", "--recursive"] +validateCabalNewInstallIsSupported :: Action () +validateCabalNewInstallIsSupported = when (os `elem` ["mingw32", "win32"]) $ do + liftIO $ putStrLn $ embedInStars cabalInstallNotSuported + error cabalInstallNotSuported + +configureCabal :: VersionNumber -> Action () +configureCabal versionNumber = do + ghcPath' <- liftIO $ getGhcPath versionNumber + ghcPath <- case ghcPath' of + Nothing -> do + liftIO $ putStrLn $ embedInStars (ghcVersionNotFound versionNumber) + error (ghcVersionNotFound versionNumber) + Just p -> return p + execCabal_ + ["new-configure", "-w", ghcPath, "--write-ghc-environment-files=never"] + +findInstalledGhcs :: IO [(VersionNumber, GhcPath)] +findInstalledGhcs = foldM + (\found version -> do + path <- getGhcPath version + case path of + Nothing -> return found + Just p -> return $ (version, p) : found + ) + [] + hieVersions + +cabalBuildHie :: VersionNumber -> Action () +cabalBuildHie versionNumber = do + configureCabal versionNumber + execCabal_ ["new-build", "--write-ghc-environment-files=never"] + +cabalInstallHie :: VersionNumber -> Action () +cabalInstallHie versionNumber = do + localBin <- getLocalBin + execCabal_ + [ "new-install" + , "--write-ghc-environment-files=never" + , "--symlink-bindir=" ++ localBin + , "exe:hie" + , "--overwrite-policy=always" + ] + copyFile' (localBin "hie" <.> exe) + (localBin "hie-" ++ versionNumber <.> exe) + copyFile' (localBin "hie" <.> exe) + (localBin "hie-" ++ dropExtension versionNumber <.> exe) + +cabalBuildDoc :: VersionNumber -> Action () +cabalBuildDoc versionNumber = do + configureCabal versionNumber + execCabal_ ["new-install", "hoogle"] + execCabal_ ["new-exec", "hoogle", "generate"] + +cabalTest :: VersionNumber -> Action () +cabalTest versionNumber = do + configureCabal versionNumber + execCabal_ ["new-test"] + installCabal :: GhcPath -> Action () installCabal ghc = do - execStack_ ["install", "cabal-install"] + execStack_ ["install", "--stack-yaml=shake.yaml", "cabal-install"] execCabal_ ["update"] execCabal_ ["install", "Cabal-2.4.1.0", "--with-compiler=" ++ ghc] -buildHie :: VersionNumber -> Action () -buildHie versionNumber = do - when (versionNumber `elem` ["hie-8.2.2", "hie-8.2.1"]) - $ execStackWithYaml_ versionNumber ["install", "happy"] +stackBuildHie :: VersionNumber -> Action () +stackBuildHie versionNumber = do + execStackWithYaml_ versionNumber ["install", "happy"] execStackWithYaml_ versionNumber ["build"] - `actionOnException` liftIO (putStrLn buildFailMsg) + `actionOnException` liftIO (putStrLn stackBuildFailMsg) -buildFailMsg :: String -buildFailMsg = - let starsLine - = "\n******************************************************************\n" - in starsLine - ++ "building failed, " - ++ "try running `stack clean` and restart the build\n" - ++ "if this does not work, open an issue at \n" - ++ "https://github.com/haskell/haskell-ide-engine" - ++ starsLine - -installHie :: VersionNumber -> Action () -installHie versionNumber = do +stackInstallHie :: VersionNumber -> Action () +stackInstallHie versionNumber = do execStackWithYaml_ versionNumber ["install"] localBinDir <- getLocalBin localInstallRoot <- getLocalInstallRoot versionNumber @@ -176,14 +270,60 @@ buildCopyCompilerTool :: VersionNumber -> Action () buildCopyCompilerTool versionNumber = execStackWithYaml_ versionNumber ["build", "--copy-compiler-tool"] -test :: VersionNumber -> Action () -test versionNumber = execStackWithYaml_ versionNumber ["test"] +stackTest :: VersionNumber -> Action () +stackTest versionNumber = execStackWithYaml_ versionNumber ["test"] -buildDoc :: VersionNumber -> Action () -buildDoc versionNumber = do +stackBuildDoc :: VersionNumber -> Action () +stackBuildDoc versionNumber = do execStackWithYaml_ versionNumber ["install", "hoogle"] execStackWithYaml_ versionNumber ["exec", "hoogle", "generate"] +shortHelpMessage :: Action () +shortHelpMessage = do + let out = liftIO . putStrLn + scriptName <- liftIO getProgName + out "" + out "Usage:" + out' ("stack " <> scriptName <> " ") + out "" + out "Targets:" + mapM_ (out' . showTarget spaces) targets + out "" + where + out = liftIO . putStrLn + out' = out . (" " ++) + + spaces = space targets + targets = + [ ("help", "Show help message including all targets") + , emptyTarget + , ( "build" + , "Builds hie for all supported GHC versions (" + ++ allVersionMessage hieVersions + ++ ")" + ) + , ( "build-all" + , "Builds hie and hoogle databases for all supported GHC versions" + ) + , stackHieTarget mostRecentHieVersion + , stackBuildDocTarget mostRecentHieVersion + , stackHieTarget "8.4.4" + , stackBuildDocTarget "8.4.4" + , emptyTarget + , ( "cabal-ghcs" + , "Show all GHC versions that can be installed via `cabal-build` and `cabal-build-all`." + ) + , ("cabal-build", "Builds hie with cabal with all installed GHCs.") + , ( "cabal-build-all" + , "Builds hie and hoogle databases for all installed GHC versions with cabal" + ) + , cabalHieTarget mostRecentHieVersion + , cabalBuildDocTarget mostRecentHieVersion + , cabalHieTarget "8.4.4" + , cabalBuildDocTarget "8.4.4" + ] + + helpMessage :: Action () helpMessage = do scriptName <- liftIO getProgName @@ -192,58 +332,123 @@ helpMessage = do out' ("stack " <> scriptName <> " ") out "" out "Targets:" - mapM_ (out' . showTarget) targets + mapM_ (out' . showTarget spaces) targets out "" where - out = liftIO . putStrLn - out' = out . (" " ++) - -- |Number of spaces the target name including whitespace should have. - -- At least twenty, maybe more if target names are long. At most length of the longest target plus five. - space :: Int - space = maximum (20 : map ((+ 5) . length . fst) targets) - - -- |Show a target. - -- Concatenates the target with its help message and inserts whitespace between them. - showTarget :: (String, String) -> String - showTarget (target, msg) = - target ++ replicate (space - length target) ' ' ++ msg - - -- |Target for a specific ghc version - hieTarget :: VersionNumber -> (String, String) - hieTarget version = - ("hie-" ++ version, "Builds hie for GHC version " ++ version ++ " only") - - buildDocTarget :: VersionNumber -> (String, String) - buildDocTarget version = - ("build-doc-" ++ version, "Builds the Hoogle database for GHC version " ++ version ++ " only") - - allVersionMessage :: String - allVersionMessage = - let msg = intersperse ", " hieVersions - lastVersion = last msg - in concat $ (init $ init msg) ++ [" and ", lastVersion] + out = liftIO . putStrLn + out' = out . (" " ++) - -- All targets with their respective help message. + spaces = space targets + -- All targets the shake file supports + targets :: [(String, String)] targets = + generalTargets + ++ [emptyTarget] + ++ stackTargets + ++ [emptyTarget] + ++ cabalTargets + ++ [emptyTarget] + ++ macosTargets + + -- All targets with their respective help message. + generalTargets = + [ ("help", "Show help message including all targets") + , ( "cabal" + , "Makes sure that Cabal the lib is available for cabal-helper-wapper, to speed up project start" + ) + , ("dist", "Creates a tarball containing all the hie binaries") + ] + + macosTargets = [("icu-macos-fix", "Fixes icu related problems in MacOS")] + + stackTargets = [ ( "build" , "Builds hie for all supported GHC versions (" - ++ allVersionMessage + ++ allVersionMessage hieVersions ++ ")" ) , ( "build-all" , "Builds hie and hoogle databases for all supported GHC versions" ) - , ("cabal", "NOTE 3: This is needed for stack only projects too") , ( "build-docs" , "Builds the Hoogle database for all supported GHC versions" ) - , ("test" , "Runs hie tests") - , ("icu-macos-fix", "Fixes icu related problems in MacOS") - , ("dist", "Creates a tarball containing all the hie binaries") - , ("help" , "Show help") + , ("test", "Runs hie tests with stack") ] - ++ map hieTarget hieVersions - ++ map buildDocTarget hieVersions + ++ map stackHieTarget hieVersions + ++ map stackBuildDocTarget hieVersions + + cabalTargets = + [ ( "cabal-ghcs" + , "Show all GHC versions that can be installed via `cabal-build` and `cabal-build-all`." + ) + , ("cabal-build", "Builds hie with cabal with all installed GHCs.") + , ( "cabal-build-all" + , "Builds hie and hoogle databases for all installed GHC versions with cabal" + ) + , ( "cabal-build-docs" + , "Builds the Hoogle database for all installed GHC versions with cabal" + ) + , ("cabal-test", "Runs hie tests with cabal") + ] + ++ map cabalHieTarget hieVersions + ++ map cabalBuildDocTarget hieVersions + +-- | Empty target. Purpose is to introduce a newline between the targets +emptyTarget :: (String, String) +emptyTarget = ("", "") + +-- |Number of spaces the target name including whitespace should have. +-- At least twenty, maybe more if target names are long. At most length of the longest target plus five. +space :: [(String, String)] -> Int +space phonyTargets = maximum (20 : map ((+ 5) . length . fst) phonyTargets) + +-- |Show a target. +-- Concatenates the target with its help message and inserts whitespace between them. +showTarget :: Int -> (String, String) -> String +showTarget spaces (target, msg) = + target ++ replicate (spaces - length target) ' ' ++ msg + +-- |Target for a specific ghc version +stackHieTarget :: String -> (String, String) +stackHieTarget version = + ( "hie-" ++ version + , "Builds hie for GHC version " ++ version ++ " only with stack" + ) + +-- |Target for a specific ghc version +cabalHieTarget :: String -> (String, String) +cabalHieTarget version = + ( "cabal-hie-" ++ version + , "Builds hie for GHC version " ++ version ++ " only with cabal new-build" + ) + +stackBuildDocTarget :: VersionNumber -> (String, String) +stackBuildDocTarget version = + ( "build-doc-" ++ version + , "Builds the Hoogle database for GHC version " + ++ version + ++ " only with stack" + ) + +cabalBuildDocTarget :: VersionNumber -> (String, String) +cabalBuildDocTarget version = + ( "cabal-build-doc-" ++ version + , "Builds the Hoogle database for GHC version " + ++ version + ++ " only with cabal" + ) + +-- | Creates a message of the form "a, b, c and d", where a,b,c,d are GHC versions. +-- If there is no GHC in the list of `hieVersions` +allVersionMessage :: [String] -> String +allVersionMessage wordList = case wordList of + [] -> "" + [a] -> show a + (a : as) -> + let msg = intersperse ", " wordList + lastVersion = last msg + in concat $ (init $ init msg) ++ [" and ", lastVersion] execStackWithYaml_ :: VersionNumber -> [String] -> Action () execStackWithYaml_ versionNumber args = do @@ -264,12 +469,31 @@ execStack_ = command_ [] "stack" execCabal_ :: [String] -> Action () execCabal_ = command_ [] "cabal" --- |Get the path to the GHC compiler executable linked to the local `stack.yaml` --- Equal to the command `stack path --compiler-exe` -getGhcPath :: Action GhcPath -getGhcPath = do - Stdout ghc' <- execStack ["path", "--compiler-exe"] - return $ trim ghc' +-- |Get the path to the GHC compiler executable linked to the local `stack-$GHCVER.yaml`. +-- Equal to the command `stack path --stack-yaml $stack-yaml --compiler-exe`. +-- This might install a GHC if it is not already installed, thus, might fail if stack fails to install the GHC. +getStackGhcPath :: VersionNumber -> Action GhcPath +getStackGhcPath ghcVersion = do + Stdout ghc <- execStackWithYaml ghcVersion ["path", "--compiler-exe"] + return $ trim ghc + +-- |Get the path to a GHC that has the version specified by `VersionNumber` +-- If no such GHC can be found, Nothing is returned. +-- First, it is checked whether there is a GHC with the name `ghc-$VersionNumber`. +-- If this yields no result, it is checked, whether the numeric-version of the `ghc` +-- command fits to the desired version. +getGhcPath :: VersionNumber -> IO (Maybe GhcPath) +getGhcPath ghcVersion = do + pathMay <- findExecutable ("ghc-" ++ ghcVersion) + case pathMay of + Nothing -> do + noPrefixPathMay <- findExecutable "ghc" + case noPrefixPathMay of + Nothing -> return Nothing + Just p -> do + Stdout version <- cmd p ["--numeric-version"] :: IO (Stdout String) + if ghcVersion == trim version then return $ Just p else return Nothing + p -> return p -- |Read the local install root of the stack project specified by the VersionNumber -- Returns the filepath of the local install root. @@ -285,9 +509,42 @@ getLocalInstallRoot hieVersion = do -- Equal to the command `stack path --local-bin` getLocalBin :: Action FilePath getLocalBin = do - Stdout stackLocalDir' <- execStack ["path", "--local-bin"] + Stdout stackLocalDir' <- execStack + ["path", "--stack-yaml=shake.yaml", "--local-bin"] return $ trim stackLocalDir' -- |Trim the end of a string trim :: String -> String trim = dropWhileEnd isSpace + +-- |Embed a string within two lines of stars to improve perceivability and, thus, readability. +embedInStars :: String -> String +embedInStars str = + let starsLine + = "\n******************************************************************\n" + in starsLine <> str <> starsLine + +-- |Stack build fails message +stackBuildFailMsg :: String +stackBuildFailMsg = + embedInStars + $ "Building failed, " + ++ "Try running `stack clean` and restart the build\n" + ++ "If this does not work, open an issue at \n" + ++ "\thttps://github.com/haskell/haskell-ide-engine" + +-- |No suitable ghc version has been found. Show a message. +ghcVersionNotFound :: VersionNumber -> String +ghcVersionNotFound versionNumber = + "No GHC with version " + <> versionNumber + <> " has been found.\n" + <> "Either install a fitting GHC, use the stack targets or modify the PATH variable accordingly." + +-- | Error message when a windows system tries to install HIE via `cabal new-install` +cabalInstallNotSuported :: String +cabalInstallNotSuported = + "This system has been identified as a windows system.\n" + ++ "Unfortunately, `cabal new-install` is currently not supported on windows.\n" + ++ "Please use one of the stack-based targets.\n\n" + ++ "If this system has been falsely identified, please open an issue at:\n\thttps://github.com/haskell/haskell-ide-engine\n" diff --git a/shake.yaml b/shake.yaml index 9f87ba09d..2eeb71009 100644 --- a/shake.yaml +++ b/shake.yaml @@ -1,10 +1,7 @@ # Used to provide a different environment for the shake build script -resolver: lts-12.25 # GHC 8.4.4 +resolver: nightly-2018-12-17 # GHC 8.6.2 packages: - . -extra-packages: -- shake-0.17.4 - nix: packages: [ zlib ]