wip
This commit is contained in:
parent
8818b6f495
commit
6767813879
@ -23,6 +23,7 @@ executable backend
|
|||||||
, API.Catalogue
|
, API.Catalogue
|
||||||
, API.Channels
|
, API.Channels
|
||||||
, API.Users
|
, API.Users
|
||||||
|
, Configuration
|
||||||
, Database
|
, Database
|
||||||
, Database.Book
|
, Database.Book
|
||||||
, Database.Channel
|
, Database.Channel
|
||||||
|
@ -13,13 +13,10 @@ extra-source-files: ChangeLog.md
|
|||||||
cabal-version: >=1.10
|
cabal-version: >=1.10
|
||||||
|
|
||||||
library
|
library
|
||||||
exposed-modules: Configuration
|
exposed-modules: Data.Versioned
|
||||||
, Data.Versioned
|
|
||||||
-- other-extensions:
|
-- other-extensions:
|
||||||
build-depends: base >=4.10
|
build-depends: base >=4.10
|
||||||
, classy-prelude
|
, classy-prelude
|
||||||
, dhall
|
|
||||||
, foreign-store
|
|
||||||
, generic-lens
|
, generic-lens
|
||||||
, lens
|
, lens
|
||||||
, mtl
|
, mtl
|
||||||
@ -38,7 +35,6 @@ test-suite spec
|
|||||||
hs-source-dirs: src
|
hs-source-dirs: src
|
||||||
build-depends: base >=4.10
|
build-depends: base >=4.10
|
||||||
, classy-prelude
|
, classy-prelude
|
||||||
, dhall
|
|
||||||
, foreign-store
|
, foreign-store
|
||||||
, generic-lens
|
, generic-lens
|
||||||
, lens
|
, lens
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
{-# Language NoImplicitPrelude #-}
|
|
||||||
{-# Language DeriveGeneric #-}
|
|
||||||
{-# Language DuplicateRecordFields #-}
|
|
||||||
module Configuration where
|
|
||||||
|
|
||||||
import ClassyPrelude
|
|
||||||
import Dhall (Interpret)
|
|
||||||
|
|
||||||
data Pg = Pg { username :: Text
|
|
||||||
, password :: Text
|
|
||||||
, host :: Text
|
|
||||||
, database :: Text }
|
|
||||||
deriving (Show, Generic)
|
|
||||||
|
|
||||||
data Store = Filestore { path :: Text }
|
|
||||||
| IPFS { common :: Text }
|
|
||||||
deriving (Show, Generic)
|
|
||||||
|
|
||||||
data Config = Config { database :: Pg
|
|
||||||
, store :: Store }
|
|
||||||
deriving (Show, Generic)
|
|
||||||
|
|
||||||
instance Interpret Pg
|
|
||||||
instance Interpret Store
|
|
||||||
instance Interpret Config
|
|
@ -23,5 +23,6 @@ executable frontend
|
|||||||
, miso
|
, miso
|
||||||
, jsaddle-warp
|
, jsaddle-warp
|
||||||
, mtl
|
, mtl
|
||||||
|
, common
|
||||||
hs-source-dirs: src
|
hs-source-dirs: src
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
|
@ -23,7 +23,12 @@ let
|
|||||||
mkShell = name: pkg:
|
mkShell = name: pkg:
|
||||||
let
|
let
|
||||||
n = "${name}-shell";
|
n = "${name}-shell";
|
||||||
deps = haskellPackages'.ghcWithHoogle (pkgs: pkg.buildInputs ++ pkg.propagatedBuildInputs);
|
deps = with haskellPackages'; [
|
||||||
|
ghcid
|
||||||
|
cabal-install
|
||||||
|
hasktags
|
||||||
|
(haskellPackages'.ghcWithHoogle (pkgs: pkg.buildInputs ++ pkg.propagatedBuildInputs))
|
||||||
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
name = "${n}";
|
name = "${n}";
|
||||||
|
@ -22,6 +22,11 @@ let
|
|||||||
ghcjscustom = pkgs.haskell.packages.ghcjs84.override {
|
ghcjscustom = pkgs.haskell.packages.ghcjs84.override {
|
||||||
overrides = self: super: {
|
overrides = self: super: {
|
||||||
doctest = null;
|
doctest = null;
|
||||||
|
comonad = dontCheck (super.comonad);
|
||||||
|
classy-prelude = dontCheck (super.classy-prelude);
|
||||||
|
unliftio = dontCheck (super.unliftio);
|
||||||
|
semigroupoids = dontCheck (super.semigroupoids);
|
||||||
|
lens = dontCheck (super.lens);
|
||||||
directory-tree = dontCheck (super.directory-tree);
|
directory-tree = dontCheck (super.directory-tree);
|
||||||
http-types = dontCheck (super.http-types);
|
http-types = dontCheck (super.http-types);
|
||||||
tasty-quickcheck = dontCheck (super.tasty-quickcheck);
|
tasty-quickcheck = dontCheck (super.tasty-quickcheck);
|
||||||
|
Loading…
Reference in New Issue
Block a user