Skip to content
Merged
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: 1 addition & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ jobs:
cabal:
- "latest"
ghc:
- "8.10.7"
- "9.0.2"
- "9.2.8"
- "9.4.8"
- "9.6.6"
- "9.8.2"
- "9.10.3"
Expand Down Expand Up @@ -64,13 +60,10 @@ jobs:
# ghc must match each snapshot's compiler exactly, since we build
# with --system-ghc against the GHC provisioned by the setup action.
plan:
- { resolver: "--stack-yaml ./stack-8.10.yaml", ghc: "8.10.7" }
- { resolver: "--stack-yaml ./stack-9.0.yaml", ghc: "9.0.2" }
- { resolver: "--stack-yaml ./stack-9.2.yaml", ghc: "9.2.8" }
- { resolver: "--stack-yaml ./stack-9.4.yaml", ghc: "9.4.8" }
- { resolver: "--stack-yaml ./stack-9.6.yaml", ghc: "9.6.6" }
- { resolver: "--stack-yaml ./stack-9.8.yaml", ghc: "9.8.4" }
- { resolver: "--stack-yaml ./stack-9.10.yaml", ghc: "9.10.3" }
- { resolver: "--stack-yaml ./stack-9.12.yaml", ghc: "9.12.4" }

steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
Expand Down
11 changes: 0 additions & 11 deletions .hgignore

This file was deleted.

32 changes: 0 additions & 32 deletions .travis.yml

This file was deleted.

5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

## Unreleased

* Raise the minimum supported GHC to 9.6 (`base >= 4.18`). Older compilers
are no longer tested in CI.

## 2.4.0

* Add a `reset` function to the
Expand Down
3 changes: 2 additions & 1 deletion prometheus.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ maintainer: luke@bitnomial.com, opensource@bitnomial.com
copyright: Bitnomial, Inc. (c) 2016-2023
category: Metrics, Monitoring, Web, System
build-type: Simple
tested-with: GHC == 9.6.6, GHC == 9.8.2, GHC == 9.8.4, GHC == 9.10.3, GHC == 9.12.4
cabal-version: >=1.10

description:
Expand Down Expand Up @@ -88,7 +89,7 @@ library
, System.Metrics.Prometheus.Registry
, System.Metrics.Prometheus.RegistryT

build-depends: base >= 4.9 && < 5
build-depends: base >= 4.18 && < 5
, atomic-primops >= 0.8 && < 0.9
, bytestring >= 0.10 && < 0.13
, containers >= 0.5 && < 0.8
Expand Down
1 change: 0 additions & 1 deletion src/System/Metrics/Prometheus/Concurrent/Registry.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ module System.Metrics.Prometheus.Concurrent.Registry (
sample,
) where

import Control.Applicative ((<$>))
import Control.Concurrent.MVar (
MVar,
modifyMVarMasked,
Expand Down
1 change: 0 additions & 1 deletion src/System/Metrics/Prometheus/Concurrent/RegistryT.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

module System.Metrics.Prometheus.Concurrent.RegistryT where

import Control.Applicative ((<$>))
import Control.Monad.IO.Class (MonadIO, liftIO)
import Control.Monad.Trans.Class (MonadTrans)
import Control.Monad.Trans.Reader (
Expand All @@ -23,7 +22,7 @@
)
import System.Metrics.Prometheus.Registry (
RegistrySample,
listMetricIds,

Check warning on line 25 in src/System/Metrics/Prometheus/Concurrent/RegistryT.hs

View workflow job for this annotation

GitHub Actions / stack --stack-yaml ./stack-9.6.yaml / ubuntu-latest

The import of ‘listMetricIds’

Check warning on line 25 in src/System/Metrics/Prometheus/Concurrent/RegistryT.hs

View workflow job for this annotation

GitHub Actions / stack --stack-yaml ./stack-9.8.yaml / ubuntu-latest

The import of ‘listMetricIds’

Check warning on line 25 in src/System/Metrics/Prometheus/Concurrent/RegistryT.hs

View workflow job for this annotation

GitHub Actions / cabal / ghc-9.6.6 / ubuntu-latest

The import of ‘listMetricIds’

Check warning on line 25 in src/System/Metrics/Prometheus/Concurrent/RegistryT.hs

View workflow job for this annotation

GitHub Actions / cabal / ghc-9.8.2 / ubuntu-latest

The import of ‘listMetricIds’

Check warning on line 25 in src/System/Metrics/Prometheus/Concurrent/RegistryT.hs

View workflow job for this annotation

GitHub Actions / cabal / ghc-9.10.3 / ubuntu-latest

The import of ‘listMetricIds’

Check warning on line 25 in src/System/Metrics/Prometheus/Concurrent/RegistryT.hs

View workflow job for this annotation

GitHub Actions / cabal / ghc-9.12.4 / ubuntu-latest

The import of ‘listMetricIds’

Check warning on line 25 in src/System/Metrics/Prometheus/Concurrent/RegistryT.hs

View workflow job for this annotation

GitHub Actions / stack --stack-yaml ./stack-9.12.yaml / ubuntu-latest

The import of ‘listMetricIds’

Check warning on line 25 in src/System/Metrics/Prometheus/Concurrent/RegistryT.hs

View workflow job for this annotation

GitHub Actions / cabal / prometheus-ghc-stats / ghc-9.10.3 / ubuntu-latest

The import of ‘listMetricIds’

Check warning on line 25 in src/System/Metrics/Prometheus/Concurrent/RegistryT.hs

View workflow job for this annotation

GitHub Actions / cabal / prometheus-ghc-stats / ghc-9.12.4 / ubuntu-latest

The import of ‘listMetricIds’
)


Expand Down
1 change: 0 additions & 1 deletion src/System/Metrics/Prometheus/Encode/Text.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
intersperse,
)
import qualified Data.Map as Map
import Data.Monoid ((<>))

