packages feed

effectful-websockets-0.1.0.0: effectful-websockets.cabal

cabal-version:   3.12
name:            effectful-websockets
version:         0.1.0.0
synopsis:        WebSocket connections as an Effectful effect
description:
  A WebSocket effect for Effectful: send and receive whole text or binary
  messages, as single actions or as a Streamly stream. The client
  interpreter runs over the streamly-websockets package, keeps the action
  in the calling thread, and watches the connection with pings.

homepage:        https://github.com/GuillaumedeVolpiano/effectful-websockets
license:         BSD-3-Clause
license-file:    LICENSE
author:          Xavier Dectot
maintainer:      Xavier Dectot <xavier@wheredoibegin.fr>
category:        Network, Web, Control
build-type:      Simple
tested-with:     GHC ==9.8.4 || ==9.10.3 || ==9.12.4
extra-doc-files:
  CHANGELOG.md
  README.md

source-repository head
  type:     git
  location: https://github.com/GuillaumedeVolpiano/effectful-websockets.git

common shared
  default-language: GHC2021
  default-extensions:
    DataKinds
    DerivingStrategies
    DisambiguateRecordFields
    ExplicitNamespaces
    GADTs
    LambdaCase
    MonoLocalBinds
    NoFieldSelectors
    OverloadedRecordDot
    OverloadedStrings
    RoleAnnotations
    TypeFamilies

  ghc-options:
    -Wall -Wcompat -Wredundant-constraints -Wmissing-deriving-strategies
    -Wunused-packages

library
  import:          shared
  hs-source-dirs:  src
  exposed-modules:
    Effectful.WebSocket
    Effectful.WebSocket.Client

  build-depends:
    , async                ^>=2.2
    , base                 >=4.19 && <4.22
    , bytestring           ^>=0.12
    , effectful-core       ^>=2.7.1
    , stm                  ^>=2.5
    , streamly-core        ^>=0.3.3
    , streamly-http        ^>=0.1
    , streamly-websockets  ^>=0.1
    , text                 ^>=2.1

test-suite effectful-websockets-test
  import:         shared
  type:           exitcode-stdio-1.0
  hs-source-dirs: test
  main-is:        Main.hs
  ghc-options:    -threaded
  build-depends:
    , async
    , base
    , bytestring
    , effectful            ^>=2.7
    , effectful-core
    , effectful-websockets
    , network              ^>=3.2
    , stm
    , streamly-core
    , streamly-websockets
    , tasty                ^>=1.5
    , tasty-hunit          ^>=0.10