packages feed

ats-pkg 2.10.2.2 → 2.10.2.5

raw patch · 14 files changed

+92/−106 lines, 14 filesdep +filepathdep +shake-cdep −microlens-thdep ~shake-ext

Dependencies added: filepath, shake-c

Dependencies removed: microlens-th

Dependency ranges changed: shake-ext

Files

ats-pkg.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.18 name: ats-pkg-version: 2.10.2.2+version: 2.10.2.5 license: BSD3 license-file: LICENSE copyright: Copyright: (c) 2018 Vanessa McHale@@ -111,15 +111,16 @@         dhall >=1.14.0,         ansi-wl-pprint -any,         shake-ats >=1.8.0.0,-        shake-ext >=2.6.0.0,+        shake-ext >=3.0.0.0,+        shake-c -any,         composition-prelude >=1.3.0.0,         zip-archive -any,         ansi-wl-pprint -any,         binary -any,         microlens -any,-        microlens-th -any,-        dependency -any,-        filemanip -any+        dependency >=1.2.0.0,+        filemanip -any,+        filepath -any          if !os(windows)         build-depends:
dhall/atslib.dhall view
@@ -16,13 +16,6 @@       rec.xs in -let mapUtil =-  λ(xs : List Text) →-    map Text Text-      (λ(x : Text) → "utils/atscc/DATS/atscc_${x}.dats")-      xs-in- let mapPre =   λ(xs : List Text) →     mapDir { dir = "prelude", xs = xs }@@ -55,15 +48,10 @@                 ]             , includes = ([] : List Text)             }-          , prelude.staticLib ⫽-            { libTarget = "target/libatsopt.a"-            , name = "atsopt"-            , src = mapUtil [ "main", "print", "util" ]-            }           ]         , cflags = [ "-fPIC" ]         , compiler = compilerVersion         } in -atslib [0,3,10] [0,3,9]+atslib [0,3,11] [0,3,11]
dhall/atspkg-prelude.dhall view
@@ -163,8 +163,8 @@       : List Lib     , man = ([] : Optional Text)     , completions = ([] : Optional Text)-    , version = [0,3,9]-    , compiler = [0,3,10]+    , version = [0,3,11]+    , compiler = [0,3,11]     , dependencies = []       : List LibDep     , clib = []@@ -256,6 +256,10 @@     [ deb ] : Optional Debian in +let noPrelude =+  [ "-D_ATS_CCOMP_PRELUDE_NONE_", "-D_ATS_CCOMP_EXCEPTION_NONE_", "-D_ATS_CCOMP_RUNTIME_NONE_" ]+in+ {- We collect everything in a single record for convenience -} { mkDeb = mkDeb , emptySrc = emptySrc@@ -280,4 +284,5 @@ , solver = solver , ignore = ignore , debian = debian+, noPrelude = noPrelude }
src/Distribution/ATS/Build.hs view
@@ -20,7 +20,7 @@ configureCabal :: IO LocalBuildInfo -> IO LocalBuildInfo configureCabal = (<*>) $ do     build 1 mempty-    libDir <- (<> "/") <$> getCurrentDirectory+    libDir <- (<> [pathSeparator]) <$> getCurrentDirectory     pure (modifyConf libDir)  modifyBuildInfo :: String -> BuildInfo -> BuildInfo@@ -44,8 +44,8 @@ -- | Write a dummy file that will allow packaging to work. writeDummyFile :: IO () writeDummyFile =-    createDirectoryIfMissing True "dist-newstyle/lib" >>-    writeFile "dist-newstyle/lib/empty" ""+    createDirectoryIfMissing True ("dist-newstyle" </> "lib") >>+    writeFile ("dist-newstyle" </> "lib" </> "empty") ""  -- | This uses the users hooks as is @simpleUserHooks@, modified to build the -- ATS library.@@ -53,3 +53,5 @@ cabalHooks = let defConf = confHook simpleUserHooks     in simpleUserHooks { preConf = (writeDummyFile >>) .* preConf simpleUserHooks                        , confHook = configureCabal .* defConf }+                       -- FIXME registration + installation/copy hooks+                       -- ideally in a library of its own for C builds
src/Language/ATS/Package/Build.hs view
@@ -32,7 +32,7 @@ check p = do     home <- getEnv "HOME"     v <- wants p-    doesFileExist (home ++ "/.atspkg/" ++ show v ++ "/bin/patscc")+    doesFileExist (home </> ".atspkg" </> show v </> "bin" </> "patscc")  wants :: Maybe FilePath -> IO Version wants p = compiler <$> getConfig p@@ -78,19 +78,19 @@         let libs' = fmap (unpack . libTarget) . libraries $ config             bins = fmap (unpack . target) . bin $ config             incs = ((fmap unpack . includes) =<<) . libraries $ config-            libDir = maybe mempty (<> "/") tgt+            libDir = maybe mempty (<> [pathSeparator]) tgt         need (bins <> libs')         home <- liftIO $ getEnv "HOME"-        let g str = fmap (((home <> str) <>) . takeFileName)-            binDest =  g "/.local/bin/" bins-            libDest = ((home <> "/.atspkg/" <> libDir <> "lib/") <>) . takeFileName <$> libs'-            inclDest = ((home <> "/.atspkg/include/") <>) . takeFileName <$> incs+        let g str = fmap (((home </> str) </>) . takeFileName)+            binDest =  g (".local" </> "bin") bins+            libDest = ((home </> ".atspkg" </> libDir </> "lib") </>) . takeFileName <$> libs'+            inclDest = ((home </> ".atspkg" </> "include") </>) . takeFileName <$> incs         zipWithM_ copyFile' (bins ++ libs' ++ incs) (binDest ++ libDest ++ inclDest)         pa <- pandoc         case man config of             Just mt -> if not pa then pure () else do                 let mt' = manTarget mt-                    manDest = home <> "/.local/share/man/man1/" <> takeFileName mt'+                    manDest = home </> ".local" </> "share" </> "man" </> "man1" </> takeFileName mt'                 need [mt']                 copyFile' mt' manDest             Nothing -> pure ()@@ -98,7 +98,7 @@         case completions config of             Just com -> if not co then pure () else do                 let com' = unpack com-                    comDest = home <> "/.compleat/" <> takeFileName com'+                    comDest = home </> ".compleat" </> takeFileName com'                 need [com'] -- FIXME do this all in one step                 copyFile' com' comDest             Nothing -> pure ()@@ -115,7 +115,7 @@ -- @atspkg.dhall@ changes. getConfig :: MonadIO m => Maybe FilePath -> m Pkg getConfig dir' = liftIO $ do-    d <- fromMaybe <$> fmap (<> "/atspkg.dhall") getCurrentDirectory <*> pure dir'+    d <- fromMaybe <$> fmap (</> "atspkg.dhall") getCurrentDirectory <*> pure dir'     b <- not <$> doesFileExist ".atspkg/config"     if b         then input auto (pack d)@@ -186,17 +186,17 @@       -> IO () mkPkg rba lint tim setup rs tgt v = do     cfg <- cleanConfig rs-    let opt = options rba lint tim v $ pkgToTargets cfg rs+    let opt = options rba lint tim v $ pkgToTargets cfg tgt rs     shake opt $         mconcat-            [ want (pkgToTargets cfg rs)+            [ want (pkgToTargets cfg tgt rs)             , mkClean             , pkgToAction setup rs tgt cfg             ]  mkConfig :: Rules () mkConfig =-    ".atspkg/config" %> \out -> do+    (".atspkg" </> "config") %> \out -> do         need ["atspkg.dhall"]         x <- liftIO $ input auto "./atspkg.dhall"         liftIO $ BSL.writeFile out (encode (x :: Pkg))@@ -211,9 +211,9 @@ bits tgt rs = mconcat $ [ mkManpage, mkInstall tgt, mkConfig ] <>     sequence [ mkRun, mkTest, mkValgrind ] rs -pkgToTargets :: Pkg -> [FilePath] -> [FilePath]-pkgToTargets ~Pkg{..} [] = (unpack . target <$> bin) <> (unpack . libTarget <$> libraries)-pkgToTargets _ ts        = ts+pkgToTargets :: Pkg -> Maybe String -> [FilePath] -> [FilePath]+pkgToTargets ~Pkg{..} tgt [] = (toTgt tgt . target <$> bin) <> (unpack . libTarget <$> libraries)+pkgToTargets _  _ ts         = ts  noConstr :: ATSConstraint noConstr = ATSConstraint Nothing Nothing@@ -231,18 +231,18 @@  -- | The directory @~/.atspkg@ pkgHome :: MonadIO m => CCompiler -> m String-pkgHome cc' = liftIO $ (++ ("/.atspkg/" ++ ccToDir cc')) <$> getEnv "HOME"+pkgHome cc' = liftIO $ (</> (".atspkg" </> ccToDir cc')) <$> getEnv "HOME"  -- | The directory that will be @PATSHOME@. patsHomeAtsPkg :: MonadIO m => Version -> m String-patsHomeAtsPkg v = fmap (++ (show v ++ "/")) (pkgHome (GCC Nothing))+patsHomeAtsPkg v = fmap (</> show v) (pkgHome (GCC Nothing))  home' :: MonadIO m => Version -- ^ Compiler version                    -> Version -- ^ Library version                    -> m String home' compV libV = do     h <- patsHomeAtsPkg compV-    pure $ h ++ "lib/ats2-postiats-" ++ show libV+    pure $ h </> "lib" </> "ats2-postiats-" ++ show libV  -- | This is the @$PATSHOMELOCS@ variable to be passed to the shell. patsHomeLocsAtsPkg :: Int -- ^ Depth to recurse@@ -250,6 +250,11 @@ patsHomeLocsAtsPkg n = intercalate ":" ((<> ".atspkg/contrib") . ("./" <>) <$> g)     where g = [ join $ replicate i "../" | i <- [0..n] ] +toTgt :: Maybe String -> Text -> String+toTgt tgt = maybeTgt tgt . unpack+    where maybeTgt (Just t) = (<> ('-' : t))+          maybeTgt Nothing  = id+ pkgToAction :: [IO ()] -- ^ Setup actions to be performed             -> [String] -- ^ Targets             -> Maybe String -- ^ Optional compiler triple (overrides 'ccompiler')@@ -265,13 +270,14 @@          want (unpack . cTarget <$> as) +        -- TODO depend on tgt somehow?         specialDeps %> \out -> do             (_, cfgBin') <- cfgBin-            need [ cfgBin', ".atspkg/config" ]+            need [ cfgBin', ".atspkg" </> "config" ]             v'' <- getVerbosity             liftIO $ fetchDeps v'' (ccFromString cc') setup (unpack . fst <$> ds) (unpack . fst <$> cdps) (unpack . fst <$> bdeps) cfgBin' atslibSetup False >> writeFile out "" -        let bins = unpack . target <$> bs+        let bins = toTgt tgt . target <$> bs         setTargets rs bins mt          ph <- home' v' v@@ -285,7 +291,7 @@         fold (debRules <$> deb)      where g ph (Bin s t ls hs' atg gc' extra) =-            atsBin (ATSTarget (unpack <$> cf) (atsToolConfig ph) gc' (unpack <$> ls) [unpack s] hs' (unpackTgt <$> atg) mempty (unpack t) (deps extra) Executable True)+            atsBin (ATSTarget (unpack <$> cf) (atsToolConfig ph) gc' (unpack <$> ls) [unpack s] hs' (unpackTgt <$> atg) mempty (toTgt tgt t) (deps extra) Executable True)            h ph (Lib _ s t ls _ hs' lnk atg extra sta) =             atsBin (ATSTarget (unpack <$> cf) (atsToolConfig ph) False (unpack <$> ls) (unpack <$> s) hs' (unpackTgt <$> atg) (unpackLinks <$> lnk) (unpack t) (deps extra) (k sta) False)@@ -298,10 +304,10 @@           cDepsRules ph = unless (null as) $ do               let targets = fmap (unpack . cTarget) as                   sources = fmap (unpack . atsSrc) as-              zipWithM_ (cgen (atsToolConfig ph) [specialDeps, ".atspkg/config"] (fmap (unpack . ats) . atsGen =<< as)) sources targets+              zipWithM_ (cgen (atsToolConfig ph) [specialDeps, ".atspkg" </> "config"] (fmap (unpack . ats) . atsGen =<< as)) sources targets            cc' = maybe (unpack ccLocal) (<> "-gcc") tgt-          deps = (specialDeps:) . (".atspkg/config":) . fmap unpack+          deps = (specialDeps:) . ((".atspkg" </> "config"):) . fmap unpack            unpackLinks :: (Text, Text) -> HATSGen           unpackLinks (t, t') = HATSGen (unpack t) (unpack t')@@ -309,4 +315,4 @@           unpackTgt :: TargetPair -> ATSGen           unpackTgt (TargetPair t t' b) = ATSGen (unpack t) (unpack t') b -          specialDeps = ".atspkg/deps" ++ maybe mempty ("-" <>) tgt+          specialDeps = ".atspkg" </> "deps" ++ maybe "" ("-" <>) tgt
src/Language/ATS/Package/Build/C.hs view
@@ -8,13 +8,13 @@ import           Quaalude  cpkgHome :: CCompiler -> IO FilePath-cpkgHome cc' = (++ ("/.atspkg/" ++ ccToDir cc')) <$> getEnv "HOME"+cpkgHome cc' = (</> (".atspkg" </> ccToDir cc')) <$> getEnv "HOME"  allSubdirs :: FilePath -> IO [FilePath] allSubdirs [] = pure mempty allSubdirs d = do     d' <- listDirectory d-    let d'' = ((d <> "/") <>) <$> d'+    let d'' = (d </>) <$> d'     ds <- filterM doesDirectoryExist d''     ds' <- mapM allSubdirs ds     pure $ join (ds : ds')@@ -25,10 +25,10 @@     where g "icc" = "cc"           g x     = x -makeExecutable :: FilePath -> [FilePath] -> IO ()-makeExecutable file dirs = do+{-makeExecutable' :: FilePath -> [FilePath] -> IO ()+makeExecutable' file dirs = do     p <- findFile dirs file-    fold (setFileMode <$> p <*> pure ownerModes)+    fold (setFileMode <$> p <*> pure ownerModes)-}  clibSetup :: Verbosity -- ^ Shake verbosity level           -> CCompiler -- ^ C compiler@@ -42,19 +42,12 @@     -- Find configure script and make it executable     subdirs <- allSubdirs p     configurePath <- findFile (p:subdirs) "configure"-    -- autogenPath <- findFile (p:subdirs) "autogen.sh"     cmakeLists <- findFile (p:subdirs) "CMakeLists.txt"-    fold (setFileMode <$> configurePath <*> pure ownerModes)-    -- fold (setFileMode <$> autogenPath <*> pure ownerModes)-    makeExecutable "install-sh" (p:subdirs)-    makeExecutable "mkinstalldirs" (p:subdirs)-    makeExecutable "rellns-sh" (p:subdirs)-    makeExecutable "shtool" (p:subdirs)+    fold (makeExecutable <$> configurePath) -    -- CC="gcc" CFLAGS="-shared-libgcc -O2" ./glibc-2.27/configure --prefix="$HOME/.atspkg"     -- Set environment variables for configure script     h <- cpkgHome cc'-    let procEnv = Just [("CC", ccForConfig cc'), ("CFLAGS" :: String, "-I" <> h <> "include -Wno-error -O2"), ("PATH", "/usr/bin:/bin")]+    let procEnv = Just [("CC", ccForConfig cc'), ("CFLAGS" :: String, "-I" <> h </> "include -Wno-error -O2"), ("PATH", "/usr/bin:/bin")]      biaxe [fold (configure v h <$> configurePath <*> pure procEnv), cmake v h cmakeLists, make v, install v] lib' p @@ -64,11 +57,6 @@     let p = takeDirectory cfgLists     silentCreateProcess v ((proc "cmake" ["-DCMAKE_INSTALL_PREFIX:PATH=" ++ prefixPath, p]) { cwd = Just p }) -autogen :: Verbosity -> FilePath -> String -> FilePath -> IO ()-autogen v autogenPath lib' _ =-    putStrLn ("generating " ++ lib' ++ "...") >>-    silentCreateProcess v ((proc autogenPath mempty) { cwd = Just (takeDirectory autogenPath) })- configure :: Verbosity -> FilePath -> FilePath -> Maybe [(String, String)] -> String -> FilePath -> IO () configure v prefixPath configurePath procEnv lib' p =     putStrLn ("configuring " ++ lib' ++ "...") >>@@ -77,9 +65,8 @@ findMakefile :: FilePath -> IO FilePath findMakefile p = do     subdirs <- allSubdirs p-    -- mc <- findFile (p:subdirs) "CMakeLists.txt"     mp <- findFile (p:subdirs) "Makefile"-    pure $ maybe p takeDirectory mp -- (maybe p takeDirectory mp) takeDirectory mc+    pure $ maybe p takeDirectory mp  make :: Verbosity -> String -> FilePath -> IO () make v lib' p = do
src/Language/ATS/Package/Compiler.hs view
@@ -27,11 +27,11 @@ import           System.Process.Ext      (silentCreateProcess)  libatsCfg :: String-libatsCfg = $(embedStringFile "dhall/atslib.dhall")+libatsCfg = $(embedStringFile ("dhall" </> "atslib.dhall"))  compilerDir :: Version -> IO FilePath compilerDir v = makeAbsolute =<< dir-    where dir = (++ ("/.atspkg/" ++ show v)) <$> getEnv "HOME"+    where dir = (</> (".atspkg" </> show v)) <$> getEnv "HOME"  -- | Make a tarball from a directory containing the compiler. packageCompiler :: FilePath -> IO ()@@ -96,10 +96,10 @@      withCompiler "Configuring" v -    setFileMode configurePath ownerModes-    setFileMode (cd ++ "/autogen.sh") ownerModes+    makeExecutable configurePath+    makeExecutable (cd </> "autogen.sh") -    silentCreateProcess v' ((proc (cd ++ "/autogen.sh") []) { cwd = Just cd })+    silentCreateProcess v' ((proc (cd </> "autogen.sh") []) { cwd = Just cd })      silentCreateProcess v' ((proc configurePath ["--prefix", cd]) { cwd = Just cd }) @@ -108,11 +108,11 @@      cd <- compilerDir v -    biaxe [configure v' (cd ++ "/configure"), make v', install v' tgt' als] v cd+    biaxe [configure v' (cd </> "configure"), make v', install v' tgt' als] v cd  cleanAll :: IO () cleanAll = do-    d <- (++ "/.atspkg") <$> getEnv "HOME"+    d <- (</> ".atspkg") <$> getEnv "HOME"     b <- doesDirectoryExist d     when b $ do         putStrLn "Cleaning everything..."
src/Language/ATS/Package/Config.hs view
@@ -1,6 +1,5 @@ {-# LANGUAGE DeriveAnyClass  #-} {-# LANGUAGE DeriveGeneric   #-}-{-# LANGUAGE QuasiQuotes     #-} {-# LANGUAGE TemplateHaskell #-}  module Language.ATS.Package.Config ( UserConfig (..)@@ -20,17 +19,17 @@                              } deriving (Generic, Interpret, Binary)  cfgFile :: String-cfgFile = $(embedStringFile "dhall/config.dhall")+cfgFile = $(embedStringFile ("dhall" </> "config.dhall"))  defaultFileConfig :: FilePath -> IO () defaultFileConfig p = do-    let dir = p ++ "/.config/atspkg"+    let dir = p </> ".config" </> "atspkg"     createDirectoryIfMissing True dir-    writeFile (dir ++ "/config.dhall") cfgFile+    writeFile (dir </> "config.dhall") cfgFile  cfgBin :: (MonadIO m) => m (FilePath, FilePath) cfgBin = liftIO io-    where io = (id &&& (++ "/.atspkg/config")) <$> getEnv "HOME"+    where io = (id &&& (</> (".atspkg" </> "config"))) <$> getEnv "HOME"  mkUserConfig :: Rules () mkUserConfig = do@@ -43,7 +42,7 @@      where g h cfgBin' = do -            let cfg = h ++ "/.config/atspkg/config.dhall"+            let cfg = h </> ".config" </> "atspkg" </> "config.dhall"              want [cfgBin'] 
src/Language/ATS/Package/Dependency.hs view
@@ -78,7 +78,7 @@             -> ATSDependency             -> IO () atsPkgSetup als tgt' (ATSDependency lib' dirName' _ _ _ _ _ _ _) = do-    lib'' <- (<> unpack lib') <$> cpkgHome GCCStd+    lib'' <- (<> unpack lib') <$> cpkgHome (GCC Nothing)     b <- doesFileExist lib''     unless b $ do         als tgt' (unpack lib') (unpack dirName')@@ -89,7 +89,7 @@       -> ATSDependency -- ^ ATSDependency itself       -> IO () setup v' cc' (ATSDependency lib' dirName' _ _ _ _ _ _ _) = do-    lib'' <- (<> unpack lib') <$> cpkgHome cc'+    lib'' <- (</> unpack lib') <$> cpkgHome cc'     b <- doesFileExist lib''     unless b $ do         clibSetup v' cc' (unpack lib') (unpack dirName')@@ -134,8 +134,8 @@             zipResponse dirName response                 else tarResponse url'' dirName response -        needsMove <- doesDirectoryExist (dirName ++ "/package")+        needsMove <- doesDirectoryExist (dirName </> "package")         when needsMove $ do-            renameDirectory (dirName ++ "/package") "tempdir"+            renameDirectory (dirName </> "package") "tempdir"             removeDirectoryRecursive dirName             renameDirectory "tempdir" dirName
src/Language/ATS/Package/Dhall.hs view
@@ -17,7 +17,7 @@       -> Bool       -> IO a checkDhall path d =-    bool id detailed d $ input auto (pack ('.' : '/' : path))+    bool id detailed d $ input auto (pack ('.' : pathSeparator : path))  checkPkgSet :: FilePath -- ^ Path to @.dhall@ file defining a package set.             -> Bool -- ^ Whether to print detailed error messages.
src/Language/ATS/Package/PackageSet.hs view
@@ -2,7 +2,6 @@ {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings          #-} {-# LANGUAGE RecordWildCards            #-}-{-# LANGUAGE TemplateHaskell            #-}  module Language.ATS.Package.PackageSet ( ATSPackageSet (..)                                        , setBuildPlan@@ -20,7 +19,8 @@ newtype ATSPackageSet = ATSPackageSet { _atsPkgSet :: [ ATSDependency ] }     deriving (Interpret) -makeLenses ''ATSPackageSet+atsPkgSet :: Lens' ATSPackageSet [ATSDependency]+atsPkgSet f s = fmap (\x -> s { _atsPkgSet = x }) (f (_atsPkgSet s))  instance Pretty Version where     pretty v = text (show v)
src/Language/ATS/Package/Type.hs view
@@ -1,13 +1,11 @@-{-# OPTIONS_GHC -fno-warn-unused-top-binds -fno-warn-orphans #-}+{-# OPTIONS_GHC -fno-warn-orphans #-}  {-# LANGUAGE DeriveAnyClass             #-} {-# LANGUAGE DeriveGeneric              #-} {-# LANGUAGE DerivingStrategies         #-} {-# LANGUAGE DuplicateRecordFields      #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE OverloadedStrings          #-} {-# LANGUAGE StandaloneDeriving         #-}-{-# LANGUAGE TemplateHaskell            #-}  module Language.ATS.Package.Type ( -- * Types                                    Pkg (..)@@ -44,8 +42,6 @@ -- | You likely want 'libDeps' or 'libBldDeps' type DepSelector = ATSDependency -> [LibDep] -data PkgConfig = PkgConfig { dir :: Text, target :: Maybe Text }- -- TODO add a field for configure stage?? -- | Type for a dependency data ATSDependency = ATSDependency { libName     :: Text -- ^ Library name, e.g.@@ -60,7 +56,8 @@                                    }                    deriving (Generic, Interpret, Binary, Hashable) -makeLensesFor [("dir", "dirLens")] ''ATSDependency+dirLens :: Lens' ATSDependency Text+dirLens f s = fmap (\x -> s { dir = x }) (f (dir s))  -- | This is just a tuple, except I can figure out how to use it with Dhall. data TargetPair = TargetPair { hs    :: Text
src/Language/ATS/Package/Upgrade.hs view
@@ -20,7 +20,7 @@ atspkgPath :: IO String atspkgPath = do     home <- getEnv "HOME"-    pure $ home <> "/.local/bin/atspkg"+    pure $ home </> ".local" </> "bin" </> "atspkg"  upgradeBin :: String -> String -> IO () upgradeBin user proj = do@@ -42,4 +42,4 @@     createDirectoryIfMissing True (takeDirectory atsPath)     BSL.writeFile (atsPath ++ "-new") binBytes     renameFile (atsPath ++ "-new") atsPath-    setFileMode atsPath ownerModes+    makeExecutable atsPath
src/Quaalude.cpphs view
@@ -74,9 +74,7 @@                 , takeFileName                 , takeDirectory                 , (-<.>)-                -- * "System.Posix" reëxports-                , setFileMode-                , ownerModes+                , makeExecutable                 -- * "Network.HTTP.Client.TLS" reëxports                 , tlsManagerSettings                 -- "Network.HTTP.Client" reëxports@@ -85,6 +83,9 @@                 , httpLbs                 , Response (..)                 , Request (method, redirectCount)+                -- * "System.FilePath" reëxports+                , (</>)+                , pathSeparator                 -- * ByteString reëxports                 , ByteString                 -- * Helpers for pretty-printing@@ -103,14 +104,13 @@                 , Pretty (pretty)                 , module X                 -- Lens exports+                , Lens'                 , over                 , _Just                 , view                 , _1                 , _2                 , _4-                , makeLensesFor-                , makeLenses                 , each                 , (&)                 , (%~)@@ -134,7 +134,6 @@ import           Dhall                        hiding (bool) import           Lens.Micro                   hiding (both) import           Lens.Micro.Extras-import           Lens.Micro.TH import           Network.HTTP.Client import           Network.HTTP.Client.TLS      (tlsManagerSettings) import           Numeric                      (showHex)@@ -146,14 +145,16 @@ #endif import           System.Process               as X import           System.Process.Ext-import           Text.PrettyPrint.ANSI.Leijen hiding (bool, (<$>), (<>))+import           Text.PrettyPrint.ANSI.Leijen hiding (bool, (<$>), (<>), (</>))  infixr 5 <#>  #ifdef mingw32_HOST_OS-setFileMode :: a -> b -> IO ()-setFileMode _ _ = mempty-ownerModes = undefined+makeExecutable :: FilePath -> IO ()+makeExecutable = pure mempty+#else+makeExecutable :: FilePath -> IO ()+makeExecutable = flip setFileMode ownerModes #endif  hex :: Int -> String