Skip to content

Commit

Permalink
Add the Example.hs file to the .cabal file as an executable
Browse files Browse the repository at this point in the history
  • Loading branch information
cdepillabout committed Dec 19, 2023
1 parent f0b401e commit 57ca655
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions prometheus.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ description:
extra-source-files: Example.hs
, README.md

-- This flag builds the Example.hs file. It is only used for testing. It
-- is enabled in CI.
flag buildexamples
description: Build the Example.hs file. This is normally only used for testing.
default: False

library
hs-source-dirs: src
default-language: Haskell2010
Expand Down Expand Up @@ -95,6 +101,20 @@ library
, wai >= 3.2 && < 3.3
, warp >= 3.2 && < 3.5

executable prometheus-example
main-is: Example.hs
default-language: Haskell2010

ghc-options: -Wall -fwarn-tabs -fno-warn-unused-do-bind

build-depends: base
, prometheus

if flag(buildexamples)
buildable: True
else
buildable: False

source-repository head
type: git
location: https://github.com/bitnomial/prometheus

0 comments on commit 57ca655

Please sign in to comment.