packages feed

shake-ats 1.5.0.1 → 1.5.0.3

raw patch · 3 files changed

+13/−11 lines, 3 filesdep ~hs2atsdep ~language-atsdep ~shake-extPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: hs2ats, language-ats, shake-ext

API changes (from Hackage documentation)

Files

shake-ats.cabal view
@@ -1,5 +1,5 @@ name:                shake-ats-version:             1.5.0.1+version:             1.5.0.3 synopsis:            Utilities for building ATS projects with shake description:         Various helper functions for building [ATS](http://www.ats-lang.org/) with the [shake](http://shakebuild.com/) library homepage:            https://github.com/vmchale/shake-ats#readme
src/Development/Shake/ATS.hs view
@@ -66,7 +66,8 @@ atsCommand tc sourceFile out = do     path <- fromMaybe "" <$> getEnv "PATH"     home' <- home tc-    let env = patsEnv home' path+    h <- fromMaybe "" <$> getEnv "HOME"+    let env = patsEnv h home' path     patsc <- patsopt tc     command env patsc ["--output", out, "-dd", sourceFile, "-cc"] @@ -85,8 +86,8 @@         liftIO $ copyFile dep (home' ++ "/" ++ dep)  -- This is the @$PATSHOMELOCS@ variable to be passed to the shell.-patsHomeLocs :: Int -> String-patsHomeLocs n = intercalate ":" $ (<> ".atspkg/contrib") . ("./" <>) <$> g+patsHomeLocs :: FilePath -> Int -> String+patsHomeLocs _ n = intercalate ":" $ (<> ".atspkg/contrib") . ("./" <>) <$> g     where g = [ join $ replicate i "../" | i <- [0..n] ]  makeCFlags :: [String] -- ^ Inputs@@ -134,11 +135,11 @@     h <- patsHome (compilerVer tc)     pure $ h ++ "lib/ats2-postiats-" ++ show (libVersion tc) -patsEnv :: FilePath -> FilePath -> [CmdOption]-patsEnv home' path = EchoStderr False :+patsEnv :: FilePath -> FilePath -> FilePath -> [CmdOption]+patsEnv h home' path = EchoStderr False :     zipWith AddEnv         ["PATSHOME", "PATH", "PATSHOMELOCS"]-        [home', home' ++ "/bin:" ++ path, patsHomeLocs 5]+        [home', home' ++ "/bin:" ++ path, patsHomeLocs h 5]  atsToC :: FilePath -> FilePath atsToC = (-<.> "c") . (".atspkg/c/" <>)@@ -227,7 +228,8 @@ trim :: String -> String trim = init . drop 1 -maybeError :: (MonadIO m) => Either (ATSError String) b -> m ()+-- | Print any errors to standard error.+maybeError :: (MonadIO m) => Either ATSError b -> m () maybeError Right{}  = pure () maybeError (Left y) = printErr y 
src/Development/Shake/ATS/Generate.hs view
@@ -5,11 +5,11 @@ import           Data.Semigroup import           Language.ATS -generateLinks :: String -> Either (ATSError String) String+generateLinks :: String -> Either ATSError String generateLinks = fmap (printATS . generateLinks') . parse -generateLinks' :: ATS -> ATS-generateLinks' (ATS ds) = ATS (fmap g ds <> [macDecl])+generateLinks' :: ATS a -> ATS a+generateLinks' (ATS ds) = ATS (fmap g ds <> [macDecl]) --  ATS [Local undefined (ATS (fmap g ds <> [macDecl])) (ATS mempty)]     where g f@Func{} = Extern undefined (set (fun.preF.expression) expr f)           g x        = x           expr = Just (StringLit "\"mac#\"")