From a819eb7e5d01c3879ea2af79282070c141daa154 Mon Sep 17 00:00:00 2001 From: Harendra Kumar Date: Sat, 19 Aug 2023 07:54:08 +0530 Subject: [PATCH] Add some module level notes to ToBytes --- core/src/Streamly/Internal/Serialize/ToBytes.hs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/src/Streamly/Internal/Serialize/ToBytes.hs b/core/src/Streamly/Internal/Serialize/ToBytes.hs index fa357345e5..92593d8845 100644 --- a/core/src/Streamly/Internal/Serialize/ToBytes.hs +++ b/core/src/Streamly/Internal/Serialize/ToBytes.hs @@ -6,6 +6,16 @@ -- Portability : GHC -- -- Encode Haskell data types to byte streams. +-- +-- The primary purpose of this module is to serialize primitive Haskell types +-- to streams for convenient byte by byte processing when such a need arises. +-- +-- It would be inefficient to use this to build byte streams from algebraic +-- data types. For general serialization of ADTs please use the Serialize type +-- class instances. The fastest way to convert general Haskell types to byte +-- streams is to serialize them to an array and then stream the array. + +-- XXX remove unit, bool, ordering, and the type class as well module Streamly.Internal.Serialize.ToBytes (