summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvmchale <>2018-10-25 01:40:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2018-10-25 01:40:00 (GMT)
commit23992702312b3ee68a4341df2ed6564a19395c3d (patch)
tree355767b510e8544fb21db91d24803be0d4f6f78a
parenta66c6f06efc520f6e1c47303a75fe33e26245c7c (diff)
version 1.10.1.01.10.1.0
-rw-r--r--CHANGELOG.md4
-rw-r--r--shake-ats.cabal8
-rw-r--r--src/Development/Shake/ATS.hs5
-rw-r--r--src/Development/Shake/ATS/Rules.hs5
-rw-r--r--src/Development/Shake/ATS/Type.hs1
5 files changed, 12 insertions, 11 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 49a5305..d1f5d35 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
# shake-ats
+## 1.10.1.0
+
+ * `genATS` no longer takes `cpphs` parameter
+
## 1.10.0.0
* Make `cabalForeign` take a `HsCompiler` instead of a `CCompiler`.
diff --git a/shake-ats.cabal b/shake-ats.cabal
index 0b70f3b..be286a7 100644
--- a/shake-ats.cabal
+++ b/shake-ats.cabal
@@ -1,6 +1,6 @@
cabal-version: 1.18
name: shake-ats
-version: 1.10.0.1
+version: 1.10.1.0
license: BSD3
license-file: LICENSE
copyright: Copyright: (c) 2018 Vanessa McHale
@@ -41,7 +41,7 @@ library
base >=4.9 && <5,
language-ats -any,
shake-ext >=3.0.0.0,
- hs2ats >=0.2.0.1,
+ hs2ats >=0.4.0.0,
directory -any,
microlens -any,
text -any,
@@ -50,9 +50,9 @@ library
binary -any,
shake-cabal -any,
shake-c >=0.4.0.0
-
+
if flag(development)
ghc-options: -Werror
-
+
if impl(ghc >=8.0)
ghc-options: -Wincomplete-uni-patterns -Wincomplete-record-updates
diff --git a/src/Development/Shake/ATS.hs b/src/Development/Shake/ATS.hs
index 042c0fd..9a3d7ee 100644
--- a/src/Development/Shake/ATS.hs
+++ b/src/Development/Shake/ATS.hs
@@ -154,7 +154,7 @@ doLib Executable = pure mempty
doLib _ = id
hsAts :: ATSGen -> Rules ()
-hsAts (ATSGen x y z) = genATS x y z
+hsAts (ATSGen x y) = genATS x y
satsGen :: HATSGen -> Rules ()
satsGen (HATSGen x y) = genLinks x y
@@ -163,8 +163,7 @@ ccToHsc :: CCompiler -> HsCompiler
ccToHsc (C.GHC pref suff) = GHC pref suff
ccToHsc _ = GHC Nothing Nothing
--- | Rules for generating binaries or libraries from ATS code. This is very
--- general; use 'defaultATSTarget' for sensible defaults.
+-- | Rules for generating binaries or libraries from ATS code.
atsBin :: ATSTarget -> Rules ()
atsBin ATSTarget{..} = do
diff --git a/src/Development/Shake/ATS/Rules.hs b/src/Development/Shake/ATS/Rules.hs
index 4ea108a..b25c2f6 100644
--- a/src/Development/Shake/ATS/Rules.hs
+++ b/src/Development/Shake/ATS/Rules.hs
@@ -26,12 +26,11 @@ import System.Directory
-- the equivalent types.
genATS :: FilePath -- ^ Haskell source
-> FilePattern -- ^ @.sats@ file to generate
- -> Bool -- ^ Whether to call cpphs preprocessor
-> Rules ()
-genATS src' target cpphs' =
+genATS src' target =
target %> \out -> liftIO $ do
createDirectoryIfMissing True (takeDirectory out)
- genATSTypes src' out cpphs'
+ genATSTypes src' out
genLinks :: FilePath -> FilePath -> Rules ()
genLinks dats link =
diff --git a/src/Development/Shake/ATS/Type.hs b/src/Development/Shake/ATS/Type.hs
index 296da63..4ba6720 100644
--- a/src/Development/Shake/ATS/Type.hs
+++ b/src/Development/Shake/ATS/Type.hs
@@ -72,7 +72,6 @@ data HATSGen = HATSGen { satsFile :: FilePath -- ^ @.sats@ file containing type
data ATSGen = ATSGen { _hsFile :: FilePath -- ^ Haskell file containing types
, _atsTarget :: FilePath -- ^ ATS file to be generated
- , _cpphs :: Bool -- ^ Whether to use the C preprocessor on the Haskell code
} deriving (Generic, Binary)
-- TODO split off haskell-related types and leave it more general??