implicit-hie-cradle 0.1.0.0 → 0.2.0.0
raw patch · 4 files changed
+16/−6 lines, 4 filesdep ~hie-biosPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: hie-bios
API changes (from Hackage documentation)
Files
- ChangeLog.md +4/−0
- README.md +3/−0
- implicit-hie-cradle.cabal +2/−2
- src/Hie/Implicit/Cradle.hs +7/−4
ChangeLog.md view
@@ -1,3 +1,7 @@ # Changelog for implicit-hie-cradle +## 0.2.0.0++- @jneira updated hie-bios 0.5.1 => 0.7.0+ ## Unreleased changes
README.md view
@@ -1,1 +1,4 @@ # implicit-hie-cradle++Auto generate `stack` or `cabal` multi component [`hie-bios`](https://github.com/mpickering/hie-bios) `Cradle`s.+This library is used by `ghcide`, unless you know what `hie-bios`'s `Cradle` type is, you're probably looking for the `gen-hie` command line utility contained in the [implicit-hie](https://github.com/Avi-D-coder/implicit-hie) package.
implicit-hie-cradle.cabal view
@@ -7,7 +7,7 @@ -- hash: 5c092074b2128d5593e67e2ace6e214ab27a89b73a7a71a71b212a4b34868b86 name: implicit-hie-cradle-version: 0.1.0.0+version: 0.2.0.0 description: Auto generate a stack or cabal multi component cradles category: Development, Tools, Hie, HLS synopsis: Auto generate hie-bios cradles@@ -40,7 +40,7 @@ , directory >=1.3.0 && <1.4 , extra >=1.6.14 && <1.8 , filepath >=1.4.1 && <1.5- , hie-bios >=0.5.1+ , hie-bios >=0.7.0 , hslogger >=1.2 && <1.4 , implicit-hie , process >=1.6.1 && <1.7
src/Hie/Implicit/Cradle.hs view
@@ -23,7 +23,7 @@ import Data.Void import qualified Data.Yaml as Yaml import GHC.Fingerprint (fingerprintString)-import HIE.Bios.Config+import HIE.Bios.Config hiding (cabalComponent, stackComponent) import HIE.Bios.Cradle import HIE.Bios.Environment (getCacheDir) import HIE.Bios.Types hiding (ActionName (..))@@ -60,7 +60,7 @@ implicitConfig' :: FilePath -> MaybeT IO (CradleType a, FilePath) implicitConfig' fp = ( \wdir ->- (Bios (wdir </> ".hie-bios") Nothing, wdir)+ (Bios (Program $ wdir </> ".hie-bios") Nothing Nothing, wdir) ) <$> biosWorkDir fp -- <|> (Obelisk,) <$> obeliskWorkDir fp@@ -79,10 +79,13 @@ c <- cn <$> readPkgs cc gp p pure (c, p) cabal :: FilePath -> MaybeT IO (CradleType a, FilePath)- cabal = build CabalMulti cabalComponent cabalPkgs- stack = build StackMulti stackComponent stackYamlPkgs+ cabal = build (CabalMulti mempty) cabalComponent' cabalPkgs+ stack :: FilePath -> MaybeT IO (CradleType a, FilePath)+ stack = build (StackMulti mempty) stackComponent' stackYamlPkgs components f (Package n cs) = map (f n) cs + cabalComponent' n c = CabalType . Just <$> cabalComponent n c+ stackComponent' n c = flip StackType Nothing . Just <$> stackComponent n c ------------------------------------------------------------------------ -- Cabal Cradle -- Works for new-build by invoking `v2-repl` does not support components