Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add StrictByteString & LazyByteString type aliases #378

Merged
merged 1 commit into from
Mar 19, 2021

Conversation

Kleidukos
Copy link
Member

cc @Bodigrim

closes #375

Copy link
Member

@sjakobi sjakobi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! :)

The type synonyms should be exported from Data.ByteString and Data.ByteString.Lazy. I think the definitions could also be in these public modules, but this probably doesn't matter as much.

@Kleidukos
Copy link
Member Author

No, you're right, this is an oversight from my part

@Kleidukos
Copy link
Member Author

@sjakobi Should be good!

Data/ByteString.hs Outdated Show resolved Hide resolved
Copy link
Member

@sjakobi sjakobi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@@ -80,6 +81,9 @@ data ByteString = Empty | Chunk {-# UNPACK #-} !S.ByteString ByteString
deriving (Typeable)
-- See 'invariant' function later in this module for internal invariants.

-- | Type synonym for the lazy flavour of ByteString
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
-- | Type synonym for the lazy flavour of ByteString
-- | Type synonym for the lazy flavour of 'ByteString'.

And same for the strict one, please.

@@ -40,8 +40,9 @@

module Data.ByteString (

-- * The @ByteString@ type
-- * The strict @ByteString@ type and its associated type alias
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid this is too long for a side bar table of contents in Haddock, it takes 5 lines.

Suggested change
-- * The strict @ByteString@ type and its associated type alias
-- * Strict @ByteString@

@sjakobi sjakobi merged commit ba3046d into haskell:master Mar 19, 2021
@sjakobi
Copy link
Member

sjakobi commented Mar 19, 2021

Thank you, @Kleidukos! :)

@Bodigrim Bodigrim added this to the 0.11.2.0 milestone Mar 20, 2021
Bodigrim pushed a commit to Bodigrim/bytestring that referenced this pull request May 16, 2021
noughtmare pushed a commit to noughtmare/bytestring that referenced this pull request Dec 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Strictness and laziness ergonomics
3 participants