From 405b25f258b76d911beceb323513b8d9b26bfc95 Mon Sep 17 00:00:00 2001 From: Bodigrim Date: Fri, 7 Oct 2022 22:42:48 +0100 Subject: [PATCH] Improve documentation --- Data/ByteString/Short/Internal.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Data/ByteString/Short/Internal.hs b/Data/ByteString/Short/Internal.hs index 5283a6731..f4aff9d59 100644 --- a/Data/ByteString/Short/Internal.hs +++ b/Data/ByteString/Short/Internal.hs @@ -280,9 +280,15 @@ import qualified Language.Haskell.TH.Syntax as TH -- 'ByteString' (at the cost of copying the string data). It supports very few -- other operations. -- -newtype ShortByteString = ShortByteString { unShortByteString :: ByteArray } +newtype ShortByteString = ShortByteString + -- ^ @since 0.12.0.0 + { unShortByteString :: ByteArray + -- ^ @since 0.12.0.0 + } deriving (Eq, Semigroup, Monoid, TH.Lift, Data, NFData) +-- | Prior to @bytestring-0.12@ 'SBS' was a genuine constructor of 'ShortByteString', +-- but now it is a bundled pattern synonym, provided as a compatibility shim. pattern SBS :: ByteArray# -> ShortByteString pattern SBS x = ShortByteString (ByteArray x) {-# COMPLETE SBS #-}