Skip to content

Commit cd362b4

Browse files
committed
First commit
0 parents  commit cd362b4

File tree

14 files changed

+325
-0
lines changed

14 files changed

+325
-0
lines changed

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Set update schedule for GitHub Actions
2+
3+
version: 2
4+
updates:
5+
6+
- package-ecosystem: "github-actions"
7+
directory: "/"
8+
schedule:
9+
# Check for updates to GitHub Actions every week
10+
interval: "weekly"

.github/workflows/ci.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: CI
2+
3+
# Trigger the workflow on push or pull request, but only for the master branch
4+
on:
5+
pull_request:
6+
push:
7+
branches: ["master"]
8+
9+
jobs:
10+
generate-matrix:
11+
name: "Generate matrix from cabal"
12+
outputs:
13+
matrix: ${{ steps.set-matrix.outputs.matrix }}
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Extract the tested GHC versions
17+
id: set-matrix
18+
uses: kleidukos/[email protected]
19+
with:
20+
cabal-file: prometheus-effectful.cabal
21+
ubuntu-version: "latest"
22+
macos: "macos-13"
23+
version: 0.1.7.0
24+
tests:
25+
name: ${{ matrix.ghc }} on ${{ matrix.os }}
26+
needs: generate-matrix
27+
runs-on: ${{ matrix.os }}
28+
strategy:
29+
matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }}
30+
steps:
31+
- name: Checkout base repo
32+
uses: actions/checkout@v4
33+
34+
- name: Set up Haskell
35+
id: setup-haskell
36+
uses: haskell-actions/setup@v2
37+
with:
38+
ghc-version: ${{ matrix.ghc }}
39+
cabal-version: 'latest'
40+
41+
- name: Freeze
42+
run: cabal freeze
43+
44+
- name: Cache
45+
uses: actions/[email protected]
46+
with:
47+
path: ${{ steps.setup-haskell.outputs.cabal-store }}
48+
key: ${{ runner.os }}-ghc-${{ matrix.ghc }}-cabal-${{ hashFiles('**/plan.json') }}
49+
restore-keys: ${{ runner.os }}-ghc-${{ matrix.ghc }}-
50+
51+
- name: Build
52+
run: cabal build

.github/workflows/lint-actions.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Lint GitHub Actions workflows
2+
on: [push, pull_request]
3+
4+
jobs:
5+
actionlint:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v4
9+
- name: Download actionlint
10+
id: get_actionlint
11+
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
12+
shell: bash
13+
- name: Check workflow files
14+
run: ${{ steps.get_actionlint.outputs.executable }} -color
15+
shell: bash

.github/workflows/linting.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Linting
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: ["main"]
7+
8+
jobs:
9+
fourmolu:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- uses: fourmolu/fourmolu-action@v11
15+
with:
16+
version: "0.17.0.0"
17+
pattern: |
18+
src/**/*.hs
19+
20+
hlint:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: 'Set up HLint'
26+
uses: haskell-actions/hlint-setup@v2
27+
with:
28+
version: '3.8'
29+
30+
- name: 'Run HLint'
31+
uses: haskell-actions/hlint-run@v2
32+
with:
33+
path: '["src/"]'
34+
fail-on: warning

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
*.swp
2+
*~
3+
.ghc.environment.*
4+
.hie
5+
.hspec-failures
6+
cabal.project.local
7+
dist
8+
dist-*

.hlint.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- ignore: {name: "Eta reduce"}
2+
- ignore: {name: "Avoid lambda"}
3+
- ignore: {name: "Use newtype instead of data"}

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# log-effectful-1.0.1.0 (2024-11-07)
2+
* Convert `Log` into a dynamically dispatched effect.
3+
4+
# log-effectful-1.0.0.0 (2022-10-10)
5+
* Initial release.

LICENSE

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Copyright (c) 2025
2+
3+
Permission is hereby granted, free of charge, to any person obtaining
4+
a copy of this software and associated documentation files (the
5+
"Software"), to deal in the Software without restriction, including
6+
without limitation the rights to use, copy, modify, merge, publish,
7+
distribute, sublicense, and/or sell copies of the Software, and to
8+
permit persons to whom the Software is furnished to do so, subject to
9+
the following conditions:
10+
11+
The above copyright notice and this permission notice shall be included
12+
in all copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
lint: ## Run the code linter (HLint)
2+
@find src -name "*.hs" | xargs -P $(PROCS) -I {} hlint --refactor-options="-i" --refactor {}
3+
4+
style: ## Run the code styler (fourmolu and cabal-fmt)
5+
@fourmolu -q --mode inplace src
6+
7+
help: ## Display this help message
8+
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.* ?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
9+
10+
PROCS := $(shell nproc)
11+
12+
.PHONY: all $(MAKECMDGOALS)
13+
14+
.DEFAULT_GOAL := help

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# prometheus-effectful
2+
3+
[![Build Status](https://github.com/haskell-effectful/prometheus-effectful/actions/workflows/ci.yml/badge.svg)](https://github.com/haskell-effectful/prometheus-effectful/actions/workflows/ci.yml)
4+
[![Hackage](https://img.shields.io/hackage/v/prometheus-effectful.svg)](https://hackage.haskell.org/package/prometheus-effectful)
5+

0 commit comments

Comments
 (0)