@@ -226,8 +226,9 @@ unpin arr@(MutableByteArray marr#) =
226226-- deserializes the boxed type from the mutable byte array. The write operation
227227-- 'pokeByteIndex' serializes the boxed type to the mutable byte array.
228228--
229−-- Instances can be derived via 'Generic'. Here is an example, for deriving an
230−-- instance of this type class.
229+-- Instances can be derived via 'Generic'. Note that the data type must be
230+-- non-recursive. Here is an example, for deriving an instance of this type
231+-- class.
231232--
232233-- >>> import GHC.Generics (Generic)
233234-- >>> :{
@@ -237,6 +238,8 @@ unpin arr@(MutableByteArray marr#) =
237238-- } deriving Generic
238239-- :}
239240--
241+-- WARNING! Generic deriving hangs for recursive data types.
242+--
240243-- >>> import Streamly.Data.Array (Unbox(..))
241244-- >>> instance Unbox Object
242245--
@@ -255,7 +258,7 @@ unpin arr@(MutableByteArray marr#) =
255258-- :}
256259--
257260class Unbox a where
258− -- | Get the size.
261+ -- | Get the size. Size cannot be zero.
259262 sizeOf :: Proxy a -> Int
260263
261264 default sizeOf :: (SizeOfRep (Rep a)) => Proxy a -> Int