cabal-version: 2.4 name: defun version: 0.1 license: BSD-3-Clause license-file: LICENSE author: Oleg Grenrus maintainer: Oleg Grenrus category: Data build-type: Simple extra-doc-files: CHANGELOG.md tested-with: GHC ==9.2.8 || ==9.4.8 || ==9.6.3 || ==9.8.1 synopsis: Defunctionalization helpers description: The package @defun@ provides defunctionalization helpers, most importantly type family 'DeFun.Core.App' allowing to write higher-order type families. The @singletons@ package also has its own type family @Apply@, but the machinery is tied to the @Sing@ / singletons. . Once @UnsaturatedTypeFamilies@ extension is implemented in GHC ([Proposal 242](https://github.com/ghc-proposals/ghc-proposals/pull/242)), this package will become more or less obsolete. . In particular, the @Lam@ counterpart @SLambda@ is specialized to @Sing@ arguments. The @defun@'s @Lam@ is however fully general, so you can use your own singletons or (importantly) singleton-like arguments. . The package provides few defunctionalized functions, and their term-level reflections using @SBool@ and @NP@ data types from @singletons-bool@ and @sop-core@ packages respectively. . This is the "batteries-included" variant with "many" dependencies; see the @defun-core@ package and other @defun-*@ dependencies if you need a more limited dependency footprint. . The [first-class-families](https://hackage.haskell.org/package/first-class-families) package has slightly different design, in particular it doesn't reuse existing (nor define) own standalone type families. In @first-class-families@ everything has to be evaluated via its @Eval@ type family (which job is similar to @App@), but @defun@ only makes /higher-order/ type families look different. In short, ergonomics are a bit different. source-repository head type: git location: https://github.com/phadej/defun.git subdir: defun common language default-language: Haskell2010 default-extensions: DataKinds EmptyCase GADTs KindSignatures NoImplicitPrelude PatternSynonyms PolyKinds RankNTypes ScopedTypeVariables StandaloneKindSignatures TypeApplications TypeFamilies TypeOperators UndecidableInstances ViewPatterns library import: language hs-source-dirs: src exposed-modules: DeFun build-depends: , defun-bool >=0.1 && <0.1.1 , defun-core >=0.1 && <0.1.1 , defun-sop >=0.1 && <0.1.1 x-docspec-extra-packages: base x-docspec-options: -XDataKinds -XGADTs -XStandaloneDeriving test-suite defun-tests import: language type: exitcode-stdio-1.0 hs-source-dirs: test main-is: defun-tests.hs build-depends: , base <5 , defun , sop-core