Skip to content

Commit 55d6615

Browse files
committed
Improve documentation
1 parent 64782d1 commit 55d6615

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Data/ByteString/Short/Internal.hs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,14 @@ import qualified Language.Haskell.TH.Syntax as TH
280280
-- 'ByteString' (at the cost of copying the string data). It supports very few
281281
-- other operations.
282282
--
283-
newtype ShortByteString = ShortByteString { unShortByteString :: ByteArray }
283+
newtype ShortByteString = ShortByteString
284+
{ unShortByteString :: ByteArray
285+
-- ^ @since 0.12.0.0
286+
}
284287
deriving (Eq, Semigroup, Monoid, TH.Lift, Data, NFData)
285288

289+
-- | Prior to @bytestring-0.12@ 'SBS' was a genuine constructor of 'ShortByteString',
290+
-- but now it is a bundled pattern synonym, provided as a compatibility shim.
286291
pattern SBS :: ByteArray# -> ShortByteString
287292
pattern SBS x = ShortByteString (ByteArray x)
288293
{-# COMPLETE SBS #-}

0 commit comments

Comments
 (0)