← All packages

bytestring0.12.2.0

Fast, compact, strict and lazy byte strings with a list interface

Open the imported Cabal file ↗

author
Don Stewart, Duncan Coutts
bug-reports
https://github.com/haskell/bytestring/issues
build-type
Simple
cabal-version
2.2
category
Data
copyright
Copyright (c) Don Stewart 2005-2009, (c) Duncan Coutts 2006-2015, (c) David Roundy 2003-2005, (c) Jasper Van der Jeugt 2010, (c) Simon Meier 2010-2013.
extra-source-files
README.md Changelog.md include/bytestring-cpp-macros.h
homepage
https://github.com/haskell/bytestring
license
BSD-3-Clause
license-file
LICENSE
maintainer
Haskell Bytestring Team <andrew.lelechenko@gmail.com>, Core Libraries Committee
name
bytestring
synopsis
Fast, compact, strict and lazy byte strings with a list interface
tested-with
GHC==9.10.1, GHC==9.8.2, GHC==9.6.5, GHC==9.4.8, GHC==9.2.8, GHC==9.0.2, GHC==8.10.7, GHC==8.8.4, GHC==8.6.5, GHC==8.4.4
version
0.12.2.0
x-revision
1
Show the complete metadata as JSON
{
  "schemaVersion": 1,
  "name": "bytestring",
  "version": "0.12.2.0",
  "cabalVersion": "2.2",
  "buildType": "Simple",
  "fields": {
    "author": [
      "Don Stewart,\nDuncan Coutts"
    ],
    "bug-reports": [
      "https://github.com/haskell/bytestring/issues"
    ],
    "build-type": [
      "Simple"
    ],
    "cabal-version": [
      "2.2"
    ],
    "category": [
      "Data"
    ],
    "copyright": [
      "Copyright (c) Don Stewart          2005-2009,\n(c) Duncan Coutts        2006-2015,\n(c) David Roundy         2003-2005,\n(c) Jasper Van der Jeugt 2010,\n(c) Simon Meier          2010-2013."
    ],
    "description": [
      "An efficient compact, immutable byte string type (both strict and lazy)\nsuitable for binary or 8-bit character data.\n.\nThe 'ByteString' type represents sequences of bytes or 8-bit characters.\nIt is suitable for high performance use, both in terms of large data\nquantities, or high speed requirements. The 'ByteString' functions follow\nthe same style as Haskell\\'s ordinary lists, so it is easy to convert code\nfrom using 'String' to 'ByteString'.\n.\nTwo 'ByteString' variants are provided:\n.\n* Strict 'ByteString's keep the string as a single large array. This\nmakes them convenient for passing data between C and Haskell.\n.\n* Lazy 'ByteString's use a lazy list of strict chunks which makes it\nsuitable for I\\/O streaming tasks.\n.\nThe @Char8@ modules provide a character-based view of the same\nunderlying 'ByteString' types. This makes it convenient to handle mixed\nbinary and 8-bit character content (which is common in many file formats\nand network protocols).\n.\nThe 'Builder' module provides an efficient way to build up 'ByteString's\nin an ad-hoc way by repeated concatenation. This is ideal for fast\nserialisation or pretty printing.\n.\nThere is also a 'ShortByteString' type which has a lower memory overhead\nand can be converted to or from a 'ByteString'. It is suitable for keeping\nmany short strings in memory, especially long-term, without incurring any\npossible heap fragmentation costs.\n.\n'ByteString's are not designed for Unicode. For Unicode strings you should\nuse the 'Text' type from the @text@ package.\n.\nThese modules are intended to be imported qualified, to avoid name clashes\nwith \"Prelude\" functions, e.g.\n.\n> import qualified Data.ByteString as BS"
    ],
    "extra-source-files": [
      "README.md Changelog.md include/bytestring-cpp-macros.h"
    ],
    "homepage": [
      "https://github.com/haskell/bytestring"
    ],
    "license": [
      "BSD-3-Clause"
    ],
    "license-file": [
      "LICENSE"
    ],
    "maintainer": [
      "Haskell Bytestring Team <andrew.lelechenko@gmail.com>, Core Libraries Committee"
    ],
    "name": [
      "bytestring"
    ],
    "synopsis": [
      "Fast, compact, strict and lazy byte strings with a list interface"
    ],
    "tested-with": [
      "GHC==9.10.1,\nGHC==9.8.2,\nGHC==9.6.5,\nGHC==9.4.8,\nGHC==9.2.8,\nGHC==9.0.2,\nGHC==8.10.7,\nGHC==8.8.4,\nGHC==8.6.5,\nGHC==8.4.4"
    ],
    "version": [
      "0.12.2.0"
    ],
    "x-revision": [
      "1"
    ]
  },
  "components": [
    {
      "kind": "library",
      "name": "main",
      "tree": {
        "data": {
          "buildable": null,
          "exposedModules": [
            "Data.ByteString",
            "Data.ByteString.Char8",
            "Data.ByteString.Unsafe",
            "Data.ByteString.Internal",
            "Data.ByteString.Lazy",
            "Data.ByteString.Lazy.Char8",
            "Data.ByteString.Lazy.Internal",
            "Data.ByteString.Short",
            "Data.ByteString.Short.Internal",
            "Data.ByteString.Builder",
            "Data.ByteString.Builder.Extra",
            "Data.ByteString.Builder.Prim",
            "Data.ByteString.Builder.RealFloat",
            "Data.ByteString.Builder.Internal",
            "Data.ByteString.Builder.Prim.Internal"
          ],
          "otherModules": [
            "Data.ByteString.Builder.ASCII",
            "Data.ByteString.Builder.Prim.ASCII",
            "Data.ByteString.Builder.Prim.Binary",
            "Data.ByteString.Builder.Prim.Internal.Base16",
            "Data.ByteString.Builder.Prim.Internal.Floating",
            "Data.ByteString.Builder.RealFloat.F2S",
            "Data.ByteString.Builder.RealFloat.D2S",
            "Data.ByteString.Builder.RealFloat.Internal",
            "Data.ByteString.Builder.RealFloat.TableGenerator",
            "Data.ByteString.Internal.Type",
            "Data.ByteString.Lazy.ReadInt",
            "Data.ByteString.Lazy.ReadNat",
            "Data.ByteString.ReadInt",
            "Data.ByteString.ReadNat",
            "Data.ByteString.Utils.ByteOrder",
            "Data.ByteString.Utils.UnalignedAccess"
          ],
          "dependencies": [
            {
              "package": "base",
              "range": ">=4.11 && <5",
              "libraries": [
                "main"
              ]
            },
            {
              "package": "ghc-prim",
              "range": "-any",
              "libraries": [
                "main"
              ]
            },
            {
              "package": "deepseq",
              "range": "-any",
              "libraries": [
                "main"
              ]
            },
            {
              "package": "template-haskell",
              "range": "-any",
              "libraries": [
                "main"
              ]
            }
          ],
          "fields": {}
        },
        "branches": [
          {
            "condition": {
              "compiler": "ghc",
              "range": "<9.4"
            },
            "then": {
              "data": {
                "buildable": null,
                "exposedModules": [],
                "otherModules": [],
                "dependencies": [
                  {
                    "package": "data-array-byte",
                    "range": ">=0.1 && <0.2",
                    "libraries": [
                      "main"
                    ]
                  }
                ],
                "fields": {}
              },
              "branches": []
            },
            "else": null
          },
          {
            "condition": {
              "or": [
                {
                  "arch": "javascript"
                },
                {
                  "flag": "pure-haskell"
                }
              ]
            },
            "then": {
              "data": {
                "buildable": null,
                "exposedModules": [],
                "otherModules": [
                  "Data.ByteString.Internal.Pure"
                ],
                "dependencies": [
                  {
                    "package": "base",
                    "range": ">=4.18 && <5",
                    "libraries": [
                      "main"
                    ]
                  }
                ],
                "fields": {}
              },
              "branches": []
            },
            "else": {
              "data": {
                "buildable": null,
                "exposedModules": [],
                "otherModules": [],
                "dependencies": [],
                "fields": {}
              },
              "branches": [
                {
                  "condition": {
                    "arch": "aarch64"
                  },
                  "then": {
                    "data": {
                      "buildable": null,
                      "exposedModules": [],
                      "otherModules": [],
                      "dependencies": [],
                      "fields": {}
                    },
                    "branches": []
                  },
                  "else": {
                    "data": {
                      "buildable": null,
                      "exposedModules": [],
                      "otherModules": [],
                      "dependencies": [],
                      "fields": {}
                    },
                    "branches": []
                  }
                },
                {
                  "condition": {
                    "and": [
                      {
                        "os": "windows"
                      },
                      {
                        "compiler": "ghc",
                        "range": "<9.3"
                      }
                    ]
                  },
                  "then": {
                    "data": {
                      "buildable": null,
                      "exposedModules": [],
                      "otherModules": [],
                      "dependencies": [],
                      "fields": {
                        "extra-libraries": [
                          "gcc"
                        ]
                      }
                    },
                    "branches": []
                  },
                  "else": null
                }
              ]
            }
          },
          {
            "condition": {
              "arch": "aarch64"
            },
            "then": {
              "data": {
                "buildable": null,
                "exposedModules": [],
                "otherModules": [],
                "dependencies": [
                  {
                    "package": "base",
                    "range": ">=4.17.2 && <4.18 || >=4.18.1",
                    "libraries": [
                      "main"
                    ]
                  }
                ],
                "fields": {}
              },
              "branches": []
            },
            "else": null
          }
        ]
      }
    },
    {
      "kind": "test-suite",
      "name": "bytestring-tests",
      "tree": {
        "data": {
          "buildable": null,
          "exposedModules": [],
          "otherModules": [
            "Builder",
            "Data.ByteString.Builder.Prim.TestUtils",
            "Data.ByteString.Builder.Prim.Tests",
            "Data.ByteString.Builder.Tests",
            "IsValidUtf8",
            "LazyHClose",
            "Lift",
            "Properties",
            "Properties.ByteString",
            "Properties.ByteStringChar8",
            "Properties.ByteStringLazy",
            "Properties.ByteStringLazyChar8",
            "Properties.ShortByteString",
            "QuickCheckUtils"
          ],
          "dependencies": [
            {
              "package": "base",
              "range": "-any",
              "libraries": [
                "main"
              ]
            },
            {
              "package": "bytestring",
              "range": "-any",
              "libraries": [
                "main"
              ]
            },
            {
              "package": "deepseq",
              "range": "-any",
              "libraries": [
                "main"
              ]
            },
            {
              "package": "QuickCheck",
              "range": "<2.17",
              "libraries": [
                "main"
              ]
            },
            {
              "package": "tasty",
              "range": "-any",
              "libraries": [
                "main"
              ]
            },
            {
              "package": "tasty-quickcheck",
              "range": ">=0.8.1",
              "libraries": [
                "main"
              ]
            },
            {
              "package": "template-haskell",
              "range": "-any",
              "libraries": [
                "main"
              ]
            },
            {
              "package": "transformers",
              "range": ">=0.3",
              "libraries": [
                "main"
              ]
            },
            {
              "package": "syb",
              "range": "-any",
              "libraries": [
                "main"
              ]
            }
          ],
          "fields": {
            "type": [
              "exitcode-stdio-1.0"
            ]
          }
        },
        "branches": [
          {
            "condition": {
              "not": {
                "arch": "wasm32"
              }
            },
            "then": {
              "data": {
                "buildable": null,
                "exposedModules": [],
                "otherModules": [],
                "dependencies": [],
                "fields": {}
              },
              "branches": []
            },
            "else": null
          }
        ]
      }
    },
    {
      "kind": "benchmark",
      "name": "bytestring-bench",
      "tree": {
        "data": {
          "buildable": null,
          "exposedModules": [],
          "otherModules": [
            "BenchBoundsCheckFusion",
            "BenchCount",
            "BenchCSV",
            "BenchIndices",
            "BenchReadInt",
            "BenchShort"
          ],
          "dependencies": [
            {
              "package": "base",
              "range": "-any",
              "libraries": [
                "main"
              ]
            },
            {
              "package": "bytestring",
              "range": "-any",
              "libraries": [
                "main"
              ]
            },
            {
              "package": "deepseq",
              "range": "-any",
              "libraries": [
                "main"
              ]
            },
            {
              "package": "tasty-bench",
              "range": "-any",
              "libraries": [
                "main"
              ]
            },
            {
              "package": "random",
              "range": "-any",
              "libraries": [
                "main"
              ]
            }
          ],
          "fields": {
            "type": [
              "exitcode-stdio-1.0"
            ]
          }
        },
        "branches": [
          {
            "condition": {
              "compiler": "ghc",
              "range": ">=8.6"
            },
            "then": {
              "data": {
                "buildable": null,
                "exposedModules": [],
                "otherModules": [],
                "dependencies": [],
                "fields": {}
              },
              "branches": []
            },
            "else": null
          }
        ]
      }
    }
  ],
  "setupDependencies": [],
  "flags": [
    {
      "name": "pure-haskell",
      "default": false,
      "manual": true,
      "description": "Don't use bytestring's standard C routines\nWhen this flag is true, bytestring will use pure Haskell variants (no C FFI)\nof the internal functions. This is not recommended except in use cases that\ncannot (or do not) depend on C, such as with GHC's JavaScript backend."
    }
  ],
  "sourceRepositories": [
    {
      "kind": "head",
      "fields": {
        "location": [
          "https://github.com/haskell/bytestring"
        ],
        "type": [
          "git"
        ]
      }
    }
  ],
  "warnings": [],
  "sourceUrl": "https://hackage.haskell.org/package/bytestring-0.12.2.0/bytestring.cabal",
  "sha256": "a492e16044599fd0cefc5a078a932688f994fead831ea976fb9332dbb9445b19",
  "importedAt": "2026-10-04T10:01:23.003Z",
  "dependencies": [
    {
      "package": "base",
      "range": ">=4.11 && <5",
      "libraries": [
        "main"
      ],
      "component": "library:main",
      "conditions": []
    },
    {
      "package": "ghc-prim",
      "range": "-any",
      "libraries": [
        "main"
      ],
      "component": "library:main",
      "conditions": []
    },
    {
      "package": "deepseq",
      "range": "-any",
      "libraries": [
        "main"
      ],
      "component": "library:main",
      "conditions": []
    },
    {
      "package": "template-haskell",
      "range": "-any",
      "libraries": [
        "main"
      ],
      "component": "library:main",
      "conditions": []
    },
    {
      "package": "data-array-byte",
      "range": ">=0.1 && <0.2",
      "libraries": [
        "main"
      ],
      "component": "library:main",
      "conditions": [
        {
          "compiler": "ghc",
          "range": "<9.4"
        }
      ]
    },
    {
      "package": "base",
      "range": ">=4.18 && <5",
      "libraries": [
        "main"
      ],
      "component": "library:main",
      "conditions": [
        {
          "or": [
            {
              "arch": "javascript"
            },
            {
              "flag": "pure-haskell"
            }
          ]
        }
      ]
    },
    {
      "package": "base",
      "range": ">=4.17.2 && <4.18 || >=4.18.1",
      "libraries": [
        "main"
      ],
      "component": "library:main",
      "conditions": [
        {
          "arch": "aarch64"
        }
      ]
    },
    {
      "package": "base",
      "range": "-any",
      "libraries": [
        "main"
      ],
      "component": "test-suite:bytestring-tests",
      "conditions": []
    },
    {
      "package": "bytestring",
      "range": "-any",
      "libraries": [
        "main"
      ],
      "component": "test-suite:bytestring-tests",
      "conditions": []
    },
    {
      "package": "deepseq",
      "range": "-any",
      "libraries": [
        "main"
      ],
      "component": "test-suite:bytestring-tests",
      "conditions": []
    },
    {
      "package": "QuickCheck",
      "range": "<2.17",
      "libraries": [
        "main"
      ],
      "component": "test-suite:bytestring-tests",
      "conditions": []
    },
    {
      "package": "tasty",
      "range": "-any",
      "libraries": [
        "main"
      ],
      "component": "test-suite:bytestring-tests",
      "conditions": []
    },
    {
      "package": "tasty-quickcheck",
      "range": ">=0.8.1",
      "libraries": [
        "main"
      ],
      "component": "test-suite:bytestring-tests",
      "conditions": []
    },
    {
      "package": "template-haskell",
      "range": "-any",
      "libraries": [
        "main"
      ],
      "component": "test-suite:bytestring-tests",
      "conditions": []
    },
    {
      "package": "transformers",
      "range": ">=0.3",
      "libraries": [
        "main"
      ],
      "component": "test-suite:bytestring-tests",
      "conditions": []
    },
    {
      "package": "syb",
      "range": "-any",
      "libraries": [
        "main"
      ],
      "component": "test-suite:bytestring-tests",
      "conditions": []
    },
    {
      "package": "base",
      "range": "-any",
      "libraries": [
        "main"
      ],
      "component": "benchmark:bytestring-bench",
      "conditions": []
    },
    {
      "package": "bytestring",
      "range": "-any",
      "libraries": [
        "main"
      ],
      "component": "benchmark:bytestring-bench",
      "conditions": []
    },
    {
      "package": "deepseq",
      "range": "-any",
      "libraries": [
        "main"
      ],
      "component": "benchmark:bytestring-bench",
      "conditions": []
    },
    {
      "package": "tasty-bench",
      "range": "-any",
      "libraries": [
        "main"
      ],
      "component": "benchmark:bytestring-bench",
      "conditions": []
    },
    {
      "package": "random",
      "range": "-any",
      "libraries": [
        "main"
      ],
      "component": "benchmark:bytestring-bench",
      "conditions": []
    }
  ],
  "exposedModules": [
    "Data.ByteString",
    "Data.ByteString.Char8",
    "Data.ByteString.Unsafe",
    "Data.ByteString.Internal",
    "Data.ByteString.Lazy",
    "Data.ByteString.Lazy.Char8",
    "Data.ByteString.Lazy.Internal",
    "Data.ByteString.Short",
    "Data.ByteString.Short.Internal",
    "Data.ByteString.Builder",
    "Data.ByteString.Builder.Extra",
    "Data.ByteString.Builder.Prim",
    "Data.ByteString.Builder.RealFloat",
    "Data.ByteString.Builder.Internal",
    "Data.ByteString.Builder.Prim.Internal"
  ],
  "documents": {
    "readme": {
      "status": "available",
      "sha256": "5c5d324bada418c29302cff4a4930890084869d3d79787734fcd1e941dba2e40",
      "error": null,
      "checkedAt": "2026-10-04T10:01:23.969Z"
    },
    "changelog": {
      "status": "available",
      "sha256": "315687eb18bef59e55048962d048886b9c71e7dbabf6e4e0d69b436a78ca7b94",
      "error": null,
      "checkedAt": "2026-10-04T10:01:23.874Z"
    }
  },
  "versions": [
    {
      "version": "0.12.2.0",
      "imported_at": "2026-10-04T10:01:23.003Z"
    }
  ]
}

Import a package

Enter a package name and an exact version from Hackage. The site contains imported versions only.