mirror of
https://github.com/graninas/Hydra.git
synced 2024-12-26 02:23:36 +03:00
Massive reorganizing: subprojects
This commit is contained in:
parent
e775f48b1b
commit
bda8db6a4f
42
.gitignore
vendored
42
.gitignore
vendored
@ -9,3 +9,45 @@ log.txt
|
||||
*.cabal
|
||||
.vscode
|
||||
stack.yaml.lock
|
||||
|
||||
out
|
||||
result
|
||||
dist
|
||||
dist-*
|
||||
cabal-dev
|
||||
*.o
|
||||
*.hi
|
||||
*.chi
|
||||
*.chs.h
|
||||
*.dyn_o
|
||||
*.dyn_hi
|
||||
.hpc
|
||||
.hsenv
|
||||
.cabal-sandbox/
|
||||
cabal.sandbox.config
|
||||
*.prof
|
||||
*.aux
|
||||
*.hp
|
||||
*.eventlog
|
||||
.stack-work/
|
||||
cabal.project.local
|
||||
cabal.project.local~
|
||||
.HTF/
|
||||
.ghc.environment.*
|
||||
dist-newstyle
|
||||
.stack-work
|
||||
stack.yaml.lock
|
||||
*.cabal
|
||||
|
||||
.ghci
|
||||
.ghcid
|
||||
|
||||
.idea/
|
||||
*.iml
|
||||
|
||||
*.diff
|
||||
*.patch
|
||||
tags
|
||||
|
||||
.vscode/
|
||||
.nvimrc
|
||||
|
147
app/MeteorCounter/package.yaml
Normal file
147
app/MeteorCounter/package.yaml
Normal file
@ -0,0 +1,147 @@
|
||||
name: MeteorCounter
|
||||
version: 1.0.0.0
|
||||
github: "graninas/Hydra"
|
||||
license: BSD3
|
||||
author: "Alexander Granin"
|
||||
maintainer: "graninas@gmail.com"
|
||||
copyright: "Granin A.S. 2020"
|
||||
|
||||
description:
|
||||
MeteorCounter app
|
||||
|
||||
default-extensions:
|
||||
- NoImplicitPrelude
|
||||
- GADTs
|
||||
- RankNTypes
|
||||
- DeriveFunctor
|
||||
- DeriveGeneric
|
||||
- OverloadedStrings
|
||||
- LambdaCase
|
||||
- MultiParamTypeClasses
|
||||
- ExplicitNamespaces
|
||||
- TypeApplications
|
||||
- ScopedTypeVariables
|
||||
- TypeOperators
|
||||
- TypeFamilies
|
||||
- DataKinds
|
||||
- FlexibleContexts
|
||||
- FlexibleInstances
|
||||
- PatternSynonyms
|
||||
- PolyKinds
|
||||
- DefaultSignatures
|
||||
- ConstraintKinds
|
||||
- NamedFieldPuns
|
||||
- TupleSections
|
||||
- ViewPatterns
|
||||
- MultiWayIf
|
||||
- RecordWildCards
|
||||
|
||||
dependencies:
|
||||
- base >= 4.7 && < 5
|
||||
- bytestring
|
||||
- time-units
|
||||
- network
|
||||
- aeson
|
||||
- aeson-pretty
|
||||
- cereal
|
||||
- mtl
|
||||
- cryptonite
|
||||
- base16-bytestring
|
||||
- base58-bytestring
|
||||
- base64-bytestring
|
||||
- arithmoi
|
||||
- directory
|
||||
- filepath
|
||||
- process
|
||||
- extra
|
||||
- time
|
||||
- clock
|
||||
- vector
|
||||
- scientific
|
||||
- containers
|
||||
- random
|
||||
- free
|
||||
- iproute
|
||||
- memory
|
||||
- transformers
|
||||
- template-haskell
|
||||
- async
|
||||
- text
|
||||
- haskeline
|
||||
- cryptohash-sha256
|
||||
- bytestring-conversion
|
||||
- newtype-generics
|
||||
- lens
|
||||
- universum
|
||||
- fmt
|
||||
- stm
|
||||
- hslogger
|
||||
- lens-aeson
|
||||
- th-abstraction
|
||||
- MonadRandom
|
||||
- entropy
|
||||
- validation
|
||||
- silently
|
||||
- uuid
|
||||
- resourcet
|
||||
- triplesec
|
||||
- yaml
|
||||
- newtype-generics
|
||||
- regex-posix
|
||||
- safe-exceptions
|
||||
- unliftio
|
||||
- unliftio-core
|
||||
- rocksdb-haskell
|
||||
- hedis
|
||||
- beam-core
|
||||
- beam-postgres
|
||||
- beam-sqlite
|
||||
- beam-migrate
|
||||
- sqlite-simple
|
||||
- resource-pool
|
||||
- servant
|
||||
- servant-server
|
||||
- servant-client
|
||||
- servant-swagger
|
||||
- servant-docs
|
||||
- wai
|
||||
- warp
|
||||
- http-client
|
||||
- http-client-tls
|
||||
- data-default
|
||||
- generic-lens
|
||||
- Hydra
|
||||
|
||||
library:
|
||||
source-dirs:
|
||||
- src
|
||||
ghc-options:
|
||||
- -Wall
|
||||
- -Wcompat
|
||||
- -Widentities
|
||||
- -fhide-source-paths
|
||||
|
||||
executables:
|
||||
MeteorCounter:
|
||||
main: Main.hs
|
||||
source-dirs: src/
|
||||
ghc-options:
|
||||
- -threaded
|
||||
- -rtsopts
|
||||
- -with-rtsopts=-N
|
||||
- -Wall
|
||||
# - -O2
|
||||
|
||||
|
||||
#
|
||||
# tests:
|
||||
# functional-tests:
|
||||
# main: Spec.hs
|
||||
# source-dirs:
|
||||
# - test/spec
|
||||
# ghc-options:
|
||||
# - -threaded
|
||||
# - -rtsopts
|
||||
# - -with-rtsopts=-N
|
||||
# dependencies:
|
||||
# - Hydra
|
146
app/PerfTestApp/package.yaml
Normal file
146
app/PerfTestApp/package.yaml
Normal file
@ -0,0 +1,146 @@
|
||||
name: PerfTestApp
|
||||
version: 1.0.0.0
|
||||
github: "graninas/Hydra"
|
||||
license: BSD3
|
||||
author: "Alexander Granin"
|
||||
maintainer: "graninas@gmail.com"
|
||||
copyright: "Granin A.S. 2020"
|
||||
|
||||
description:
|
||||
PerfTestApp
|
||||
|
||||
default-extensions:
|
||||
- NoImplicitPrelude
|
||||
- GADTs
|
||||
- RankNTypes
|
||||
- DeriveFunctor
|
||||
- DeriveGeneric
|
||||
- OverloadedStrings
|
||||
- LambdaCase
|
||||
- MultiParamTypeClasses
|
||||
- ExplicitNamespaces
|
||||
- TypeApplications
|
||||
- ScopedTypeVariables
|
||||
- TypeOperators
|
||||
- TypeFamilies
|
||||
- DataKinds
|
||||
- FlexibleContexts
|
||||
- FlexibleInstances
|
||||
- PatternSynonyms
|
||||
- PolyKinds
|
||||
- DefaultSignatures
|
||||
- ConstraintKinds
|
||||
- NamedFieldPuns
|
||||
- TupleSections
|
||||
- ViewPatterns
|
||||
- MultiWayIf
|
||||
- RecordWildCards
|
||||
|
||||
dependencies:
|
||||
- base >= 4.7 && < 5
|
||||
- bytestring
|
||||
- time-units
|
||||
- network
|
||||
- aeson
|
||||
- aeson-pretty
|
||||
- cereal
|
||||
- mtl
|
||||
- cryptonite
|
||||
- base16-bytestring
|
||||
- base58-bytestring
|
||||
- base64-bytestring
|
||||
- arithmoi
|
||||
- directory
|
||||
- filepath
|
||||
- process
|
||||
- extra
|
||||
- time
|
||||
- clock
|
||||
- vector
|
||||
- scientific
|
||||
- containers
|
||||
- random
|
||||
- free
|
||||
- iproute
|
||||
- memory
|
||||
- transformers
|
||||
- template-haskell
|
||||
- async
|
||||
- text
|
||||
- haskeline
|
||||
- cryptohash-sha256
|
||||
- bytestring-conversion
|
||||
- newtype-generics
|
||||
- lens
|
||||
- universum
|
||||
- fmt
|
||||
- stm
|
||||
- hslogger
|
||||
- lens-aeson
|
||||
- th-abstraction
|
||||
- MonadRandom
|
||||
- entropy
|
||||
- validation
|
||||
- silently
|
||||
- uuid
|
||||
- resourcet
|
||||
- triplesec
|
||||
- yaml
|
||||
- newtype-generics
|
||||
- regex-posix
|
||||
- safe-exceptions
|
||||
- unliftio
|
||||
- unliftio-core
|
||||
- rocksdb-haskell
|
||||
- hedis
|
||||
- beam-core
|
||||
- beam-postgres
|
||||
- beam-sqlite
|
||||
- beam-migrate
|
||||
- sqlite-simple
|
||||
- resource-pool
|
||||
- servant
|
||||
- servant-server
|
||||
- servant-client
|
||||
- servant-swagger
|
||||
- servant-docs
|
||||
- wai
|
||||
- warp
|
||||
- http-client
|
||||
- http-client-tls
|
||||
- data-default
|
||||
- generic-lens
|
||||
- Hydra
|
||||
|
||||
library:
|
||||
source-dirs:
|
||||
- src
|
||||
ghc-options:
|
||||
- -Wall
|
||||
- -Wcompat
|
||||
- -Widentities
|
||||
- -fhide-source-paths
|
||||
|
||||
executables:
|
||||
PerfTestApp:
|
||||
main: Main.hs
|
||||
source-dirs: src/
|
||||
ghc-options:
|
||||
- -threaded
|
||||
- -rtsopts
|
||||
- -with-rtsopts=-N
|
||||
- -Wall
|
||||
# - -O2
|
||||
|
||||
#
|
||||
# tests:
|
||||
# functional-tests:
|
||||
# main: Spec.hs
|
||||
# source-dirs:
|
||||
# - test/spec
|
||||
# ghc-options:
|
||||
# - -threaded
|
||||
# - -rtsopts
|
||||
# - -with-rtsopts=-N
|
||||
# dependencies:
|
||||
# - Hydra
|
146
app/PerfTestApp2/package.yaml
Normal file
146
app/PerfTestApp2/package.yaml
Normal file
@ -0,0 +1,146 @@
|
||||
name: PerfTestApp2
|
||||
version: 1.0.0.0
|
||||
github: "graninas/Hydra"
|
||||
license: BSD3
|
||||
author: "Alexander Granin"
|
||||
maintainer: "graninas@gmail.com"
|
||||
copyright: "Granin A.S. 2020"
|
||||
|
||||
description:
|
||||
PerfTestApp2
|
||||
|
||||
default-extensions:
|
||||
- NoImplicitPrelude
|
||||
- GADTs
|
||||
- RankNTypes
|
||||
- DeriveFunctor
|
||||
- DeriveGeneric
|
||||
- OverloadedStrings
|
||||
- LambdaCase
|
||||
- MultiParamTypeClasses
|
||||
- ExplicitNamespaces
|
||||
- TypeApplications
|
||||
- ScopedTypeVariables
|
||||
- TypeOperators
|
||||
- TypeFamilies
|
||||
- DataKinds
|
||||
- FlexibleContexts
|
||||
- FlexibleInstances
|
||||
- PatternSynonyms
|
||||
- PolyKinds
|
||||
- DefaultSignatures
|
||||
- ConstraintKinds
|
||||
- NamedFieldPuns
|
||||
- TupleSections
|
||||
- ViewPatterns
|
||||
- MultiWayIf
|
||||
- RecordWildCards
|
||||
|
||||
dependencies:
|
||||
- base >= 4.7 && < 5
|
||||
- bytestring
|
||||
- time-units
|
||||
- network
|
||||
- aeson
|
||||
- aeson-pretty
|
||||
- cereal
|
||||
- mtl
|
||||
- cryptonite
|
||||
- base16-bytestring
|
||||
- base58-bytestring
|
||||
- base64-bytestring
|
||||
- arithmoi
|
||||
- directory
|
||||
- filepath
|
||||
- process
|
||||
- extra
|
||||
- time
|
||||
- clock
|
||||
- vector
|
||||
- scientific
|
||||
- containers
|
||||
- random
|
||||
- free
|
||||
- iproute
|
||||
- memory
|
||||
- transformers
|
||||
- template-haskell
|
||||
- async
|
||||
- text
|
||||
- haskeline
|
||||
- cryptohash-sha256
|
||||
- bytestring-conversion
|
||||
- newtype-generics
|
||||
- lens
|
||||
- universum
|
||||
- fmt
|
||||
- stm
|
||||
- hslogger
|
||||
- lens-aeson
|
||||
- th-abstraction
|
||||
- MonadRandom
|
||||
- entropy
|
||||
- validation
|
||||
- silently
|
||||
- uuid
|
||||
- resourcet
|
||||
- triplesec
|
||||
- yaml
|
||||
- newtype-generics
|
||||
- regex-posix
|
||||
- safe-exceptions
|
||||
- unliftio
|
||||
- unliftio-core
|
||||
- rocksdb-haskell
|
||||
- hedis
|
||||
- beam-core
|
||||
- beam-postgres
|
||||
- beam-sqlite
|
||||
- beam-migrate
|
||||
- sqlite-simple
|
||||
- resource-pool
|
||||
- servant
|
||||
- servant-server
|
||||
- servant-client
|
||||
- servant-swagger
|
||||
- servant-docs
|
||||
- wai
|
||||
- warp
|
||||
- http-client
|
||||
- http-client-tls
|
||||
- data-default
|
||||
- generic-lens
|
||||
- Hydra
|
||||
|
||||
library:
|
||||
source-dirs:
|
||||
- src
|
||||
ghc-options:
|
||||
- -Wall
|
||||
- -Wcompat
|
||||
- -Widentities
|
||||
- -fhide-source-paths
|
||||
|
||||
executables:
|
||||
PerfTestApp2:
|
||||
main: Main.hs
|
||||
source-dirs: src/
|
||||
ghc-options:
|
||||
- -threaded
|
||||
- -rtsopts
|
||||
- -with-rtsopts=-N
|
||||
- -Wall
|
||||
# - -O2
|
||||
|
||||
#
|
||||
# tests:
|
||||
# functional-tests:
|
||||
# main: Spec.hs
|
||||
# source-dirs:
|
||||
# - test/spec
|
||||
# ghc-options:
|
||||
# - -threaded
|
||||
# - -rtsopts
|
||||
# - -with-rtsopts=-N
|
||||
# dependencies:
|
||||
# - Hydra
|
@ -1,14 +1,13 @@
|
||||
name: Hydra
|
||||
name: astro
|
||||
version: 1.0.0.0
|
||||
github: "graninas/Hydra"
|
||||
license: BSD3
|
||||
author: "Alexander Granin"
|
||||
maintainer: "graninas@gmail.com"
|
||||
copyright: "Granin A.S. 2019"
|
||||
copyright: "Granin A.S. 2020"
|
||||
|
||||
description:
|
||||
Hydra is the project that allows to build multithreaded concurrent applications.
|
||||
Hydra is initially based on the Hydra.Framework.
|
||||
Astro web server and client for astronomers
|
||||
|
||||
default-extensions:
|
||||
- NoImplicitPrelude
|
||||
@ -115,83 +114,37 @@ dependencies:
|
||||
- http-client-tls
|
||||
- data-default
|
||||
- generic-lens
|
||||
- Hydra
|
||||
|
||||
library:
|
||||
source-dirs:
|
||||
- src
|
||||
- src
|
||||
ghc-options:
|
||||
- -Wall
|
||||
- -Wcompat
|
||||
- -Widentities
|
||||
- -fhide-source-paths
|
||||
|
||||
executables:
|
||||
perf-test-app:
|
||||
astro:
|
||||
main: Main.hs
|
||||
source-dirs: app/PerfTestApp
|
||||
ghc-options:
|
||||
- -threaded
|
||||
- -rtsopts
|
||||
- -with-rtsopts=-N
|
||||
- -Wall
|
||||
- -O2
|
||||
dependencies:
|
||||
- Hydra
|
||||
|
||||
perf-test-app2:
|
||||
main: Main.hs
|
||||
source-dirs: app/PerfTestApp2
|
||||
ghc-options:
|
||||
- -threaded
|
||||
- -rtsopts
|
||||
- -with-rtsopts=-N
|
||||
- -Wall
|
||||
- -O2
|
||||
dependencies:
|
||||
- Hydra
|
||||
|
||||
meteor-counter-app:
|
||||
main: Main.hs
|
||||
source-dirs: app/MeteorCounter
|
||||
ghc-options:
|
||||
- -threaded
|
||||
- -rtsopts
|
||||
- -with-rtsopts=-N
|
||||
- -Wall
|
||||
- -O2
|
||||
dependencies:
|
||||
- Hydra
|
||||
|
||||
astro-app:
|
||||
main: Main.hs
|
||||
source-dirs: app/astro
|
||||
ghc-options:
|
||||
- -threaded
|
||||
- -rtsopts
|
||||
- -with-rtsopts=-N
|
||||
- -Wall
|
||||
- -O2
|
||||
dependencies:
|
||||
- Hydra
|
||||
|
||||
labyrinth:
|
||||
main: Main.hs
|
||||
source-dirs: app/labyrinth
|
||||
source-dirs: src/
|
||||
ghc-options:
|
||||
- -threaded
|
||||
- -rtsopts
|
||||
- -with-rtsopts=-N
|
||||
- -Wall
|
||||
# - -O2
|
||||
dependencies:
|
||||
- Hydra
|
||||
|
||||
|
||||
tests:
|
||||
functional-tests:
|
||||
main: Spec.hs
|
||||
source-dirs:
|
||||
- test/spec
|
||||
ghc-options:
|
||||
- -threaded
|
||||
- -rtsopts
|
||||
- -with-rtsopts=-N
|
||||
dependencies:
|
||||
- Hydra
|
||||
#
|
||||
# tests:
|
||||
# functional-tests:
|
||||
# main: Spec.hs
|
||||
# source-dirs:
|
||||
# - test/spec
|
||||
# ghc-options:
|
||||
# - -threaded
|
||||
# - -rtsopts
|
||||
# - -with-rtsopts=-N
|
||||
# dependencies:
|
||||
# - Hydra
|
146
app/labyrinth/package.yaml
Normal file
146
app/labyrinth/package.yaml
Normal file
@ -0,0 +1,146 @@
|
||||
name: labyrinth
|
||||
version: 1.0.0.0
|
||||
github: "graninas/Hydra"
|
||||
license: BSD3
|
||||
author: "Alexander Granin"
|
||||
maintainer: "graninas@gmail.com"
|
||||
copyright: "Granin A.S. 2020"
|
||||
|
||||
description:
|
||||
Labyrinth game (aka Terra Incognita)
|
||||
|
||||
default-extensions:
|
||||
- NoImplicitPrelude
|
||||
- GADTs
|
||||
- RankNTypes
|
||||
- DeriveFunctor
|
||||
- DeriveGeneric
|
||||
- OverloadedStrings
|
||||
- LambdaCase
|
||||
- MultiParamTypeClasses
|
||||
- ExplicitNamespaces
|
||||
- TypeApplications
|
||||
- ScopedTypeVariables
|
||||
- TypeOperators
|
||||
- TypeFamilies
|
||||
- DataKinds
|
||||
- FlexibleContexts
|
||||
- FlexibleInstances
|
||||
- PatternSynonyms
|
||||
- PolyKinds
|
||||
- DefaultSignatures
|
||||
- ConstraintKinds
|
||||
- NamedFieldPuns
|
||||
- TupleSections
|
||||
- ViewPatterns
|
||||
- MultiWayIf
|
||||
- RecordWildCards
|
||||
|
||||
dependencies:
|
||||
- base >= 4.7 && < 5
|
||||
- bytestring
|
||||
- time-units
|
||||
- network
|
||||
- aeson
|
||||
- aeson-pretty
|
||||
- cereal
|
||||
- mtl
|
||||
- cryptonite
|
||||
- base16-bytestring
|
||||
- base58-bytestring
|
||||
- base64-bytestring
|
||||
- arithmoi
|
||||
- directory
|
||||
- filepath
|
||||
- process
|
||||
- extra
|
||||
- time
|
||||
- clock
|
||||
- vector
|
||||
- scientific
|
||||
- containers
|
||||
- random
|
||||
- free
|
||||
- iproute
|
||||
- memory
|
||||
- transformers
|
||||
- template-haskell
|
||||
- async
|
||||
- text
|
||||
- haskeline
|
||||
- cryptohash-sha256
|
||||
- bytestring-conversion
|
||||
- newtype-generics
|
||||
- lens
|
||||
- universum
|
||||
- fmt
|
||||
- stm
|
||||
- hslogger
|
||||
- lens-aeson
|
||||
- th-abstraction
|
||||
- MonadRandom
|
||||
- entropy
|
||||
- validation
|
||||
- silently
|
||||
- uuid
|
||||
- resourcet
|
||||
- triplesec
|
||||
- yaml
|
||||
- newtype-generics
|
||||
- regex-posix
|
||||
- safe-exceptions
|
||||
- unliftio
|
||||
- unliftio-core
|
||||
- rocksdb-haskell
|
||||
- hedis
|
||||
- beam-core
|
||||
- beam-postgres
|
||||
- beam-sqlite
|
||||
- beam-migrate
|
||||
- sqlite-simple
|
||||
- resource-pool
|
||||
- servant
|
||||
- servant-server
|
||||
- servant-client
|
||||
- servant-swagger
|
||||
- servant-docs
|
||||
- wai
|
||||
- warp
|
||||
- http-client
|
||||
- http-client-tls
|
||||
- data-default
|
||||
- generic-lens
|
||||
- Hydra
|
||||
|
||||
library:
|
||||
source-dirs:
|
||||
- src
|
||||
ghc-options:
|
||||
- -Wall
|
||||
- -Wcompat
|
||||
- -Widentities
|
||||
- -fhide-source-paths
|
||||
|
||||
executables:
|
||||
labyrinth:
|
||||
main: Main.hs
|
||||
source-dirs: src/
|
||||
ghc-options:
|
||||
- -threaded
|
||||
- -rtsopts
|
||||
- -with-rtsopts=-N
|
||||
- -Wall
|
||||
# - -O2
|
||||
|
||||
#
|
||||
# tests:
|
||||
# functional-tests:
|
||||
# main: Spec.hs
|
||||
# source-dirs:
|
||||
# - test/spec
|
||||
# ghc-options:
|
||||
# - -threaded
|
||||
# - -rtsopts
|
||||
# - -with-rtsopts=-N
|
||||
# dependencies:
|
||||
# - Hydra
|
135
lib/Hydra/package.yaml
Normal file
135
lib/Hydra/package.yaml
Normal file
@ -0,0 +1,135 @@
|
||||
name: Hydra
|
||||
version: 1.1.0.0
|
||||
github: "graninas/Hydra"
|
||||
license: BSD3
|
||||
author: "Alexander Granin"
|
||||
maintainer: "graninas@gmail.com"
|
||||
copyright: "Granin A.S. 2020"
|
||||
|
||||
description:
|
||||
All-in-one framework for writing web backends and cli applications.
|
||||
|
||||
default-extensions:
|
||||
- NoImplicitPrelude
|
||||
- GADTs
|
||||
- RankNTypes
|
||||
- DeriveFunctor
|
||||
- DeriveGeneric
|
||||
- OverloadedStrings
|
||||
- LambdaCase
|
||||
- MultiParamTypeClasses
|
||||
- ExplicitNamespaces
|
||||
- TypeApplications
|
||||
- ScopedTypeVariables
|
||||
- TypeOperators
|
||||
- TypeFamilies
|
||||
- DataKinds
|
||||
- FlexibleContexts
|
||||
- FlexibleInstances
|
||||
- PatternSynonyms
|
||||
- PolyKinds
|
||||
- DefaultSignatures
|
||||
- ConstraintKinds
|
||||
- NamedFieldPuns
|
||||
- TupleSections
|
||||
- ViewPatterns
|
||||
- MultiWayIf
|
||||
- RecordWildCards
|
||||
|
||||
dependencies:
|
||||
- base >= 4.7 && < 5
|
||||
- bytestring
|
||||
- time-units
|
||||
- network
|
||||
- aeson
|
||||
- aeson-pretty
|
||||
- cereal
|
||||
- mtl
|
||||
- cryptonite
|
||||
- base16-bytestring
|
||||
- base58-bytestring
|
||||
- base64-bytestring
|
||||
- arithmoi
|
||||
- directory
|
||||
- filepath
|
||||
- process
|
||||
- extra
|
||||
- time
|
||||
- clock
|
||||
- vector
|
||||
- scientific
|
||||
- containers
|
||||
- random
|
||||
- free
|
||||
- iproute
|
||||
- memory
|
||||
- transformers
|
||||
- template-haskell
|
||||
- async
|
||||
- text
|
||||
- haskeline
|
||||
- cryptohash-sha256
|
||||
- bytestring-conversion
|
||||
- newtype-generics
|
||||
- lens
|
||||
- universum
|
||||
- fmt
|
||||
- stm
|
||||
- hslogger
|
||||
- lens-aeson
|
||||
- th-abstraction
|
||||
- MonadRandom
|
||||
- entropy
|
||||
- validation
|
||||
- silently
|
||||
- uuid
|
||||
- resourcet
|
||||
- triplesec
|
||||
- yaml
|
||||
- newtype-generics
|
||||
- regex-posix
|
||||
- safe-exceptions
|
||||
- unliftio
|
||||
- unliftio-core
|
||||
- rocksdb-haskell
|
||||
- hedis
|
||||
- beam-core
|
||||
- beam-postgres
|
||||
- beam-sqlite
|
||||
- beam-migrate
|
||||
- sqlite-simple
|
||||
- resource-pool
|
||||
- servant
|
||||
- servant-server
|
||||
- servant-client
|
||||
- servant-swagger
|
||||
- servant-docs
|
||||
- wai
|
||||
- warp
|
||||
- http-client
|
||||
- http-client-tls
|
||||
- data-default
|
||||
- generic-lens
|
||||
|
||||
library:
|
||||
source-dirs:
|
||||
- src
|
||||
ghc-options:
|
||||
- -Wall
|
||||
|
||||
|
||||
tests:
|
||||
functional-tests:
|
||||
main: Spec.hs
|
||||
source-dirs:
|
||||
- test
|
||||
ghc-options:
|
||||
- -threaded
|
||||
- -rtsopts
|
||||
- -with-rtsopts=-N
|
||||
dependencies:
|
||||
- hspec
|
||||
- HUnit
|
||||
- QuickCheck
|
||||
- hspec-contrib
|
||||
- Hydra
|
@ -9,13 +9,13 @@ import Hydra.Prelude
|
||||
import qualified Hydra.Core.Domain.DB as D
|
||||
import qualified Hydra.Core.Domain.KVDB as D
|
||||
|
||||
import Language.Haskell.TH.MakeFunctor (makeFunctorInstance)
|
||||
|
||||
data KVDBF next where
|
||||
Save :: D.KVDBKey -> D.KVDBValue -> (D.DBResult () -> next) -> KVDBF next
|
||||
Load :: D.KVDBKey -> (D.DBResult D.KVDBValue -> next) -> KVDBF next
|
||||
|
||||
makeFunctorInstance ''KVDBF
|
||||
instance Functor KVDBF where
|
||||
fmap g (Save k v next) = Save k v (g . next)
|
||||
fmap g (Load k next) = Load k (g . next)
|
||||
|
||||
type KVDBL db = Free KVDBF
|
||||
|
@ -16,8 +16,6 @@ import qualified Hydra.Core.State.ChurchL as CL
|
||||
import qualified Hydra.Core.State.Class as C
|
||||
import qualified Hydra.Core.Lang.Class as C
|
||||
|
||||
import Language.Haskell.TH.MakeFunctor (makeFunctorInstance)
|
||||
|
||||
-- | Core effects container language.
|
||||
data LangF next where
|
||||
-- | Eval stateful action atomically.
|
||||
@ -33,7 +31,12 @@ data LangF next where
|
||||
|
||||
-- TODO: KVDB
|
||||
|
||||
makeFunctorInstance ''LangF
|
||||
instance Functor LangF where
|
||||
fmap f (EvalStateAtomically act next) = EvalStateAtomically act (f . next)
|
||||
fmap f (EvalLogger act next) = EvalLogger act (f . next)
|
||||
fmap f (EvalRandom act next) = EvalRandom act (f . next)
|
||||
fmap f (EvalControlFlow act next) = EvalControlFlow act (f . next)
|
||||
fmap f (EvalIO act next) = EvalIO act (f . next)
|
||||
|
||||
type LangL = F LangF
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user