Skip to content

Commit

Permalink
Improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Bodigrim committed Oct 7, 2022
1 parent 64782d1 commit 55d6615
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Data/ByteString/Short/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 #-}
Expand Down

0 comments on commit 55d6615

Please sign in to comment.