summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvmchale <>2018-08-10 05:02:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2018-08-10 05:02:00 (GMT)
commitc15ca5c4d345167c9016b891e66e33e1049a7a48 (patch)
treed1c1540451e177278000929ebfb1d9f8efc453a3
parent979deb39819b028876f73c860eee8d0bb1c95b58 (diff)
version 1.9.0.31.9.0.3
-rw-r--r--Setup.hs2
-rw-r--r--shake-ats.cabal3
-rw-r--r--src/Development/Shake/ATS/Environment.hs4
-rw-r--r--src/Development/Shake/ATS/Rules.hs4
-rw-r--r--src/Development/Shake/ATS/Type.hs3
5 files changed, 6 insertions, 10 deletions
diff --git a/Setup.hs b/Setup.hs
deleted file mode 100644
index 9a994af..0000000
--- a/Setup.hs
+++ /dev/null
@@ -1,2 +0,0 @@
-import Distribution.Simple
-main = defaultMain
diff --git a/shake-ats.cabal b/shake-ats.cabal
index 54df3b5..aa93ec2 100644
--- a/shake-ats.cabal
+++ b/shake-ats.cabal
@@ -1,6 +1,6 @@
cabal-version: 1.18
name: shake-ats
-version: 1.9.0.2
+version: 1.9.0.3
license: BSD3
license-file: LICENSE
copyright: Copyright: (c) 2018 Vanessa McHale
@@ -38,7 +38,6 @@ library
ghc-options: -Wall
build-depends:
base >=4.9 && <5,
- hashable -any,
language-ats -any,
shake-ext >=3.0.0.0,
hs2ats >=0.2.0.1,
diff --git a/src/Development/Shake/ATS/Environment.hs b/src/Development/Shake/ATS/Environment.hs
index 4ff7698..96553ee 100644
--- a/src/Development/Shake/ATS/Environment.hs
+++ b/src/Development/Shake/ATS/Environment.hs
@@ -7,7 +7,7 @@ import Control.Monad.IO.Class
import qualified Data.Text.Lazy as TL
import Development.Shake.C
import Development.Shake.FilePath
-import System.Environment (getEnv)
+import System.Directory
-- | Given a C compiler, return the appropriate directory for its globally
-- installed artifacts. This is used to keep libraries built for different
@@ -18,7 +18,7 @@ ccToDir _ = ""
-- | The directory @~/.atspkg@
pkgHome :: MonadIO m => CCompiler -> m String
-pkgHome cc' = liftIO $ (</> (".atspkg" </> ccToDir cc')) <$> getEnv "HOME"
+pkgHome cc' = liftIO $ getAppUserDataDirectory ("atspkg" </> ccToDir cc')
fixDir :: FilePath -> String -> String
fixDir p =
diff --git a/src/Development/Shake/ATS/Rules.hs b/src/Development/Shake/ATS/Rules.hs
index c6f3f26..56f16d2 100644
--- a/src/Development/Shake/ATS/Rules.hs
+++ b/src/Development/Shake/ATS/Rules.hs
@@ -60,8 +60,8 @@ cabalForeign (GHC _ suff) (ForeignCabal cbp' cf' obf') = do
obfDir = takeDirectory (obf -<.> "hs")
libName = takeBaseName cf
- (v, trDeps) <- liftIO $ getCabalDeps cf
obf %> \out -> do
+ (v, trDeps) <- liftIO $ getCabalDeps cf
ghcV' <- quietly ghcVersion
let ghcV = maybe ghcV' (drop 1) suff
@@ -75,7 +75,7 @@ cabalForeign (GHC _ suff) (ForeignCabal cbp' cf' obf') = do
pkgDir = subdir </> "dist-newstyle" </> "build" </> platform </> "ghc-" ++ ghcV </> libName ++ "-" ++ prettyShow v
dir <- filter endsBuild <$> liftIO (getSubdirs pkgDir)
- let obj = head dir ++ "/" ++ takeFileName obf
+ let obj = head dir </> takeFileName obf
liftIO $ copyFile obj out
let hdr = dropExtension obj ++ "_stub.h"
diff --git a/src/Development/Shake/ATS/Type.hs b/src/Development/Shake/ATS/Type.hs
index dcc6639..296da63 100644
--- a/src/Development/Shake/ATS/Type.hs
+++ b/src/Development/Shake/ATS/Type.hs
@@ -14,7 +14,6 @@ module Development.Shake.ATS.Type ( ForeignCabal (..)
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)
@@ -98,4 +97,4 @@ data ATSTarget = ATSTarget { _cFlags :: [String] -- ^ Flags to be passed to
data ForeignCabal = ForeignCabal { projectFile :: Maybe TL.Text -- ^ @cabal.project@ file to track
, cabalFile :: TL.Text -- ^ @.cabal@ file associated with the library
, objectFile :: TL.Text -- ^ Object file to be generated
- } deriving (Eq, Show, Generic, Binary, Hashable)
+ } deriving (Eq, Show, Generic, Binary)