From 6480a81c1662f75e1996aeb3cb114baf53ca09b9 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Fri, 3 Jul 2020 13:46:29 -0400 Subject: feat(xan): Use haskell-language-server Use haskell-language-server instead of haskell-ide-engine for Xanthous. Change-Id: I7ef1433d5cd561e659fc06b3f373a6f29dfa5690 Reviewed-on: https://cl.tvl.fyi/c/depot/+/904 Tested-by: BuildkiteCI Reviewed-by: glittershark Reviewed-by: BuildkiteCI --- users/glittershark/emacs.d/config.el | 15 ++++----------- users/glittershark/xanthous/hie.nix | 16 ---------------- users/glittershark/xanthous/hie.sh | 6 ------ users/glittershark/xanthous/hie.yaml | 10 ++++++++++ users/glittershark/xanthous/package.yaml | 1 + users/glittershark/xanthous/shell.nix | 6 ++---- 6 files changed, 17 insertions(+), 37 deletions(-) delete mode 100644 users/glittershark/xanthous/hie.nix delete mode 100755 users/glittershark/xanthous/hie.sh create mode 100644 users/glittershark/xanthous/hie.yaml (limited to 'users/glittershark') diff --git a/users/glittershark/emacs.d/config.el b/users/glittershark/emacs.d/config.el index a2b05399fd..a0120824fb 100644 --- a/users/glittershark/emacs.d/config.el +++ b/users/glittershark/emacs.d/config.el @@ -689,12 +689,6 @@ (add-to-list #'company-backends #'company-lsp) (setq company-lsp-async t)) -(use-package! lsp-treemacs - :config - (map! :map lsp-mode-map - (:leader - "c X" #'lsp-treemacs-errors-list))) - (use-package! dap-mode) (defun +grfn/haskell-mode-setup () @@ -728,11 +722,10 @@ ;; :hook ;; (haskell-mode . lsp-haskell-enable) :config - (add-hook 'haskell-mode-hook #'+grfn/haskell-mode-setup 't) - (setq - ;; lsp-haskell-process-path-hie "/home/griffin/.nix-profile/bin/hie-8.6.5" - lsp-haskell-process-args-hie - '("-d" "-l" "/tmp/hie.log" "+RTS" "-M4G" "-H1G" "-K4G" "-A16M" "-RTS"))) + (setq lsp-haskell-process-path-hie "haskell-language-server-wrapper" + lsp-haskell-process-args-hie + '("-d" "-l" "/tmp/hie.log" "+RTS" "-M4G" "-H1G" "-K4G" "-A16M" "-RTS")) + (add-hook 'haskell-mode-hook #'+grfn/haskell-mode-setup 't)) (use-package! lsp-imenu :after (lsp-mode lsp-ui) diff --git a/users/glittershark/xanthous/hie.nix b/users/glittershark/xanthous/hie.nix deleted file mode 100644 index c8b1d2b5f5..0000000000 --- a/users/glittershark/xanthous/hie.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ pkgs ? (import ../../../. {}).third_party }: - -let - all-hies = (fetchTarball { - url = "https://github.com/infinisil/all-hies/archive/eff5d9a5e1a84150014095494331cf63e59923af.tar.gz"; - sha256 = "19bws9fyjhgiikig86cri05fxz1wrz60n69zrigq5wzbyn4hwv9h"; - }); - - sources = import "${all-hies}/sources.nix"; - build = import "${all-hies}/build.nix"; - -in (build { - glibcName = pkgs.glibc.name; - inherit sources; - ghcVersion = "8.8.3"; -}).combined diff --git a/users/glittershark/xanthous/hie.sh b/users/glittershark/xanthous/hie.sh deleted file mode 100755 index 223a432203..0000000000 --- a/users/glittershark/xanthous/hie.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 - -exec nix-shell --run "$(nix-build -o dist/bin/hie hie.nix)/bin/hie $*" diff --git a/users/glittershark/xanthous/hie.yaml b/users/glittershark/xanthous/hie.yaml new file mode 100644 index 0000000000..49f8ec1fbb --- /dev/null +++ b/users/glittershark/xanthous/hie.yaml @@ -0,0 +1,10 @@ +cradle: + cabal: + - path: './src' + component: 'lib:xanthous' + - path: './test' + component: 'test:test' + - path: './src' + component: 'exe:xanthous' + - path: './bench' + component: 'bench:benchmark' diff --git a/users/glittershark/xanthous/package.yaml b/users/glittershark/xanthous/package.yaml index 84f84b6b0e..e954374f88 100644 --- a/users/glittershark/xanthous/package.yaml +++ b/users/glittershark/xanthous/package.yaml @@ -31,6 +31,7 @@ dependencies: - comonad-extras - constraints - containers +- criterion - data-default - deepseq - directory diff --git a/users/glittershark/xanthous/shell.nix b/users/glittershark/xanthous/shell.nix index 491f0779f8..dd747b740c 100644 --- a/users/glittershark/xanthous/shell.nix +++ b/users/glittershark/xanthous/shell.nix @@ -5,13 +5,11 @@ })).shellFor { packages = p: [p.xanthous]; withHoogle = true; + doBenchmark = true; buildInputs = with pkgs.haskellPackages; [ cabal-install ghc-prof-flamegraph hp2pretty - ]; - - nativeBuildInputs = [ - (import ./hie.nix { inherit pkgs; }) + pkgs.haskell-language-server.ghc883 ]; } -- cgit 1.4.1