Skip to content

Commit

Permalink
Differentiate development and release GHC flags
Browse files Browse the repository at this point in the history
  • Loading branch information
tchoutri committed May 28, 2024
1 parent ebccd6c commit f51f922
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions confer.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ cabal-version: 3.6
name: confer
version: 0.1.0.0
synopsis: The dotfiles manager

description:
Confer is a configuration file manager that symlinks your configuration files into their appropriate locations.
You can put your configuration files in version control and make them easily available to their applications.

license: BSD-3-Clause
license-file: LICENSE
author: Théophile Choutri
Expand All @@ -15,19 +14,22 @@ copyright: 2024 Théophile Choutri
build-type: Simple
extra-doc-files:
CHANGELOG.md
README.md
doc/*.md
README.md

data-dir:
runtime/lua

data-dir: runtime/lua
tested-with: GHC ==9.10.1

flag release
description: Compile the project for release
default: False
manual: True

flag development
description: Compile the project for development
default: True
manual: False

common extensions
default-extensions:
DataKinds
Expand All @@ -50,15 +52,18 @@ common ghc-options
-Wall -Wcompat -Widentities -Wincomplete-record-updates
-Wincomplete-uni-patterns -Wpartial-fields -Wredundant-constraints
-fhide-source-paths -Wno-unused-do-bind -fshow-hole-constraints
-Wno-unticked-promoted-constructors -Werror=unused-imports
-fdicts-strict -fmax-worker-args=16 -fspec-constr-recursive=16
-funbox-strict-fields -Wno-unused-imports
-Wno-unticked-promoted-constructors

if flag(release)
ghc-options:
-flate-specialise -funbox-strict-fields
-finline-generics-aggressively -fexpose-all-unfoldings
-Werror=extended-warnings -Wunused-packages
-Werror=extended-warnings -fdicts-strict -fmax-worker-args=16
-fspec-constr-recursive=16 -funbox-strict-fields
-Wno-unused-packages -Werror=unused-imports

if flag(development)
ghc-options: -finfo-table-map -Wno-unused-imports -Wno-unused-packages

common rts-options
ghc-options: -rtsopts -threaded "-with-rtsopts=-N -T"
Expand All @@ -72,6 +77,7 @@ library
Confer.API.Host
Confer.API.User
Confer.Cmd.Check
Confer.Cmd.Deploy
Confer.Config.Evaluator
Confer.Config.Types
Confer.Effect.Symlink
Expand All @@ -86,14 +92,14 @@ library
, hostname
, hslua-aeson
, hslua-core
, validation-selective
, selective
, hslua-marshalling
, hslua-module-system
, hslua-packaging
, placeholder
, selective
, text
, text-display
, validation-selective
, vector

if !flag(release)
Expand Down

0 comments on commit f51f922

Please sign in to comment.