From 534599dbe5122c3dbe0294571e07a1e5e6563386 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 17 Dec 2018 13:32:32 +0100 Subject: [PATCH] Provide additional instances --- cryptoids-class/changes.md | 4 ++++ cryptoids-class/package.yaml | 2 +- cryptoids-types/package.yaml | 5 ++++- cryptoids-types/src/Data/CryptoID.hs | 8 +++++++- cryptoids/package.yaml | 2 +- filepath-crypto/package.yaml | 2 +- stack.yaml | 2 +- uuid-crypto/package.yaml | 2 +- 8 files changed, 20 insertions(+), 7 deletions(-) diff --git a/cryptoids-class/changes.md b/cryptoids-class/changes.md index 8efc3c4..998739a 100644 --- a/cryptoids-class/changes.md +++ b/cryptoids-class/changes.md @@ -1,3 +1,7 @@ +# 1.0.0 + +Provide additional instances + # 0.0.0 First published version diff --git a/cryptoids-class/package.yaml b/cryptoids-class/package.yaml index de9597d..51ea355 100644 --- a/cryptoids-class/package.yaml +++ b/cryptoids-class/package.yaml @@ -25,7 +25,7 @@ ghc-options: dependencies: - base >=4.9 && <5 - - cryptoids-types >=0.0.0 && <0.1 + - cryptoids-types >=0.0.0 && <1.1 - exceptions >=0.8.3 && <0.11 library: diff --git a/cryptoids-types/package.yaml b/cryptoids-types/package.yaml index 6dc7d04..3310a9f 100644 --- a/cryptoids-types/package.yaml +++ b/cryptoids-types/package.yaml @@ -1,6 +1,6 @@ name: cryptoids-types synopsis: Shared types for encrypting internal object identifiers before exposure -version: 0.0.0 +version: 1.0.0 license: BSD3 license-file: LICENSE author: Gregor Kleen @@ -26,6 +26,9 @@ dependencies: - binary >=0.8.3 && <0.11 - path-pieces >=0.2.1 && <0.3 - http-api-data >=0.3.7 && <0.4 + - aeson >=1.2.4.0 && <1.3 + - deepseq >=1.4.3.0 && <1.5 + - hashable >=1.2.6.1 && <1.3 library: source-dirs: src diff --git a/cryptoids-types/src/Data/CryptoID.hs b/cryptoids-types/src/Data/CryptoID.hs index 2d51294..9bc67da 100644 --- a/cryptoids-types/src/Data/CryptoID.hs +++ b/cryptoids-types/src/Data/CryptoID.hs @@ -13,10 +13,16 @@ import Foreign.Storable (Storable) import Web.PathPieces (PathPiece) import Web.HttpApiData (ToHttpApiData, FromHttpApiData) +import Control.DeepSeq (NFData) +import Data.Aeson (ToJSON, ToJSONKey, FromJSON, FromJSONKey) + +import Data.Hashable (Hashable) + newtype CryptoID (namespace :: Symbol) a = CryptoID { ciphertext :: a } deriving ( Eq, Ord , Read, Show - , Binary, Storable + , Binary, Storable, NFData, Hashable , Data, Typeable, Generic , PathPiece, ToHttpApiData, FromHttpApiData + , ToJSON, ToJSONKey, FromJSON, FromJSONKey ) diff --git a/cryptoids/package.yaml b/cryptoids/package.yaml index ae5324d..d3f3cb4 100644 --- a/cryptoids/package.yaml +++ b/cryptoids/package.yaml @@ -25,7 +25,7 @@ ghc-options: - -fno-warn-name-shadowing dependencies: - base >=4.9 && <5 - - cryptoids-types >=0.0 && <0.1 + - cryptoids-types >=0.0 && <1.1 - cryptoids-class >=0.0 && <0.1 - cryptonite >=0.23 && <0.26 - bytestring >=0.10.8 && <0.11 diff --git a/filepath-crypto/package.yaml b/filepath-crypto/package.yaml index 8263a1a..748cde2 100644 --- a/filepath-crypto/package.yaml +++ b/filepath-crypto/package.yaml @@ -30,7 +30,7 @@ ghc-options: - -fno-warn-name-shadowing dependencies: - base >=4.9 && <5 - - cryptoids-types >=0.0.0 && <0.1 + - cryptoids-types >=0.0.0 && <1.1 - cryptoids-class >=0.0.0 && <0.1 - cryptoids >=0.5 && <0.6 - filepath >=1.4.1 && <1.5 diff --git a/stack.yaml b/stack.yaml index 5a2b8d3..ee02153 100644 --- a/stack.yaml +++ b/stack.yaml @@ -15,7 +15,7 @@ # resolver: # name: custom-snapshot # location: "./custom-snapshot.yaml" -resolver: lts-12.2 +resolver: lts-12.23 #resolver: nightly-2018-02-24 # User packages to be built. diff --git a/uuid-crypto/package.yaml b/uuid-crypto/package.yaml index 44c3aa7..3f652ab 100644 --- a/uuid-crypto/package.yaml +++ b/uuid-crypto/package.yaml @@ -30,7 +30,7 @@ ghc-options: - -fno-warn-name-shadowing dependencies: - base >=4.9 && <5 - - cryptoids-types >=0.0.0 && <0.1 + - cryptoids-types >=0.0.0 && <1.1 - cryptoids-class >=0.0.0 && <0.1 - cryptoids >=0.5 && <0.6 - uuid >=1.3.13 && <1.4