on master help sign in
Move ToBytes and FromBytes under Data.Serialize
621cb65Harendra Kumar
core/docs/Changelog.md+3
@@ -17,6 +17,9 @@
17* `ParserK` in `Streamly.Data.ParserK` is not specialized to arrays anymore. To
17* `ParserK` in `Streamly.Data.ParserK` is not specialized to arrays anymore. To
18 adapt to the new code, change `ParserK a m b` to `ParserK (Array a) m b` where
18 adapt to the new code, change `ParserK a m b` to `ParserK (Array a) m b` where
19 `Array` comes from `Streamly.Data.Array`.
19 `Array` comes from `Streamly.Data.Array`.
20+* Internal modules renamed:
21+ * Streamly.Internal.Serialize.FromBytes -> Streamly.Internal.Data.Serialize.Parser
22+ * Streamly.Internal.Serialize.ToBytes -> Streamly.Internal.Data.Serialize.Stream
20
23
21### Deprecations
24### Deprecations
22
25
core/src/Streamly/Internal/Serialize/FromBytes.hs → core/src/Streamly/Internal/Data/Serialize/Parser.hsrenamed+2−2
@@ -1,5 +1,5 @@
1-- |
1-- |
2−-- Module : Streamly.Internal.Serialize.FromBytes
2+-- Module : Streamly.Internal.Data.Serialize.Parser
3-- Copyright : (c) 2020 Composewell Technologies
3-- Copyright : (c) 2020 Composewell Technologies
4-- License : BSD-3-Clause
4-- License : BSD-3-Clause
5-- Maintainer : streamly@composewell.com
5-- Maintainer : streamly@composewell.com
@@ -7,7 +7,7 @@
7--
7--
8-- Decode Haskell data types from byte streams.
8-- Decode Haskell data types from byte streams.
9
9
10−module Streamly.Internal.Serialize.FromBytes
10+module Streamly.Internal.Data.Serialize.Parser
11 (
11 (
12 -- * Type class
12 -- * Type class
13 FromBytes (..)
13 FromBytes (..)
core/src/Streamly/Internal/Serialize/ToBytes.hs → core/src/Streamly/Internal/Data/Serialize/Stream.hsrenamed+2−2
@@ -1,5 +1,5 @@
1-- |
1-- |
2−-- Module : Streamly.Internal.Serialize.ToBytes
2+-- Module : Streamly.Internal.Data.Serialize.Stream
3-- Copyright : (c) 2022 Composewell Technologies
3-- Copyright : (c) 2022 Composewell Technologies
4-- License : BSD-3-Clause
4-- License : BSD-3-Clause
5-- Maintainer : streamly@composewell.com
5-- Maintainer : streamly@composewell.com
@@ -17,7 +17,7 @@
17
17
18-- XXX remove unit, bool, ordering, and the type class as well
18-- XXX remove unit, bool, ordering, and the type class as well
19
19
20−module Streamly.Internal.Serialize.ToBytes
20+module Streamly.Internal.Data.Serialize.Stream
21 (
21 (
22 -- * Type class
22 -- * Type class
23 ToBytes (..)
23 ToBytes (..)
core/streamly-core.cabal+2−4
@@ -299,6 +299,8 @@ library
299 , Streamly.Internal.Data.Serialize.TH.RecHeader
299 , Streamly.Internal.Data.Serialize.TH.RecHeader
300 , Streamly.Internal.Data.Serialize.TH.Common
300 , Streamly.Internal.Data.Serialize.TH.Common
301 , Streamly.Internal.Data.Serialize.TH.Bottom
301 , Streamly.Internal.Data.Serialize.TH.Bottom
302+ , Streamly.Internal.Data.Serialize.Parser
303+ , Streamly.Internal.Data.Serialize.Stream
302
304
303 -- Unboxed IORef
305 -- Unboxed IORef
304 , Streamly.Internal.Data.IORef.Unboxed
306 , Streamly.Internal.Data.IORef.Unboxed
@@ -331,10 +333,6 @@ library
331 , Streamly.Internal.Data.Array
333 , Streamly.Internal.Data.Array
332 , Streamly.Internal.Data.Stream.MutChunked
334 , Streamly.Internal.Data.Stream.MutChunked
333
335
334− -- streamly-serde
335− , Streamly.Internal.Serialize.FromBytes
336− , Streamly.Internal.Serialize.ToBytes
337−
338 -- streamly-unicode-core
336 -- streamly-unicode-core
339 , Streamly.Internal.Unicode.Stream
337 , Streamly.Internal.Unicode.Stream
340 , Streamly.Internal.Unicode.String
338 , Streamly.Internal.Unicode.String
test/Streamly/Test/Serialize/Serializable.hs+2−2
@@ -10,8 +10,8 @@ import Test.QuickCheck
10 )
10 )
11import Test.QuickCheck.Monadic (monadicIO)
11import Test.QuickCheck.Monadic (monadicIO)
12
12
13−import qualified Streamly.Internal.Serialize.FromBytes as Decoder
13+import qualified Streamly.Internal.Data.Serialize.Parser as Decoder
14−import qualified Streamly.Internal.Serialize.ToBytes as Encoder
14+import qualified Streamly.Internal.Data.Serialize.Stream as Encoder
15import qualified Streamly.Data.Stream as Stream
15import qualified Streamly.Data.Stream as Stream
16import Streamly.Internal.Data.Parser (Parser)
16import Streamly.Internal.Data.Parser (Parser)
17
17