Skip to content

Commit

Permalink
Add defaults stanza
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfmpe committed Mar 13, 2024
1 parent 9f374e2 commit ec866dd
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 43 deletions.
31 changes: 14 additions & 17 deletions skeleton/backend/backend.cabal
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
cabal-version: 2.2
name: backend
version: 0.1
cabal-version: >= 1.8
build-type: Simple

common defaults
default-language: Haskell2010
ghc-options: -Wall -O -fno-show-valid-hole-fits
-- unsafe code
-Wincomplete-record-updates -Wincomplete-uni-patterns -Wpartial-fields
-- unneeded code
-Widentities -Wredundant-constraints
if impl(ghc >= 8.8)
ghc-options:
-Wmissing-deriving-strategies

library
import: defaults
hs-source-dirs: src
if impl(ghcjs)
buildable: False
Expand All @@ -14,26 +26,11 @@ library
, obelisk-route
exposed-modules:
Backend
ghc-options: -Wall -O -fno-show-valid-hole-fits
-- unsafe code
-Wincomplete-record-updates -Wincomplete-uni-patterns -Wpartial-fields
-- unneeded code
-Widentities -Wredundant-constraints
if impl(ghc >= 8.8)
ghc-options:
-Wmissing-deriving-strategies

executable backend
import: defaults
main-is: main.hs
hs-source-dirs: src-bin
ghc-options: -Wall -O -fno-show-valid-hole-fits -threaded
-- unsafe code
-Wincomplete-record-updates -Wincomplete-uni-patterns -Wpartial-fields
-- unneeded code
-Widentities -Wredundant-constraints
if impl(ghc >= 8.8)
ghc-options:
-Wmissing-deriving-strategies
if impl(ghcjs)
buildable: False
build-depends: base
Expand Down
22 changes: 13 additions & 9 deletions skeleton/common/common.cabal
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
cabal-version: 2.2
name: common
version: 0.1
cabal-version: >= 1.2
build-type: Simple

library
hs-source-dirs: src
build-depends: base
, obelisk-route
, text
exposed-modules:
Common.Api
Common.Route
common defaults
default-language: Haskell2010
ghc-options: -Wall -O -fno-show-valid-hole-fits
-- unsafe code
-Wincomplete-record-updates -Wincomplete-uni-patterns -Wpartial-fields
Expand All @@ -19,3 +13,13 @@ library
if impl(ghc >= 8.8)
ghc-options:
-Wmissing-deriving-strategies

library
import: defaults
hs-source-dirs: src
build-depends: base
, obelisk-route
, text
exposed-modules:
Common.Api
Common.Route
31 changes: 14 additions & 17 deletions skeleton/frontend/frontend.cabal
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
cabal-version: 2.2
name: frontend
version: 0.1
cabal-version: >= 1.8
build-type: Simple

common defaults
default-language: Haskell2010
ghc-options: -Wall -O -fno-show-valid-hole-fits
-- unsafe code
-Wincomplete-record-updates -Wincomplete-uni-patterns -Wpartial-fields
-- unneeded code
-Widentities -Wredundant-constraints
if impl(ghc >= 8.8)
ghc-options:
-Wmissing-deriving-strategies

library
import: defaults
hs-source-dirs: src
build-depends: base
, common
Expand All @@ -17,16 +29,9 @@ library
, text
exposed-modules:
Frontend
ghc-options: -Wall -O -fno-show-valid-hole-fits
-- unsafe code
-Wincomplete-record-updates -Wincomplete-uni-patterns -Wpartial-fields
-- unneeded code
-Widentities -Wredundant-constraints
if impl(ghc >= 8.8)
ghc-options:
-Wmissing-deriving-strategies

executable frontend
import: defaults
main-is: main.hs
hs-source-dirs: src-bin
build-depends: base
Expand All @@ -35,14 +40,6 @@ executable frontend
, obelisk-frontend
, obelisk-route
, reflex-dom
ghc-options: -Wall -O -fno-show-valid-hole-fits -threaded
-- unsafe code
-Wincomplete-record-updates -Wincomplete-uni-patterns -Wpartial-fields
-- unneeded code
-Widentities -Wredundant-constraints
if impl(ghc >= 8.8)
ghc-options:
-Wmissing-deriving-strategies
if impl(ghcjs)
ghc-options: -dedupe
cpp-options: -DGHCJS_BROWSER
Expand Down

0 comments on commit ec866dd

Please sign in to comment.