symmetric-list-0.1.0.0: symmetric-list.cabal
cabal-version: 3.0
name: symmetric-list
version: 0.1.0.0
synopsis: Lists with efficient access to both ends
description:
A symmetric list stores its elements split between a front list and a
reversed back list, giving amortized \(\mathcal{O}(1)\) access to both
ends of the sequence.
Compared to ordinary Haskell lists, operations on the end of the list
(@snoc@, @last@, @init@, @unsnoc@), as well as @reverse@ and @length@,
run in constant (amortized) time, while keeping an interface close to
"Data.List".
The main module is "Data.SymmetricList", designed to be imported
qualified:
> import Data.SymmetricList (SymmetricList)
> import qualified Data.SymmetricList as SymmetricList
"Data.SymmetricList.Internal" exposes the underlying representation and
makes no API stability guarantees.
homepage: https://github.com/nahuel-merlo/symmetric-list-haskell
bug-reports: https://github.com/nahuel-merlo/symmetric-list-haskell/issues
license: BSD-3-Clause
license-file: LICENSE
author: nahuel-merlo
maintainer: n.peraza04@gmail.com
copyright: (c) 2026 nahuel-merlo
category: Data, Data Structures
build-type: Simple
tested-with: GHC == 9.10.3
extra-doc-files:
README.md
CHANGELOG.md
source-repository head
type: git
location: https://github.com/nahuel-merlo/symmetric-list-haskell.git
common warnings
ghc-options: -Wall
library
import: warnings
exposed-modules: Data.SymmetricList
Data.SymmetricList.Internal
build-depends:
base >= 4.19 && < 4.22,
deepseq >= 1.4 && < 1.6
hs-source-dirs: src
default-language: Haskell2010
test-suite symmetric-list-test
import: warnings
default-language: Haskell2010
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Main.hs
build-depends:
base,
symmetric-list,
hspec >= 2.10 && < 2.12,
QuickCheck >= 2.14 && < 2.19
benchmark symmetric-list-bench
import: warnings
default-language: Haskell2010
type: exitcode-stdio-1.0
hs-source-dirs: bench
main-is: Bench.hs
ghc-options: -rtsopts -with-rtsopts=-A32m
build-depends:
base,
symmetric-list,
tasty-bench >= 0.3 && < 0.6,
deepseq