packages feed

hs 0.1.0.1 → 0.1.0.2

raw patch · 4 files changed

+25/−6 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

README.md view
@@ -54,3 +54,14 @@ With the path set up right your stack and cabal-install projects should play nicely together.  Share and Enjoy!+++## Installation Instructions++  1. Build and install `hs` on your path.++  2. Build and install this+     [patched version of `stack-2.8.0`](https://github.com/cdornan/stack-hs/pull/1)+     and put it on the path.++  3. Put [these wrapper scripts](wrappers) on your path.
hs.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           hs-version:        0.1.0.1+version:        0.1.0.2 synopsis:       GHC-toolchain installer broker description:    A tool for keeping track of where GHC installations have been placed and reporting                 that to the build managers (like @stack@ and @cabal-install@).
src/HS/Managers/Ghcup.hs view
@@ -20,6 +20,7 @@ import           HS.Managers.Types import           HS.Types.CompilerTool import           System.Directory+import           System.FilePath import           System.Process.Typed import           Text.Enum.Text @@ -53,7 +54,7 @@           Installation             { _iln_compiler = cv             , _iln_manager  = ghcup-            , _iln_dir      = ghcupInstallationDir' cfg cv sr+            , _iln_dir      = sr </> fp             }      hdl :: SomeException -> IO (Map Compiler Installation)
src/HS/Managers/Stack.hs view
@@ -11,15 +11,18 @@   ) where  import           Control.Exception+import           Data.Char import           Data.Map(Map) import qualified Data.Map               as Map import           Data.Maybe+import           Data.Text(Text) import qualified Data.Text              as T import           Fmt import           HS.Cfg.Types import           HS.Managers.Types import           HS.Types.CompilerTool import           System.Directory+import           System.FilePath import           System.Info(os,arch) import           System.Process.Typed import           Text.Enum.Text@@ -49,14 +52,18 @@      chk :: FilePath -> FilePath -> Maybe (Compiler,Installation)     chk sr fp = do-        cp  <- either (const Nothing) Just $ parseText $ T.pack fp-        cv  <- compilerVersion cp-        return $ (,) cp+        cv  <- either (const Nothing) Just $ parseText cv_t+        return $ (,) (Compiler $ Just cv)           Installation             { _iln_compiler   = cv             , _iln_manager    = stack-            , _iln_dir        = stackInstallationDir' cfg cv sr+            , _iln_dir        = sr </> fp             }+      where+        cv_t :: Text+        cv_t = T.takeWhileEnd isvc $ T.pack fp+          where+            isvc c = isDigit c || c=='.'      hdl :: SomeException -> IO (Map Compiler Installation)     hdl _ = return mempty