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 405b25f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Data/ByteString/Short/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 #-}
Expand Down

0 comments on commit 405b25f

Please sign in to comment.