2023-02-06 14:31:35 +03:00
|
|
|
name: crem
|
2023-01-04 19:30:57 +03:00
|
|
|
version: 0.1.0.0
|
|
|
|
author: Marco Perone
|
|
|
|
maintainer: marco.perone@tweag.io
|
|
|
|
copyright: 2022 Tweag I/O
|
2023-03-01 14:57:28 +03:00
|
|
|
license: MIT
|
2023-02-13 18:16:29 +03:00
|
|
|
description:
|
2023-02-15 14:39:33 +03:00
|
|
|
"`crem` stands for __c__ompositional __r__epresentable __e__xecutable
|
|
|
|
__m__achines.
|
2023-02-13 18:16:29 +03:00
|
|
|
It allows creating state machines (Mealy machines in fact), compose them to
|
|
|
|
build bigger machines out of smaller ones and then run them and draw their
|
|
|
|
flow and their state space."
|
2023-01-04 19:30:57 +03:00
|
|
|
|
2023-01-12 17:29:50 +03:00
|
|
|
when:
|
|
|
|
- condition: impl(ghc >= 9.2)
|
|
|
|
then:
|
|
|
|
# https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/control.html?highlight=ghc2021#extension-GHC2021
|
|
|
|
language: GHC2021
|
|
|
|
ghc-options:
|
|
|
|
# https://downloads.haskell.org/ghc/latest/docs/users_guide/using-warnings.html#ghc-flag--Wmissing-kind-signatures
|
|
|
|
- -Wno-missing-kind-signatures
|
|
|
|
else:
|
|
|
|
default-extensions:
|
|
|
|
- BangPatterns
|
|
|
|
- BinaryLiterals
|
|
|
|
- ConstrainedClassMethods
|
|
|
|
- ConstraintKinds
|
|
|
|
- DeriveDataTypeable
|
|
|
|
- DeriveFoldable
|
|
|
|
- DeriveFunctor
|
|
|
|
- DeriveGeneric
|
|
|
|
- DeriveLift
|
|
|
|
- DeriveTraversable
|
|
|
|
- DoAndIfThenElse
|
|
|
|
- EmptyCase
|
|
|
|
- EmptyDataDecls
|
|
|
|
- EmptyDataDeriving
|
|
|
|
- ExistentialQuantification
|
|
|
|
- ExplicitForAll
|
|
|
|
- FlexibleContexts
|
|
|
|
- FlexibleInstances
|
|
|
|
- ForeignFunctionInterface
|
|
|
|
- GADTSyntax
|
|
|
|
- GeneralisedNewtypeDeriving
|
|
|
|
- HexFloatLiterals
|
|
|
|
- ImplicitPrelude
|
|
|
|
- ImportQualifiedPost
|
|
|
|
- InstanceSigs
|
|
|
|
- KindSignatures
|
|
|
|
- MonomorphismRestriction
|
|
|
|
- MultiParamTypeClasses
|
|
|
|
- NamedFieldPuns
|
|
|
|
- NamedWildCards
|
|
|
|
- NumericUnderscores
|
|
|
|
- PatternGuards
|
|
|
|
- PolyKinds
|
|
|
|
- PostfixOperators
|
|
|
|
- RankNTypes
|
|
|
|
- RelaxedPolyRec
|
|
|
|
- ScopedTypeVariables
|
|
|
|
- StandaloneDeriving
|
|
|
|
- StandaloneKindSignatures
|
|
|
|
- StarIsType
|
|
|
|
- TraditionalRecordSyntax
|
|
|
|
- TupleSections
|
|
|
|
- TypeApplications
|
|
|
|
- TypeOperators
|
|
|
|
- TypeSynonymInstances
|
2023-01-05 13:09:07 +03:00
|
|
|
|
|
|
|
default-extensions:
|
2023-01-05 20:01:15 +03:00
|
|
|
- DerivingStrategies # https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/deriving_strategies.html#extension-DerivingStrategies
|
2023-01-09 19:48:53 +03:00
|
|
|
- LambdaCase # https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/lambda_case.html#extension-LambdaCase
|
2023-01-05 20:01:15 +03:00
|
|
|
- PackageImports # https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/package_qualified_imports.html#extension-PackageImports
|
2023-01-04 19:30:57 +03:00
|
|
|
|
2023-01-05 13:09:29 +03:00
|
|
|
# Options inspired by: https://medium.com/mercury-bank/enable-all-the-warnings-a0517bc081c3
|
2023-01-04 19:30:57 +03:00
|
|
|
ghc-options:
|
2023-01-05 13:09:29 +03:00
|
|
|
# Enable every warning GHC supports
|
|
|
|
- -Weverything # https://downloads.haskell.org/ghc/latest/docs/users_guide/using-warnings.html#ghc-flag--Weverything
|
|
|
|
|
|
|
|
# Turn every warning into an error
|
|
|
|
- -Werror # https://downloads.haskell.org/ghc/latest/docs/users_guide/using-warnings.html#ghc-flag--Werror
|
|
|
|
|
|
|
|
# Turn off the warnings we don't care about.
|
|
|
|
- -Wno-safe # https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/safe_haskell.html#ghc-flag--Wsafe
|
|
|
|
- -Wno-unsafe # https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/safe_haskell.html#ghc-flag--Wunsafe
|
|
|
|
- -Wno-missing-safe-haskell-mode # https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/safe_haskell.html#ghc-flag--Wmissing-safe-haskell-mode
|
|
|
|
- -Wno-implicit-prelude # https://downloads.haskell.org/ghc/latest/docs/users_guide/using-warnings.html#ghc-flag--Wimplicit-prelude
|
2023-01-05 20:01:15 +03:00
|
|
|
- -Wno-missing-export-lists # https://downloads.haskell.org/ghc/latest/docs/users_guide/using-warnings.html#ghc-flag--Wmissing-export-lists
|
2023-01-09 19:48:53 +03:00
|
|
|
- -Wno-missing-home-modules # https://downloads.haskell.org/ghc/latest/docs/users_guide/using-warnings.html#ghc-flag--Wmissing-home-modules
|
2023-01-05 20:01:15 +03:00
|
|
|
- -Wno-missing-import-lists # https://downloads.haskell.org/ghc/latest/docs/users_guide/using-warnings.html#ghc-flag--Wmissing-import-lists
|
2023-01-09 19:48:53 +03:00
|
|
|
- -Wno-all-missed-specialisations # https://downloads.haskell.org/ghc/latest/docs/users_guide/using-warnings.html#ghc-flag--Wall-missed-specialisations
|
2023-01-04 19:30:57 +03:00
|
|
|
|
|
|
|
dependencies:
|
2023-03-10 17:54:43 +03:00
|
|
|
- base >= 4.15 && < 4.19
|
2023-01-05 20:01:15 +03:00
|
|
|
|
|
|
|
library:
|
|
|
|
source-dirs: src
|
2023-01-10 19:42:41 +03:00
|
|
|
dependencies:
|
2023-03-10 17:54:43 +03:00
|
|
|
- profunctors >= 3.2 && < 5.7
|
|
|
|
- singletons-base >= 3.0 && < 3.2
|
|
|
|
- text >= 1.2 && < 2.1
|
2023-02-06 14:31:35 +03:00
|
|
|
# Disable adding Paths_crem to other-modules, because it does not conform to our style guide.
|
2023-01-12 16:46:12 +03:00
|
|
|
# https://github.com/sol/hpack#handling-of-paths_-modules
|
|
|
|
when:
|
|
|
|
- condition: false
|
2023-02-06 14:31:35 +03:00
|
|
|
other-modules: Paths_crem
|
2023-01-05 20:01:15 +03:00
|
|
|
|
2023-02-13 13:04:46 +03:00
|
|
|
internal-libraries:
|
|
|
|
crem-examples:
|
|
|
|
source-dirs: examples
|
|
|
|
dependencies:
|
|
|
|
- crem
|
2023-03-10 17:54:43 +03:00
|
|
|
- profunctors >= 3.2 && < 5.7
|
|
|
|
- singletons-base >= 3.0 && < 3.2
|
|
|
|
- text >= 1.2 && < 2.1
|
2023-02-13 18:16:29 +03:00
|
|
|
# Disable adding Paths_crem to other-modules, because it does not conform to our style guide.
|
|
|
|
# https://github.com/sol/hpack#handling-of-paths_-modules
|
|
|
|
when:
|
|
|
|
- condition: false
|
|
|
|
other-modules: Paths_crem
|
2023-02-13 13:04:46 +03:00
|
|
|
|
2023-01-05 20:01:15 +03:00
|
|
|
tests:
|
2023-02-06 14:31:35 +03:00
|
|
|
crem-spec:
|
2023-01-05 20:01:15 +03:00
|
|
|
main: Spec.hs
|
|
|
|
source-dirs: spec
|
|
|
|
dependencies:
|
2023-02-06 14:31:35 +03:00
|
|
|
- crem
|
2023-02-13 13:04:46 +03:00
|
|
|
- crem-examples
|
2023-03-10 17:54:43 +03:00
|
|
|
- hspec >= 2.7 && < 2.11
|
|
|
|
- profunctors >= 3.2 && < 5.7
|
|
|
|
- singletons-base >= 3.0 && < 3.2
|
2023-03-09 13:14:54 +03:00
|
|
|
build-tools: hspec-discover:hspec-discover
|
2023-01-11 18:22:51 +03:00
|
|
|
when:
|
|
|
|
- condition: false
|
2023-02-06 14:31:35 +03:00
|
|
|
other-modules: Paths_crem
|
2023-01-11 18:22:51 +03:00
|
|
|
|
2023-02-06 14:31:35 +03:00
|
|
|
crem-doctests:
|
2023-01-11 18:22:51 +03:00
|
|
|
source-dirs: doctest
|
|
|
|
main: Main.hs
|
|
|
|
ghc-options:
|
|
|
|
- -threaded
|
|
|
|
- -Wno-unused-packages
|
|
|
|
dependencies:
|
2023-02-06 14:31:35 +03:00
|
|
|
- crem
|
2023-03-08 13:49:34 +03:00
|
|
|
- crem-examples
|
2023-03-10 17:54:43 +03:00
|
|
|
- doctest-parallel >= 0.2.3 && < 0.4
|
2023-01-12 16:46:12 +03:00
|
|
|
when:
|
|
|
|
- condition: false
|
2023-02-06 14:31:35 +03:00
|
|
|
other-modules: Paths_crem
|
2023-02-01 19:31:26 +03:00
|
|
|
|
|
|
|
executables:
|
|
|
|
hobbit-game:
|
|
|
|
source-dirs: hobbit-game
|
|
|
|
main: Main.hs
|
|
|
|
dependencies:
|
2023-02-06 14:31:35 +03:00
|
|
|
- crem
|
2023-02-13 13:04:46 +03:00
|
|
|
- crem-examples
|
2023-02-06 14:31:35 +03:00
|
|
|
# Disable adding Paths_crem to other-modules, because it does not conform to our style guide.
|
2023-02-01 19:35:40 +03:00
|
|
|
# https://github.com/sol/hpack#handling-of-paths_-modules
|
|
|
|
when:
|
|
|
|
- condition: false
|
2023-02-06 14:31:35 +03:00
|
|
|
other-modules: Paths_crem
|
2023-02-28 20:38:33 +03:00
|
|
|
|
|
|
|
hobbit-map:
|
|
|
|
source-dirs: hobbit-map
|
|
|
|
main: Main.hs
|
|
|
|
dependencies:
|
|
|
|
- crem
|
|
|
|
- crem-examples
|
2023-03-10 17:54:43 +03:00
|
|
|
- text >= 1.2 && < 2.1
|
2023-02-28 20:38:33 +03:00
|
|
|
# Disable adding Paths_crem to other-modules, because it does not conform to our style guide.
|
|
|
|
# https://github.com/sol/hpack#handling-of-paths_-modules
|
|
|
|
when:
|
|
|
|
- condition: false
|
|
|
|
other-modules: Paths_crem
|