shake-ats 1.8.0.4 → 1.8.0.5
raw patch · 4 files changed
+11/−10 lines, 4 filesdep +microlensdep +microlens-thdep −lensPVP ok
version bump matches the API change (PVP)
Dependencies added: microlens, microlens-th
Dependencies removed: lens
API changes (from Hackage documentation)
Files
- shake-ats.cabal +3/−2
- src/Development/Shake/ATS.hs +5/−5
- src/Development/Shake/ATS/Generate.hs +1/−1
- src/Development/Shake/ATS/Type.hs +2/−2
shake-ats.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.18 name: shake-ats-version: 1.8.0.4+version: 1.8.0.5 license: BSD3 license-file: LICENSE copyright: Copyright: (c) 2018 Vanessa McHale@@ -44,7 +44,8 @@ shake-ext >=2.9.0.0, hs2ats >=0.2.0.1, directory -any,- lens -any,+ microlens -any,+ microlens-th -any, text -any, dependency -any, shake -any,
src/Development/Shake/ATS.hs view
@@ -53,11 +53,11 @@ ) where import Control.Arrow-import Control.Lens import Control.Monad import Control.Monad.IO.Class import Data.Bool (bool) import Data.Either (fromRight)+import Data.Foldable (fold) import Data.Maybe (fromMaybe) import Data.Semigroup (Semigroup (..)) import qualified Data.Text.Lazy as TL@@ -69,6 +69,7 @@ import Development.Shake.FilePath import Development.Shake.Version import Language.ATS+import Lens.Micro import System.Directory (copyFile, createDirectoryIfMissing, doesFileExist) import System.Environment (getEnv) import System.Exit (ExitCode (ExitSuccess))@@ -142,7 +143,6 @@ cc' = _cc tc f = bool id ("atslib":) (_linkATSLib tc) h' <- pkgHome cc'- -- FIXME only bother with atslib if it's unnecessary? let libs'' = f $ bool libs' ("gc" : libs') gc' pure $ CConfig [h ++ "/ccomp/runtime/", h, h' ++ "include", ".atspkg/contrib"] libs'' [h' ++ "lib", _patsHome tc ++ "/ccomp/atslib/lib"] extras (_linkStatic tc) @@ -245,10 +245,10 @@ transitiveDeps :: (MonadIO m) => [FilePath] -> [FilePath] -> m [FilePath] transitiveDeps _ [] = pure []-transitiveDeps gen ps = fmap join $ forM ps $ \p -> if p `elem` gen then pure mempty else do+transitiveDeps gen ps = fmap fold $ forM ps $ \p -> if p `elem` gen then pure mempty else do contents <- liftIO $ readFile p- let (ats, err) = (fromRight mempty &&& maybeError p) . parseM $ contents- err+ let (ats, err) = (fromRight mempty &&& id) . parseM $ contents+ maybeError p err let dir = takeDirectory p deps <- filterM (\f -> ((f `elem` gen) ||) <$> (liftIO . doesFileExist) f) $ fixDir dir . trim <$> getDependencies ats deps' <- transitiveDeps gen deps
src/Development/Shake/ATS/Generate.hs view
@@ -1,8 +1,8 @@ module Development.Shake.ATS.Generate ( generateLinks ) where -import Control.Lens import Language.ATS+import Lens.Micro generateLinks :: String -> Either ATSError String generateLinks = fmap (printATS . generateLinks') . parseM
src/Development/Shake/ATS/Type.hs view
@@ -37,13 +37,13 @@ , patsFlags ) where -import Control.Lens import Data.Binary (Binary (..)) import Data.Dependency (Version (..)) import Data.Hashable (Hashable) import qualified Data.Text.Lazy as TL import Development.Shake.C import GHC.Generics (Generic)+import Lens.Micro.TH -- We should have four build types: --@@ -90,7 +90,7 @@ , _linkStatic :: Bool -- ^ Force static linking , _solver :: Solver , _linkATSLib :: Bool -- ^ Whether to link against atslib- , _patsFlags :: [String] -- ^ Additional flags to pass to @patsopt@.+ , _patsFlags :: [String] -- ^ Additional flags to pass to @patsopt@. } deriving (Generic, Binary) data HATSGen = HATSGen { satsFile :: FilePath -- ^ @.sats@ file containing type definitions