# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

# ebuild generated by hackport 0.8.5.1.9999

CABAL_HACKAGE_REVISION=1

CABAL_FEATURES="lib profile haddock hoogle hscolour test-suite"
inherit haskell-cabal

DESCRIPTION="Vec: length-indexed (sized) list"
HOMEPAGE="https://github.com/phadej/vec"

LICENSE="BSD"
SLOT="0/${PV}"
KEYWORDS="~amd64"
IUSE="+adjunctions +distributive +semigroupoids"
# Turning on 'adjunctions' without 'distributive' does nothing.
# See <https://hackage.haskell.org/package/vec-0.4.1/revision/1.cabal>
REQUIRED_USE="adjunctions? ( distributive )"

CABAL_CHDEPS=(
	'base          >=4.12.0.0 && <4.21' 'base          >=4.12.0.0'
)

RDEPEND=">=dev-haskell/boring-0.2.2:=[profile?] <dev-haskell/boring-0.3:=[profile?]
	>=dev-haskell/fin-0.3.1:=[profile?] <dev-haskell/fin-0.4:=[profile?]
	>=dev-haskell/indexed-traversable-0.1.4:=[profile?] <dev-haskell/indexed-traversable-0.2:=[profile?]
	>=dev-lang/ghc-9.0.2:=
	>=dev-haskell/hashable-1.4.4.0:=[profile?] <dev-haskell/hashable-1.6:=[profile?]
	>=dev-haskell/quickcheck-2.14.2:=[profile?] <dev-haskell/quickcheck-2.16:=[profile?]
	adjunctions? ( distributive? ( >=dev-haskell/adjunctions-4.4.2:=[profile?] <dev-haskell/adjunctions-4.5:=[profile?] ) )
	distributive? ( >=dev-haskell/distributive-0.6.2:=[profile?] <dev-haskell/distributive-0.7:=[profile?] )
	semigroupoids? ( >=dev-haskell/semigroupoids-6.0.1:=[profile?] <dev-haskell/semigroupoids-6.1:=[profile?] )
"
DEPEND="${RDEPEND}
	>=dev-haskell/cabal-3.4.1.0
	test? ( >=dev-haskell/inspection-testing-0.5.0.3 <dev-haskell/inspection-testing-0.6
		dev-haskell/tagged )
"

src_configure() {
	haskell-cabal_src_configure \
		$(cabal_flag adjunctions adjunctions) \
		$(cabal_flag distributive distributive) \
		$(cabal_flag semigroupoids semigroupoids)
}