cabal-version: 3.0
name: valiant-fused-effects
version: 0.1.0.1
synopsis: Fused-effects adapter for valiant
description:
Provides an @Valiant@ effect and @ValiantPoolC@ carrier for the
@fused-effects@ effect system, enabling compile-time checked SQL
queries as an algebraic effect.
@
import Valiant.FusedEffects
myApp :: Has Valiant sig m => m [User]
myApp = do
users <- fetchAllF listUsers ()
pure users
main :: IO ()
main = do
pool <- newPool defaultPoolConfig { poolConnString = "..." }
result <- runValiantPool pool myApp
print result
@
license: BSD-3-Clause
license-file: LICENSE
author: Josh Burgess
maintainer: joshburgess.webdev@gmail.com
category: Database
homepage: https://github.com/joshburgess/valiant
bug-reports: https://github.com/joshburgess/valiant/issues
build-type: Simple
extra-doc-files:
README.md
CHANGELOG.md
tested-with: GHC ==9.10.3
source-repository head
type: git
location: https://github.com/joshburgess/valiant
subdir: adapters/valiant-fused-effects
flag werror
description: Enable -Werror for development builds.
default: False
manual: True
common warnings
ghc-options: -Wall -Wcompat -Wno-unticked-promoted-constructors -funbox-strict-fields -fspecialise-aggressively
if flag(werror)
ghc-options: -Werror
library
import: warnings
hs-source-dirs: src
default-language: GHC2021
default-extensions:
DerivingStrategies
FlexibleContexts
FlexibleInstances
GADTs
GeneralizedNewtypeDeriving
KindSignatures
LambdaCase
MultiParamTypeClasses
OverloadedStrings
ScopedTypeVariables
StrictData
TypeOperators
UndecidableInstances
exposed-modules:
Valiant.FusedEffects
build-depends:
, base >=4.17 && <5
, fused-effects >=1.1 && <1.3
, valiant >=0.1 && <0.2
, pg-wire >=0.2 && <0.3
test-suite valiant-fused-effects-test
import: warnings
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Main.hs
default-language: GHC2021
default-extensions:
OverloadedStrings
ghc-options: -rtsopts "-with-rtsopts=-K8K"
other-modules:
TestSupport
build-depends:
, base >=4.17 && <5
, bytestring >=0.11 && <0.13
, fused-effects >=1.1 && <1.3
, hspec >=2.11 && <2.13
, valiant
, valiant-fused-effects
, pg-wire
, text >=2.0 && <2.2