working nix setup and a working database setup

This commit is contained in:
Jack Wines 2022-01-29 20:09:17 -05:00
parent 2b82da81f8
commit b61dc2d4fc
7 changed files with 556 additions and 139 deletions

View file

@ -1,62 +1,65 @@
cabal-version: 3.0
name: rcv-site
version: 0.1.0.0
category: Web
build-type: Simple
cabal-version: >=1.10
executable server
main-is:
Main.hs
if impl(ghcjs)
buildable: False
else
default-language:
Haskell2010
default-extensions:
ScopedTypeVariables,
OverloadedStrings,
OverloadedLists,
TemplateHaskell,
DataKinds,
FlexibleContexts,
FlexibleInstances,
MultiParamTypeClasses,
OverloadedLabels
TypeFamilies,
UndecidableInstances,
RecursiveDo,
RecordWildCards,
RankNTypes,
DuplicateRecordFields,
TupleSections,
TypeOperators,
DeriveGeneric
hs-source-dirs:
server,
shared
build-depends:
acid-state,
aeson,
base < 5,
containers,
http-types,
lucid,
miso,
mtl,
network-uri,
servant,
servant-lucid,
servant-server,
text,
wai,
wai-app-static,
wai-extra,
warp
default-language:
Haskell2010
other-modules:
API
InstantRunoff
default-extensions:
DataKinds,
DeriveAnyClass,
DeriveGeneric,
DuplicateRecordFields,
FlexibleContexts,
FlexibleInstances,
MultiParamTypeClasses,
OverloadedLabels,
OverloadedLists,
OverloadedStrings,
RankNTypes,
RecordWildCards,
RecursiveDo,
ScopedTypeVariables,
TemplateHaskell,
TupleSections,
TypeFamilies,
TypeOperators,
UndecidableInstances,
StandaloneDeriving
hs-source-dirs:
server,
shared
build-depends:
aeson,
base,
beam-core,
beam-sqlite,
beam-migrate,
containers,
http-types,
lucid,
miso,
mtl,
network-uri,
servant,
servant-lucid,
servant-server,
sqlite-simple,
text,
wai,
wai-app-static,
wai-extra,
warp
default-language:
Haskell2010
other-modules:
API
Database
InstantRunoff
-- this has to be built with ghcjs to be useful,
-- but ghc should still be able build it
@ -64,14 +67,14 @@ executable client
main-is:
Main.hs
default-extensions:
ScopedTypeVariables,
OverloadedStrings,
OverloadedLists,
DataKinds,
TypeOperators,
RecordWildCards,
DeriveGeneric,
DuplicateRecordFields,
DeriveGeneric
OverloadedLists,
OverloadedStrings,
RecordWildCards,
ScopedTypeVariables,
TypeOperators
ghcjs-options:
-dedupe -DGHCJS_GC_INTERVAL=5000
hs-source-dirs:
@ -83,7 +86,8 @@ executable client
containers,
miso,
servant,
-- servant-client-ghcjs,
-- beam-core,
text
-- servant-client-ghcjs
default-language:
Haskell2010