symbiote 0.0.1 → 0.0.1.1
raw patch · 3 files changed
+12/−10 lines, 3 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Test.Serialization.Symbiote: AvailableTopics :: Map Topic Int -> First s
+ Test.Serialization.Symbiote: AvailableTopics :: Map Topic Int32 -> First s
- Test.Serialization.Symbiote: BadTopics :: Map Topic Int -> Second s
+ Test.Serialization.Symbiote: BadTopics :: Map Topic Int32 -> Second s
- Test.Serialization.Symbiote: BadTopicsFailure :: Map Topic Int -> Map Topic Int -> Failure them s
+ Test.Serialization.Symbiote: BadTopicsFailure :: Map Topic Int32 -> Map Topic Int32 -> Failure them s
- Test.Serialization.Symbiote: [badTopicsFirst] :: Failure them s -> Map Topic Int
+ Test.Serialization.Symbiote: [badTopicsFirst] :: Failure them s -> Map Topic Int32
- Test.Serialization.Symbiote: [badTopicsSecond] :: Failure them s -> Map Topic Int
+ Test.Serialization.Symbiote: [badTopicsSecond] :: Failure them s -> Map Topic Int32
- Test.Serialization.Symbiote: register :: forall a o s m. Arbitrary a => Arbitrary (Operation a) => Symbiote a o s => Eq o => MonadIO m => Topic -> Int -> Proxy a -> SymbioteT s m ()
+ Test.Serialization.Symbiote: register :: forall a o s m. Arbitrary a => Arbitrary (Operation a) => Symbiote a o s => Eq o => MonadIO m => Topic -> Int32 -> Proxy a -> SymbioteT s m ()
- Test.Serialization.Symbiote.Core: SymbioteGeneration :: Int -> SymbioteProtocol a s -> SymbioteGeneration a s
+ Test.Serialization.Symbiote.Core: SymbioteGeneration :: Int32 -> SymbioteProtocol a s -> SymbioteGeneration a s
- Test.Serialization.Symbiote.Core: SymbioteState :: Gen a -> Gen (Operation a) -> (o -> o -> Bool) -> Int -> TVar (SymbioteGeneration a s) -> (a -> s) -> (o -> s) -> (Operation a -> s) -> (s -> Maybe a) -> (s -> Maybe o) -> (s -> Maybe (Operation a)) -> (Operation a -> a -> o) -> SymbioteState a o s
+ Test.Serialization.Symbiote.Core: SymbioteState :: Gen a -> Gen (Operation a) -> (o -> o -> Bool) -> Int32 -> TVar (SymbioteGeneration a s) -> (a -> s) -> (o -> s) -> (Operation a -> s) -> (s -> Maybe a) -> (s -> Maybe o) -> (s -> Maybe (Operation a)) -> (Operation a -> a -> o) -> SymbioteState a o s
- Test.Serialization.Symbiote.Core: [maxSize] :: SymbioteState a o s -> Int
+ Test.Serialization.Symbiote.Core: [maxSize] :: SymbioteState a o s -> Int32
- Test.Serialization.Symbiote.Core: [size] :: SymbioteGeneration a s -> Int
+ Test.Serialization.Symbiote.Core: [size] :: SymbioteGeneration a s -> Int32
Files
- src/Test/Serialization/Symbiote.hs +6/−5
- src/Test/Serialization/Symbiote/Core.hs +4/−3
- symbiote.cabal +2/−2
src/Test/Serialization/Symbiote.hs view
@@ -95,6 +95,7 @@ import Data.Map (Map) import qualified Data.Map as Map import qualified Data.Set as Set+import Data.Int (Int32) import Data.Text (unpack) import Data.Proxy (Proxy (..)) import Data.Aeson (ToJSON (..), FromJSON (..), (.=), object, (.:), Value (Object, String))@@ -145,7 +146,7 @@ => Eq o => MonadIO m => Topic- -> Int -- ^ Max size+ -> Int32 -- ^ Max size -> Proxy a -- ^ Reference to datatype -> SymbioteT s m () register t maxSize Proxy = do@@ -262,7 +263,7 @@ -- | Messages sent by the first peer data First s- = AvailableTopics (Map Topic Int) -- ^ Mapping of topics to their gen size+ = AvailableTopics (Map Topic Int32) -- ^ Mapping of topics to their gen size | FirstGenerating { firstGeneratingTopic :: Topic , firstGenerating :: Generating s@@ -320,7 +321,7 @@ -- | Messages sent by the second peer data Second s- = BadTopics (Map Topic Int)+ = BadTopics (Map Topic Int32) | Start | SecondOperating { secondOperatingTopic :: Topic@@ -386,8 +387,8 @@ data Failure them s = BadTopicsFailure- { badTopicsFirst :: Map Topic Int- , badTopicsSecond :: Map Topic Int+ { badTopicsFirst :: Map Topic Int32+ , badTopicsSecond :: Map Topic Int32 } | OutOfSyncFirst (First s) | OutOfSyncSecond (Second s)
src/Test/Serialization/Symbiote/Core.hs view
@@ -26,6 +26,7 @@ import Data.String (IsString) import Data.Map (Map) import qualified Data.Map as Map+import Data.Int (Int32) import Data.Proxy (Proxy (..)) import Data.Aeson (ToJSON, FromJSON, ToJSONKey, FromJSONKey) import Data.Serialize (Serialize)@@ -75,7 +76,7 @@ -- | Protocol generation state data SymbioteGeneration a s = SymbioteGeneration- { size :: Int+ { size :: Int32 , protocol :: SymbioteProtocol a s } @@ -92,7 +93,7 @@ { generate :: Gen a , generateOp :: Gen (Operation a) , equal :: o -> o -> Bool- , maxSize :: Int+ , maxSize :: Int32 , generation :: TVar (SymbioteGeneration a s) , encode' :: a -> s , encodeOut' :: o -> s@@ -139,7 +140,7 @@ then pure DoneGenerating else do let genResize :: forall q. Gen q -> m q- genResize = liftIO . QC.generate . resize size+ genResize = liftIO . QC.generate . resize (fromIntegral size) generatedValue <- encode <$> genResize generate generatedOperation <- encodeOp <$> genResize generateOp pure GeneratedSymbiote{generatedValue,generatedOperation}
symbiote.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 7e699fac6570783c54c6e19f435bab91f0c954666e5cf2cbf1c2190942ff8278+-- hash: 25783954120aa1f2248704db9140a112893ef6810db416a5c6725e34df0edc76 name: symbiote-version: 0.0.1+version: 0.0.1.1 synopsis: Data serialization, communication, and operation verification implementation description: Please see the README on GitHub at <https://github.com/athanclark/symbiote#readme> category: Data, Testing