From cb877b6254bc704c5c560e90d462709b03e4199c Mon Sep 17 00:00:00 2001 From: Aleksandr Penskoi Date: Fri, 1 Apr 2022 23:23:51 +0300 Subject: [PATCH] Fix cabal.project and hie.yaml (by gen-hie) for LSP --- cabal.project | 2 +- flake.nix | 10 +++++++++- hie.yaml | 18 +++++++++++++++--- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/cabal.project b/cabal.project index e108cbfe..95f1fb40 100644 --- a/cabal.project +++ b/cabal.project @@ -1,6 +1,6 @@ index-state: 2022-01-22T00:00:00Z -packages: ./. +packages: ./bot-plutus-interface.cabal ./examples/plutus-game/plutus-game.cabal ./examples/plutus-transfer/plutus-transfer.cabal ./examples/plutus-nft/plutus-nft.cabal diff --git a/flake.nix b/flake.nix index aadab9ab..3f90b705 100644 --- a/flake.nix +++ b/flake.nix @@ -328,7 +328,15 @@ withHoogle = true; tools.haskell-language-server = {}; exactDeps = true; - nativeBuildInputs = [ pkgs'.cabal-install pkgs'.hlint pkgs'.haskellPackages.fourmolu pkgs'.jq pkgs'.websocat ]; + nativeBuildInputs = [ + pkgs'.cabal-install + pkgs'.haskellPackages.cabal-fmt + pkgs'.haskellPackages.implicit-hie + pkgs'.hlint + pkgs'.haskellPackages.fourmolu + pkgs'.jq + pkgs'.websocat + ]; }; modules = haskellModules; }; diff --git a/hie.yaml b/hie.yaml index 95862748..f5eaab56 100644 --- a/hie.yaml +++ b/hie.yaml @@ -4,10 +4,22 @@ cradle: component: "lib:bot-plutus-interface" - path: "./test" - component: "test:bot-plutus-interface-test" + component: "bot-plutus-interface:test:bot-plutus-interface-test" + + - path: "./examples/plutus-game/src" + component: "lib:plutus-game" + + - path: "./examples/plutus-game/app/Main.hs" + component: "plutus-game:exe:plutus-game-pab" - path: "./examples/plutus-nft/src" component: "lib:plutus-nft" - - path: "./examples/plutus-nft/app" - component: "exe:plutus-nft" + - path: "./examples/plutus-nft/app/Main.hs" + component: "plutus-nft:exe:plutus-nft-pab" + + - path: "./examples/plutus-transfer/src" + component: "lib:plutus-transfer" + + - path: "./examples/plutus-transfer/app/Main.hs" + component: "plutus-transfer:exe:plutus-transfer-pab"