datastar-hs-1.0.2.1: datastar-hs.cabal
cabal-version: 3.0
name: datastar-hs
version: 1.0.2.1
synopsis: Haskell bindings for Datastar
description:
Server-side SDK for building real-time hypermedia applications with
<https://data-star.dev/ Datastar>. Stream HTML fragments, reactive
signal updates, and scripts to the browser over server-sent events
(SSE). Built on WAI so it works with Warp, Scotty, Servant, Yesod,
and any other WAI-compatible framework.
homepage: https://github.com/starfederation/datastar-haskell
bug-reports: https://github.com/starfederation/datastar-haskell/issues
license: MIT
license-file: LICENSE
author: Carlo Hamalainen
maintainer: carlo@carlo-hamalainen.net
category: Web, Hypermedia
build-type: Simple
extra-doc-files: CHANGELOG.md README.md
source-repository head
type: git
location: https://github.com/starfederation/datastar-haskell.git
-- zstd compression depends on an unreleased hs-zstd (streaming flushStream FFI),
-- so it is off by default to keep the Hackage build clean. Enable with -fzstd
-- together with the source-repository-package pin in cabal.project.
-- https://github.com/starfederation/datastar-haskell/issues/3
flag zstd
description: zstd Content-Encoding compressor (needs unreleased hs-zstd)
default: False
manual: True
common warnings
ghc-options:
-Wall
-Wcompat
-Wunused-packages
-Wredundant-constraints
-Wincomplete-uni-patterns
-Wincomplete-record-updates
library
import: warnings
exposed-modules:
Hypermedia.Datastar
Hypermedia.Datastar.Attributes
Hypermedia.Datastar.Compression.Brotli
Hypermedia.Datastar.Compression.Zlib
Hypermedia.Datastar.ExecuteScript
Hypermedia.Datastar.Logger
Hypermedia.Datastar.PatchElements
Hypermedia.Datastar.PatchSignals
Hypermedia.Datastar.Types
Hypermedia.Datastar.WAI
hs-source-dirs: src
default-language: Haskell2010
default-extensions:
ImportQualifiedPost
LambdaCase
OverloadedStrings
build-depends:
, base >= 4.14 && < 5
, aeson >= 2.0 && < 3
, bytestring >= 0.10.12 && < 1
, brotli >= 0.0.0.3 && < 1
, streaming-commons >= 0.2.3.1 && < 1
, http-types >= 0.12 && < 1
, text >= 1.2 && < 3
, wai >= 3.2 && < 4
if flag(zstd)
exposed-modules: Hypermedia.Datastar.Compression.Zstd
build-depends: zstd >= 0.1.3 && < 1
executable compression-bench
import: warnings
main-is: Main.hs
hs-source-dirs: bench
default-language: Haskell2010
default-extensions:
ImportQualifiedPost
OverloadedStrings
build-depends:
, base
, bytestring
, datastar-hs
, text
, wai
if flag(zstd)
cpp-options: -DZSTD
ghc-options: -O2
executable e2e-server
import: warnings
hs-source-dirs: e2e-server
main-is: Main.hs
build-depends:
, base
, aeson
, bytestring
, datastar-hs
, http-types
, lucid2
, text
, warp
, wai
default-language: Haskell2010
default-extensions:
DeriveGeneric
DeriveAnyClass
DerivingStrategies
ImportQualifiedPost
OverloadedStrings
ScopedTypeVariables
ghc-options: -threaded
test-suite datastar-hs-test
import: warnings
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Main.hs
other-modules:
Hypermedia.Datastar.Compression.BrotliSpec
Hypermedia.Datastar.Compression.ZlibSpec
Hypermedia.Datastar.ExecuteScriptSpec
Hypermedia.Datastar.PatchElementsSpec
Hypermedia.Datastar.PatchSignalsSpec
Hypermedia.Datastar.SSESpec
build-depends:
, base
, brotli
, bytestring
, datastar-hs
, hspec
, text
, wai
, zlib
if flag(zstd)
other-modules: Hypermedia.Datastar.Compression.ZstdSpec
build-depends: zstd
cpp-options: -DZSTD
default-language: Haskell2010
default-extensions:
ImportQualifiedPost
OverloadedStrings
executable hello-world-warp
import: warnings
main-is: hello-world-warp.hs
hs-source-dirs: examples
default-language: Haskell2010
default-extensions:
ImportQualifiedPost
OverloadedStrings
build-depends:
, base >= 4.7
, aeson
, bytestring
, http-types
, text
, wai
, warp >= 3.2 && < 4
, datastar-hs
ghc-options: -threaded
executable hello-world-servant
import: warnings
main-is: hello-world-servant.hs
hs-source-dirs: examples
default-language: Haskell2010
default-extensions:
DataKinds
ImportQualifiedPost
MultiParamTypeClasses
OverloadedStrings
TypeOperators
build-depends:
, base >= 4.7
, aeson
, bytestring
, http-media >= 0.8 && < 1
, http-types
, servant-server >= 0.19 && < 1
, text
, wai
, warp >= 3.2 && < 4
, datastar-hs
ghc-options: -threaded
executable hello-world-channel
import: warnings
main-is: hello-world-channel.hs
hs-source-dirs: examples
default-language: Haskell2010
default-extensions:
ImportQualifiedPost
OverloadedStrings
build-depends:
, base >= 4.7
, aeson
, bytestring
, http-types
, stm >= 2.4 && < 3
, text
, wai
, warp >= 3.2 && < 4
, datastar-hs
ghc-options: -threaded
executable activity-feed
import: warnings
main-is: activity-feed.hs
hs-source-dirs: examples
default-language: Haskell2010
default-extensions:
ImportQualifiedPost
OverloadedStrings
build-depends:
, base >= 4.7
, aeson
, bytestring
, text
, time >= 1.9 && < 2
, http-types
, wai
, warp >= 3.2 && < 4
, datastar-hs
ghc-options: -threaded
executable heap-view
import: warnings
main-is: heap-view.hs
hs-source-dirs: examples
default-language: Haskell2010
default-extensions:
ImportQualifiedPost
OverloadedStrings
ScopedTypeVariables
build-depends:
, base >= 4.7
, bytestring
, containers >= 0.6 && < 1
, ghc-heap >= 9.0 && < 10
, http-types
, stm >= 2.4 && < 3
, text
, uuid >= 1.3 && < 2
, wai
, warp >= 3.2 && < 4
, datastar-hs
ghc-options: -threaded -O0