@@ -6,10 +6,14 @@
66-- Stability : pre-release
77-- Portability : GHC
88--
9−-- Parsers for binary encoded basic Haskell data types.
9+-- Decode Haskell data types from byte streams.
1010
1111module Streamly.Internal.Serialize.FromBytes
12− ( FromBytes (..)
12+ (
13+ -- * Type class
14+ FromBytes (..)
15+
16+ -- * Decoders
1317 , unit
1418 , bool
1519 , ordering
@@ -40,6 +44,11 @@ import qualified Streamly.Internal.Data.Parser as PR
4044import qualified Streamly.Internal.Data.Parser.ParserD as PRD
4145 (Parser(..), Initial(..), Step(..), toParserK)
4246
47+-- Note: The () type does not need to have an on-disk representation in theory.
48+-- But we use a concrete representation for it so that we count how many ()
49+-- types we have. Or when we have an array of units the array a concrete
50+-- length.
51+
4352-- | A value of type '()' is encoded as @0@ in binary encoding.
4453--
4554-- @