Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
# system
.DS_Store
.vscode

# needed for stack
.stack-work/
*~
haskell-starter-kit.cabal

# cabal specific
dist
dist-*

# nix specific
result*

# Auth key
keys/*
Expand Down
13 changes: 13 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
let
sources = import ./nix/sources.nix {};
haskellNix = import sources.haskellNix {};
pkgs = import
haskellNix.sources.nixpkgs-2105
haskellNix.nixpkgsArgs;
in pkgs.haskell-nix.project {
src = pkgs.haskell-nix.haskellLib.cleanGit {
name = "haskell-starter-kit";
src = ./.;
};
compiler-nix-name = "ghc8107";
}
244 changes: 244 additions & 0 deletions haskell-starter-kit.cabal
Original file line number Diff line number Diff line change
@@ -0,0 +1,244 @@
cabal-version: 2.2
name: haskell-starter-kit
version: 0.1.0.0
description: Please see the README on GitHub at <https://github.com/githubuser/haskell-starter-kit#readme>
homepage: https://github.com/fullstack-development/haskell-starter-kit#readme
bug-reports: https://github.com/fullstack-development/haskell-starter-kit/issues
author: Author name here
maintainer: example@example.com
copyright: 2021 Author name here
license: BSD-3-Clause
license-file: LICENSE
build-type: Simple
extra-source-files:
README.md
ChangeLog.md

source-repository head
type: git
location: https://github.com/fullstack-development/haskell-starter-kit

common lang
default-language: Haskell2010
default-extensions:
RecordWildCards
NamedFieldPuns
OverloadedStrings
FlexibleContexts
FlexibleInstances
StandaloneDeriving
ScopedTypeVariables
ExplicitForAll
TypeOperators
DeriveGeneric
MonoLocalBinds
LambdaCase
DeriveFoldable
DeriveFunctor
DeriveGeneric
DeriveLift
DeriveTraversable
ExplicitForAll
GeneralizedNewtypeDeriving

ghc-options:
-Wall -Wnoncanonical-monad-instances -Wincomplete-uni-patterns
-Wincomplete-record-updates -Wredundant-constraints -Widentities
-fobject-code -fno-ignore-interface-pragmas
-fno-omit-interface-pragmas

library
import: lang
exposed-modules:
AppName.API
AppName.API.PhoneVerification
AppName.API.User
AppName.AppHandle
AppName.Auth
AppName.Auth.Combinators
AppName.Auth.Commands
AppName.Auth.ServantInstances
AppName.Auth.User
AppName.Config
AppName.Domain.PhoneVerification
AppName.Gateways.CryptoRandomGen
AppName.Gateways.Database
AppName.Gateways.Database.Connection
AppName.Gateways.Database.Setup
AppName.Gateways.Database.Tables.User
AppName.Gateways.Endpoints.FakeLogin
AppName.Gateways.Endpoints.GetUsers
AppName.Gateways.Endpoints.PhoneVerification
AppName.Gateways.Endpoints.SaveUsers
AppName.Gateways.PhoneVerificationStorage
AppName.Server
Ext.Data.Aeson
Ext.Data.Text
Ext.Data.Time
Ext.HTTP.Error
Ext.HTTP.Response
Ext.Logger
Ext.Logger.Colog
Ext.Logger.Config
Lib
other-modules:
Paths_haskell_starter_kit
hs-source-dirs:
src
build-depends:
aeson
, base >=4.7 && <5
, basement
, bytestring
, co-log
, containers
, configurator
, cryptonite
, dhall
, directory
, esqueleto
, http-client
, http-client-tls
, jose
, memory
, monad-logger
, mtl
, persistent
, persistent-postgresql
, persistent-template
, postgresql-simple
, random
, resource-pool
, resourcet
, safe-exceptions
, servant-auth
, servant-auth-server
, servant-client
, servant-foreign
, servant-options
, servant-server
, stm
, text
, time
, typerep-map
, unliftio
, unliftio-core
, wai
, wai-cors
, wai-logger
, warp
default-language: Haskell2010

executable haskell-starter-kit-exe
main-is: Main.hs
import: lang
hs-source-dirs:
app
build-depends:
aeson
, base >=4.7 && <5
, basement
, bytestring
, co-log
, containers
, cryptonite
, dhall
, directory
, esqueleto
, haskell-starter-kit
, http-client
, http-client-tls
, jose
, memory
, monad-logger
, mtl
, persistent
, persistent-postgresql
, persistent-template
, postgresql-simple
, random
, resource-pool
, resourcet
, safe-exceptions
, servant-auth
, servant-auth-server
, servant-client
, servant-foreign
, servant-options
, servant-server
, stm
, text
, time
, typerep-map
, unliftio
, unliftio-core
, wai
, wai-cors
, wai-logger
, warp
if false
other-modules:
Paths_haskell_starter_kit
default-language: Haskell2010

test-suite haskell-starter-kit-test
type: exitcode-stdio-1.0
import: lang
main-is: Spec.hs
other-modules:
PhoneVerification
hs-source-dirs:
test
build-depends:
aeson
, base >=4.7 && <5
, basement
, bytestring
, co-log
, containers
, cryptonite
, dhall
, directory
, esqueleto
, haskell-starter-kit
, hspec
, hspec-core
, hspec-wai
, http-client
, http-client-tls
, http-types
, jose
, memory
, monad-logger
, mtl
, persistent
, persistent-postgresql
, persistent-template
, postgresql-simple
, random
, resource-pool
, resourcet
, safe-exceptions
, servant-auth
, servant-auth-server
, servant-client
, servant-foreign
, servant-options
, servant-server
, stm
, tasty
, tasty-hspec
, text
, time
, typerep-map
, unliftio
, unliftio-core
, wai
, wai-cors
, wai-extra
, wai-logger
, warp
if false
other-modules:
Paths_haskell_starter_kit
default-language: Haskell2010
38 changes: 38 additions & 0 deletions nix/sources.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"haskellNix": {
"branch": "master",
"description": "Alternative Haskell Infrastructure for Nixpkgs",
"homepage": "https://input-output-hk.github.io/haskell.nix",
"owner": "input-output-hk",
"repo": "haskell.nix",
"rev": "8cac12db77edfde52377a6a29813e007f11d38e3",
"sha256": "18zmis0n2q578gylyl8383fzackwppng5xwdnrsmr49kf6kby0vx",
"type": "tarball",
"url": "https://github.com/input-output-hk/haskell.nix/archive/8cac12db77edfde52377a6a29813e007f11d38e3.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"niv": {
"branch": "master",
"description": "Easy dependency management for Nix projects",
"homepage": "https://github.com/nmattia/niv",
"owner": "nmattia",
"repo": "niv",
"rev": "65a61b147f307d24bfd0a5cd56ce7d7b7cc61d2e",
"sha256": "17mirpsx5wyw262fpsd6n6m47jcgw8k2bwcp1iwdnrlzy4dhcgqh",
"type": "tarball",
"url": "https://github.com/nmattia/niv/archive/65a61b147f307d24bfd0a5cd56ce7d7b7cc61d2e.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixpkgs": {
"branch": "release-20.03",
"description": "Nix Packages collection",
"homepage": "",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "eb73405ecceb1dc505b7cbbd234f8f94165e2696",
"sha256": "06k21wbyhhvq2f1xczszh3c2934p0m02by3l2ixvd6nkwrqklax7",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/eb73405ecceb1dc505b7cbbd234f8f94165e2696.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}
Loading