1

There are several identifiers in WAI containing "LBS":

  • Network.Wai.responseLBS:: Status -> ResponseHeaders -> ByteString -> Response

  • -- | Store uploaded files in memory
    lbsBackEnd:: Monad m => ignored1 -> ignored2 -> m S.ByteString -> m L.ByteString

I can't find anything in the WAI documentation that mentions "LBS". What does it mean?

Chris Martin
  • 30,334
  • 10
  • 78
  • 137
  • 4
    My guess would be "lazy ByteString". – Derek Elkins left SE Mar 07 '16 at 01:05
  • It is almost definitely what @DerekElkins said.... If you go to the hackage documentation, you can see that the input param is a lazy Bytestring https://hackage.haskell.org/package/wai-3.0.5.0/docs/Network-Wai.html#t:Response, whereas there are other functions that create responses from non-lazy Bytestrings. – jamshidh Mar 07 '16 at 01:09

1 Answers1

3

From the Hackage documentation:

The overriding design principles here are performance and generality. To address performance, this library is built on top of the conduit and blaze-builder packages. The advantages of conduits over lazy IO have been debated elsewhere and so will not be addressed here. However, helper functions like responseLBS allow you to continue using lazy IO if you so desire.

so, yes, LBS does stand for Lazy ByteString.

Cactus
  • 27,075
  • 9
  • 69
  • 149
jamshidh
  • 12,002
  • 17
  • 31