mirror of
https://github.com/srid/ema.git
synced 2024-11-29 09:25:14 +03:00
d6a556957e
+ Added test-suite `test-type-errors` + Refactored default-extensions so they can be reused via import syntax Co-authored-by: Sridhar Ratnakumar <srid@srid.ca>
215 lines
4.8 KiB
Plaintext
215 lines
4.8 KiB
Plaintext
cabal-version: 2.4
|
||
name: ema
|
||
version: 0.7.2.0
|
||
license: AGPL-3.0-only
|
||
copyright: 2021 Sridhar Ratnakumar
|
||
maintainer: srid@srid.ca
|
||
author: Sridhar Ratnakumar
|
||
category: Web
|
||
synopsis: Static site generator library with hot reload
|
||
bug-reports: https://github.com/srid/ema/issues
|
||
homepage: https://ema.srid.ca/
|
||
description:
|
||
Ema is a next-gen Haskell library for building jamstack-style static sites.
|
||
Ema sites are change-aware; in addition to good ol’ static site generation,
|
||
it provides a live server supporting fast hot-reload in the browser on code
|
||
or data change.
|
||
|
||
extra-source-files:
|
||
CHANGELOG.md
|
||
LICENSE
|
||
README.md
|
||
|
||
-- This flag is enabled by default just so `bin/run` can work on macOS M1.
|
||
-- When disabling, ensure that macOS build doesn't break.
|
||
flag with-examples
|
||
description: Include examples and their dependencies
|
||
default: True
|
||
flag with-extra
|
||
description: Include non-core functionality
|
||
default: True
|
||
|
||
common extensions
|
||
default-extensions:
|
||
NoStarIsType
|
||
BangPatterns
|
||
ConstraintKinds
|
||
DataKinds
|
||
DeriveDataTypeable
|
||
DeriveFoldable
|
||
DeriveFunctor
|
||
DeriveGeneric
|
||
DeriveLift
|
||
DeriveTraversable
|
||
DerivingStrategies
|
||
DerivingVia
|
||
EmptyCase
|
||
EmptyDataDecls
|
||
EmptyDataDeriving
|
||
ExistentialQuantification
|
||
ExplicitForAll
|
||
FlexibleContexts
|
||
FlexibleInstances
|
||
GADTSyntax
|
||
GeneralisedNewtypeDeriving
|
||
ImportQualifiedPost
|
||
KindSignatures
|
||
LambdaCase
|
||
MultiParamTypeClasses
|
||
MultiWayIf
|
||
NumericUnderscores
|
||
OverloadedStrings
|
||
PolyKinds
|
||
PostfixOperators
|
||
RankNTypes
|
||
ScopedTypeVariables
|
||
StandaloneDeriving
|
||
StandaloneKindSignatures
|
||
TupleSections
|
||
TypeApplications
|
||
TypeFamilies
|
||
TypeOperators
|
||
ViewPatterns
|
||
|
||
library
|
||
import: extensions
|
||
-- Modules included in this executable, other than Main.
|
||
-- other-modules:
|
||
|
||
-- LANGUAGE extensions used by modules in this package.
|
||
-- other-extensions:
|
||
build-depends:
|
||
, aeson
|
||
, async
|
||
, base >=4.13.0.0 && <=4.17.0.0
|
||
, constraints-extras
|
||
, containers
|
||
, data-default
|
||
, dependent-sum
|
||
, dependent-sum-template
|
||
, directory
|
||
, filepath
|
||
, filepattern
|
||
, generic-optics
|
||
, generics-sop
|
||
, http-types
|
||
, lvar
|
||
, monad-logger
|
||
, monad-logger-extras
|
||
, mtl
|
||
, neat-interpolation
|
||
, optics-core
|
||
, optparse-applicative
|
||
, relude >=1.0
|
||
, sop-core
|
||
, template-haskell
|
||
, type-errors-pretty
|
||
, text
|
||
, unliftio
|
||
, url-slug
|
||
, wai
|
||
, wai-middleware-static
|
||
, wai-websockets
|
||
, warp
|
||
, websockets
|
||
|
||
if flag(with-examples)
|
||
build-depends:
|
||
, blaze-html
|
||
, blaze-markup
|
||
, fsnotify
|
||
, time
|
||
, pandoc
|
||
, pandoc-types
|
||
, commonmark-simple
|
||
if flag(with-extra)
|
||
build-depends:
|
||
, time
|
||
, unionmount
|
||
|
||
mixins:
|
||
base hiding (Prelude),
|
||
relude (Relude as Prelude, Relude.Container.One),
|
||
relude
|
||
|
||
ghc-options:
|
||
-Wall -Wincomplete-record-updates -Wincomplete-uni-patterns
|
||
-Wmissing-deriving-strategies -Wunused-foralls -Wunused-foralls
|
||
-fprint-explicit-foralls -fprint-explicit-kinds
|
||
-fprint-potential-instances
|
||
|
||
|
||
exposed-modules:
|
||
Ema
|
||
Ema.App
|
||
Ema.Asset
|
||
Ema.CLI
|
||
Ema.Dynamic
|
||
Ema.Generate
|
||
Ema.Route.Class
|
||
Ema.Route.Prism
|
||
Ema.Route.Prism.Check
|
||
Ema.Route.Prism.Type
|
||
Ema.Route.Generic
|
||
Ema.Route.Generic.Iso
|
||
Ema.Route.Generic.RGeneric
|
||
Ema.Route.Generic.SubRoute
|
||
Ema.Route.Generic.SubModel
|
||
Ema.Route.Generic.TH
|
||
Ema.Route.Generic.Verification
|
||
Ema.Route.Generic.Verification.Any
|
||
Ema.Route.Lib.File
|
||
Ema.Route.Lib.Folder
|
||
Ema.Route.Lib.Multi
|
||
Ema.Route.Url
|
||
Ema.Server
|
||
Ema.Site
|
||
GHC.TypeLits.Extra
|
||
|
||
if (flag(with-extra))
|
||
exposed-modules:
|
||
Ema.Route.Lib.Extra.StaticRoute
|
||
Ema.Route.Lib.Extra.MarkdownRoute
|
||
if impl(ghc >=9.2)
|
||
exposed-modules: GHC.TypeLits.Extra.Symbol
|
||
|
||
if (flag(with-examples) && impl(ghc >=9.2))
|
||
other-modules:
|
||
Ema.Example.Common
|
||
Ema.Example.Ex00_Hello
|
||
Ema.Example.Ex01_Basic
|
||
Ema.Example.Ex02_Clock
|
||
Ema.Example.Ex03_Store
|
||
Ema.Example.Ex04_Multi
|
||
Ema.Example.Ex05_MultiRoute
|
||
Ema.Route.Generic.Example
|
||
|
||
hs-source-dirs: src
|
||
default-language: Haskell2010
|
||
|
||
if impl(ghc >=8.10)
|
||
ghc-options: -Wunused-packages
|
||
|
||
test-suite test-type-errors
|
||
import: extensions
|
||
|
||
build-depends:
|
||
base,
|
||
ema,
|
||
template-haskell,
|
||
text,
|
||
generics-sop,
|
||
raw-strings-qq,
|
||
url-slug
|
||
|
||
other-modules:
|
||
Deriving
|
||
|
||
type: exitcode-stdio-1.0
|
||
main-is: Spec.hs
|
||
hs-source-dirs: test/type-errors
|
||
default-language: Haskell2010
|
||
|
||
if impl(ghc >=8.10)
|
||
ghc-options: -Wunused-packages
|