packages feed

lazy-bracket-0.1.0.0: lazy-bracket.cabal

cabal-version:       3.0

name:                lazy-bracket
version:             0.1.0.0
synopsis:            A bracket with lazy resource allocation.
description:         A version of bracket which returns a lazily allocated
                     resource. The allocation happens when (if) the resource 
                     is accessed for the first time.

                     Some control operations can be stashed and applied once the
                     resource is allocated, or skipped altogether if the
                     resource is never allocated.
license:             BSD-3-Clause
license-file:        LICENSE
author:              Daniel Diaz
maintainer:          diaz_carrete@yahoo.com
category:            Control
extra-source-files:  CHANGELOG.md, README.md

source-repository    head
  type:     git
  location: https://github.com/danidiaz/lazy-bracket.git

common common
  build-depends:       base >=4.10.0.0 && < 5,
                       exceptions ^>= 0.10,
  default-language:    Haskell2010

library
  import: common
  exposed-modules:     LazyBracket
  hs-source-dirs:      lib 

test-suite test
  import: common
  type:                exitcode-stdio-1.0
  hs-source-dirs:      test
  main-is:             tests.hs
  build-depends:       
    lazy-bracket,
    tasty              >= 1.3.1,
    tasty-hunit        >= 0.10.0.2,

-- VERY IMPORTANT for doctests to work: https://stackoverflow.com/a/58027909/1364288
-- http://hackage.haskell.org/package/cabal-doctest
test-suite doctests
  import:              common
  ghc-options:         -threaded
  type:                exitcode-stdio-1.0
  hs-source-dirs:      test
  main-is:             doctests.hs
  build-depends:       
                       lazy-bracket, 
                       doctest            ^>= 0.20,