project_init 3.1.23

Quickly initialize projects from a template.
Documentation
name:                {{ project }}
version:             {{ version }}
-- synopsis:
-- description:
homepage:            https://github.com/{{ github_username }}/{{ project }}#readme
license:             {{ license }}
license-file:        LICENSE
author:              {{ name }}
maintainer:          {{ email }}
copyright:           Copyright: (c) {{ year }} {{ name }}
--category:            Data
build-type:          Simple
extra-doc-files:     README.md
                     CHANGELOG.md
extra-source-files:  stack.yaml
                   , cabal.project.local
cabal-version:       1.18

Flag development {
  Description: Enable `-Werror`
  manual: True
  default: False
}

library
  hs-source-dirs:      src
  exposed-modules:     Lib
  build-depends:       base >= 4.3 && < 5
  default-language:    Haskell2010
  if flag(development)
    ghc-options:       -Werror
  if impl(ghc >= 8.0)
    ghc-options:       -Wincomplete-uni-patterns -Wincomplete-record-updates -Wredundant-constraints -Widentities
  if impl(ghc >= 8.4)
    ghc-options:       -Wmissing-export-lists
  ghc-options:         -Wall

executable {{ project }}
  hs-source-dirs:      app
  main-is:             Main.hs
  ghc-options:         -threaded -rtsopts -with-rtsopts=-N
  build-depends:       base
                     , {{ project }}
  default-language:    Haskell2010
  if flag(development)
    ghc-options:       -Werror
  if impl(ghc >= 8.0)
    ghc-options:       -Wincomplete-uni-patterns -Wincomplete-record-updates -Wredundant-constraints -Widentities
  if impl(ghc >= 8.4)
    ghc-options:       -Wmissing-export-lists
  if impl(ghc >= 8.2)
    ghc-options: -Wcpp-undef
  ghc-options:         -Wall

test-suite {{ project }}-test
  type:                exitcode-stdio-1.0
  hs-source-dirs:      test
  main-is:             Spec.hs
  build-depends:       base
                     , {{ project }}
                     , hspec
  if flag(development)
    ghc-options:       -Werror
  if impl(ghc >= 8.0)
    ghc-options:       -Wincomplete-uni-patterns -Wincomplete-record-updates -Wredundant-constraints -Widentities
  if impl(ghc >= 8.4)
    ghc-options:       -Wmissing-export-lists
  if impl(ghc >= 8.2)
    ghc-options: -Wcpp-undef
  ghc-options:         -threaded -rtsopts -with-rtsopts=-N -Wall
  default-language:    Haskell2010

benchmark {{ project }}-bench
  type:                exitcode-stdio-1.0
  hs-source-dirs:      bench
  main-is:             Bench.hs
  build-depends:       base
                     , {{ project }}
                     , criterion
  if flag(development)
    ghc-options:       -Werror
  if impl(ghc >= 8.0)
    ghc-options:       -Wincomplete-uni-patterns -Wincomplete-record-updates -Wredundant-constraints -Widentities
  if impl(ghc >= 8.4)
    ghc-options:       -Wmissing-export-lists
  if impl(ghc >= 8.2)
    ghc-options: -Wcpp-undef
  ghc-options:         -threaded -rtsopts -with-rtsopts=-N -O3 -Wall
  default-language:    Haskell2010

source-repository head
  type:     git
  location: https://github.com/{{ github_username }}/{{ project }}