import System.Metrics.Prometheus.Encode.Text.Histogram (encodeHistogram)
import System.Metrics.Prometheus.Encode.Text.MetricId (
Expand Down Expand Up @@ -45,7 +44,7 @@
encodeHeader mid sample <> newline
<> mconcat (intersperse newline $ map encodeMetric group)
where
(mid, sample) = head group

Check warning on line 47 in src/System/Metrics/Prometheus/Encode/Text.hs

View workflow job for this annotation

GitHub Actions / stack --stack-yaml ./stack-9.8.yaml / ubuntu-latest

In the use of ‘head’

Check warning on line 47 in src/System/Metrics/Prometheus/Encode/Text.hs

View workflow job for this annotation

GitHub Actions / cabal / ghc-9.8.2 / ubuntu-latest

In the use of ‘head’

Check warning on line 47 in src/System/Metrics/Prometheus/Encode/Text.hs

View workflow job for this annotation

GitHub Actions / cabal / ghc-9.10.3 / ubuntu-latest

In the use of ‘head’

Check warning on line 47 in src/System/Metrics/Prometheus/Encode/Text.hs

View workflow job for this annotation

GitHub Actions / cabal / ghc-9.12.4 / ubuntu-latest

In the use of ‘head’

Check warning on line 47 in src/System/Metrics/Prometheus/Encode/Text.hs

View workflow job for this annotation

GitHub Actions / stack --stack-yaml ./stack-9.12.yaml / ubuntu-latest

In the use of ‘head’

Check warning on line 47 in src/System/Metrics/Prometheus/Encode/Text.hs

View workflow job for this annotation

GitHub Actions / cabal / prometheus-ghc-stats / ghc-9.10.3 / ubuntu-latest

In the use of ‘head’

Check warning on line 47 in src/System/Metrics/Prometheus/Encode/Text.hs

View workflow job for this annotation

GitHub Actions / cabal / prometheus-ghc-stats / ghc-9.12.4 / ubuntu-latest

In the use of ‘head’


encodeMetric :: (MetricId, MetricSample) -> Builder
Expand Down
1 change: 0 additions & 1 deletion src/System/Metrics/Prometheus/Encode/Text/Histogram.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ module System.Metrics.Prometheus.Encode.Text.Histogram (
import Data.ByteString.Builder (Builder)
import Data.List (intersperse)
import qualified Data.Map as Map
import Data.Monoid ((<>))

import System.Metrics.Prometheus.Encode.Text.MetricId (
encodeDouble,
Expand Down
1 change: 0 additions & 1 deletion src/System/Metrics/Prometheus/Encode/Text/MetricId.hs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import Data.ByteString.Builder (
intDec,
)
import Data.List (intersperse)
import Data.Monoid ((<>))
import Data.Text (Text, replace)
import Data.Text.Encoding (encodeUtf8)
import Data.Text.Lazy (toStrict)
Expand Down
1 change: 0 additions & 1 deletion src/System/Metrics/Prometheus/Http/Scrape.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ module System.Metrics.Prometheus.Http.Scrape (
prometheusApp,
) where

import Control.Applicative ((<$>))
import Control.Monad.IO.Class (
MonadIO,
liftIO,
Expand Down
1 change: 0 additions & 1 deletion src/System/Metrics/Prometheus/Metric/Counter.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
set,
) where

import Control.Applicative ((<$>))
import Control.Monad (when)

Check warning on line 12 in src/System/Metrics/Prometheus/Metric/Counter.hs

View workflow job for this annotation

GitHub Actions / stack --stack-yaml ./stack-9.6.yaml / ubuntu-latest

The import of ‘Control.Monad’ is redundant

Check warning on line 12 in src/System/Metrics/Prometheus/Metric/Counter.hs

View workflow job for this annotation

GitHub Actions / stack --stack-yaml ./stack-9.8.yaml / ubuntu-latest

The import of ‘Control.Monad’ is redundant

Check warning on line 12 in src/System/Metrics/Prometheus/Metric/Counter.hs

View workflow job for this annotation

GitHub Actions / cabal / ghc-9.6.6 / ubuntu-latest

The import of ‘Control.Monad’ is redundant

Check warning on line 12 in src/System/Metrics/Prometheus/Metric/Counter.hs

View workflow job for this annotation

GitHub Actions / cabal / ghc-9.8.2 / ubuntu-latest

The import of ‘Control.Monad’ is redundant

Check warning on line 12 in src/System/Metrics/Prometheus/Metric/Counter.hs

View workflow job for this annotation

GitHub Actions / cabal / ghc-9.10.3 / ubuntu-latest

The import of ‘Control.Monad’ is redundant

Check warning on line 12 in src/System/Metrics/Prometheus/Metric/Counter.hs

View workflow job for this annotation

GitHub Actions / cabal / ghc-9.12.4 / ubuntu-latest

The import of ‘Control.Monad’ is redundant

Check warning on line 12 in src/System/Metrics/Prometheus/Metric/Counter.hs

View workflow job for this annotation

GitHub Actions / stack --stack-yaml ./stack-9.12.yaml / ubuntu-latest

The import of ‘Control.Monad’ is redundant

Check warning on line 12 in src/System/Metrics/Prometheus/Metric/Counter.hs

View workflow job for this annotation

GitHub Actions / cabal / prometheus-ghc-stats / ghc-9.10.3 / ubuntu-latest

The import of ‘Control.Monad’ is redundant

Check warning on line 12 in src/System/Metrics/Prometheus/Metric/Counter.hs

View workflow job for this annotation

GitHub Actions / cabal / prometheus-ghc-stats / ghc-9.12.4 / ubuntu-latest

The import of ‘Control.Monad’ is redundant
import Data.Atomics.Counter (AtomicCounter, incrCounter, newCounter, writeCounter)


Expand Down
1 change: 0 additions & 1 deletion src/System/Metrics/Prometheus/Metric/Gauge.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ module System.Metrics.Prometheus.Metric.Gauge (
modifyAndSample,
) where

import Control.Applicative ((<$>))
import Data.IORef (IORef, atomicModifyIORef', newIORef)


Expand Down
1 change: 0 additions & 1 deletion src/System/Metrics/Prometheus/Metric/Histogram.hs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ module System.Metrics.Prometheus.Metric.Histogram (
reset,
) where

import Control.Applicative ((<$>))
import Control.Monad (void)
import Data.Bool (bool)
import Data.IORef (
Expand Down
2 changes: 0 additions & 2 deletions src/System/Metrics/Prometheus/MetricId.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import Data.Bifunctor (first)
import Data.Char (isDigit)
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Monoid (Monoid)
import Data.Semigroup (Semigroup)
import Data.String (IsString (..))
import Data.Text (Text)
import qualified Data.Text as Text
Expand Down
6 changes: 1 addition & 5 deletions src/System/Metrics/Prometheus/Registry.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{-# LANGUAGE DeriveDataTypeable #-}

module System.Metrics.Prometheus.Registry (
Registry,
RegistrySample (..),
Expand All @@ -12,11 +10,9 @@ module System.Metrics.Prometheus.Registry (
sample,
) where

import Control.Applicative ((<$>))
import Control.Exception (Exception, throw)
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Typeable (Typeable)

import System.Metrics.Prometheus.Metric (
Metric (..),
Expand All @@ -42,7 +38,7 @@ newtype Registry = Registry {unRegistry :: Map MetricId Metric}
newtype RegistrySample = RegistrySample {unRegistrySample :: Map MetricId MetricSample}


newtype KeyError = KeyError MetricId deriving (Show, Typeable)
newtype KeyError = KeyError MetricId deriving (Show)
instance Exception KeyError


Expand Down
1 change: 0 additions & 1 deletion src/System/Metrics/Prometheus/RegistryT.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

module System.Metrics.Prometheus.RegistryT where

import Control.Applicative ((<$>))
import Control.Monad.IO.Class (MonadIO, liftIO)
import Control.Monad.Trans.Class (MonadTrans)
import Control.Monad.Trans.State.Strict (
Expand Down
6 changes: 0 additions & 6 deletions stack-8.10.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions stack-9.0.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion stack-9.2.yaml → stack-9.12.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
resolver: lts-20.26
resolver: nightly-2026-10-09
flags: {}
packages:
- "."
Expand Down
6 changes: 0 additions & 6 deletions stack-9.4.yaml

This file was deleted.

Loading