futhark-manifest 1.9.0.0 → 1.11.0.0
raw patch · 4 files changed
Files
- CHANGELOG.md +13/−0
- futhark-manifest.cabal +2/−2
- src/Futhark/Manifest.hs +14/−9
- tests/Tests.hs +1/−0
CHANGELOG.md view
@@ -1,5 +1,18 @@ # Revision history for futhark-manifest +## 1.11.0.0++* Added `arraySet`.++## 1.10.0.0++* Replaced `inputUnique` with `inputConsumed`.++* Replaced `outputUnique` with `outputFresh`.++* Updated for the new manifest format in the next version of Futhark (but with+ backwards compatibility).+ ## 1.9.0.0 * New type `Doc` for representing documentation comments.
futhark-manifest.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name: futhark-manifest-version: 1.9.0.0+version: 1.11.0.0 synopsis: Definition and serialisation instances for Futhark manifests. @@ -32,7 +32,7 @@ ghc-options: -Wall -Wcompat -Wredundant-constraints -Wincomplete-record-updates -Wmissing-export-lists default-language: Haskell2010 -test-suite futhark-data-test+test-suite futhark-manifest-test default-language: Haskell2010 type: exitcode-stdio-1.0 main-is: Tests.hs
src/Futhark/Manifest.hs view
@@ -75,14 +75,14 @@ data Input = Input { inputName :: T.Text, inputType :: TypeName,- inputUnique :: Bool+ inputConsumed :: Bool } deriving (Eq, Ord, Show) -- | Manifest info for an entry point return value. data Output = Output { outputType :: TypeName,- outputUnique :: Bool+ outputFresh :: Bool } deriving (Eq, Ord, Show) @@ -106,7 +106,8 @@ arrayNew :: CFuncName, arrayNewRaw :: CFuncName, arrayValuesRaw :: CFuncName,- arrayIndex :: CFuncName+ arrayIndex :: CFuncName,+ arraySet :: CFuncName } deriving (Eq, Ord, Show) @@ -241,7 +242,7 @@ deriving (Eq, Ord, Show) instance JSON.ToJSON ArrayOps where- toJSON (ArrayOps {arrayFree, arrayShape, arrayValues, arrayNew, arrayNewRaw, arrayValuesRaw, arrayIndex}) =+ toJSON (ArrayOps {arrayFree, arrayShape, arrayValues, arrayNew, arrayNewRaw, arrayValuesRaw, arrayIndex, arraySet}) = object [ ("free", toJSON arrayFree), ("shape", toJSON arrayShape),@@ -249,7 +250,8 @@ ("new", toJSON arrayNew), ("new_raw", toJSON arrayNewRaw), ("values_raw", toJSON arrayValuesRaw),- ("index", toJSON arrayIndex)+ ("index", toJSON arrayIndex),+ ("set", toJSON arraySet) ] instance JSON.ToJSON RecordField where@@ -341,14 +343,14 @@ onOutput (Output t u) = object [ ("type", toJSON t),- ("unique", toJSON u)+ ("fresh", toJSON u) ] onInput (Input p t u) = object [ ("name", toJSON p), ("type", toJSON t),- ("unique", toJSON u)+ ("consumed", toJSON u) ] onType (TypeArray t et rank ops) =@@ -387,6 +389,7 @@ <*> v .: "new_raw" <*> v .: "values_raw" <*> v .: "index"+ <*> v .: "set" instance JSON.FromJSON RecordField where parseJSON = JSON.withObject "RecordField" $ \v ->@@ -449,11 +452,13 @@ instance JSON.FromJSON Output where parseJSON = JSON.withObject "Output" $ \v ->- Output <$> v .: "type" <*> v .: "unique"+ -- "unique" for backwards compatibility.+ Output <$> v .: "type" <*> (v .: "fresh" <|> v .: "unique") instance JSON.FromJSON Input where parseJSON = JSON.withObject "Input" $ \v ->- Input <$> v .: "name" <*> v .: "type" <*> v .: "unique"+ -- "unique" for backwards compatibility.+ Input <$> v .: "name" <*> v .: "type" <*> (v .: "consumed" <|> v .: "unique") instance JSON.FromJSON Type where parseJSON = JSON.withObject "Type" $ \ty -> pArray ty <|> pOpaque ty
tests/Tests.hs view
@@ -22,6 +22,7 @@ <*> arbitrary <*> arbitrary <*> arbitrary+ <*> arbitrary instance Arbitrary RecordField where arbitrary = RecordField <$> arbitrary <*> arbitrary <*> arbitrary