From 55d661536572cd47e5943c9a26b7871cda0ffed9 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 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Data/ByteString/Short/Internal.hs b/Data/ByteString/Short/Internal.hs index 5283a6731..d621a49fd 100644 --- a/Data/ByteString/Short/Internal.hs +++ b/Data/ByteString/Short/Internal.hs @@ -280,9 +280,14 @@ 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 + { 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 #-}