Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#62] Support GHC 9.2 #63

Merged
merged 3 commits into from
Jun 10, 2022
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
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: "GA"
include: "scope"
labels:
- "CI"
- "dependencies"
65 changes: 25 additions & 40 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
name: CI

# Trigger the workflow on push or pull request, but only for the main branch
on:
pull_request:
types: [synchronize, opened, reopened]
push:
branches: [main]
schedule:
# additionally run once per week (At 00:00 on Sunday) to maintain cache
- cron: '0 0 * * 0'

jobs:
cabal:
Expand All @@ -13,24 +16,28 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
cabal: ["3.4"]
cabal: ["3.6.2.0"]
ghc:
- "8.4.4"
- "8.6.5"
- "8.8.4"
- "8.10.4"
- "9.0.1"
- "8.10.7"
- "9.0.2"
- "9.2.2"
exclude:
- os: macOS-latest
ghc: 8.10.4
ghc: 9.0.2
- os: macOS-latest
ghc: 8.8.4
- os: macOS-latest
ghc: 8.6.5
- os: macOS-latest
ghc: 8.4.4
- os: macOS-latest
ghc: 8.2.2

- os: windows-latest
ghc: 8.10.4
ghc: 9.0.2
- os: windows-latest
ghc: 8.8.4
- os: windows-latest
Expand All @@ -40,62 +47,40 @@ jobs:

steps:
- uses: actions/checkout@v2
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/main'

- uses: haskell/actions/setup@v1
- uses: haskell/actions/setup@v1.2
id: setup-haskell-cabal
name: Setup Haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}

- name: Configure
run: |
cabal configure --enable-tests --enable-benchmarks --enable-documentation --test-show-details=direct --write-ghc-environment-files=always

- name: Freeze
run: |
cabal freeze

- uses: actions/cache@v1
- uses: actions/cache@v3
name: Cache ~/.cabal/store
with:
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }}
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}

- name: Install dependencies
run: |
cabal build all --only-dependencies

- name: Build
run: |
cabal configure --enable-tests --enable-benchmarks --test-show-details=direct --write-ghc-environment-files=always
cabal build all

- name: Test
run: |
cabal test all

stack:
name: stack / ghc ${{ matrix.ghc }}
runs-on: ubuntu-latest
strategy:
matrix:
stack: ["2.5"]
ghc: ["8.10.4"]

steps:
- uses: actions/checkout@v2
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/main'

- uses: haskell/actions/setup@v1
name: Setup Haskell Stack
with:
ghc-version: ${{ matrix.ghc }}
stack-version: ${{ matrix.stack }}

- uses: actions/cache@v1
name: Cache ~/.stack
with:
path: ~/.stack
key: ${{ runner.os }}-${{ matrix.ghc }}-stack

- name: Build
run: |
stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks

- name: Test
- name: Documentation
run: |
stack test --system-ghc
cabal haddock
48 changes: 0 additions & 48 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
Expand Up @@ -3,6 +3,11 @@
`validation-selective` uses [PVP Versioning][1].
The changelog is available [on GitHub][2].

## 0.1.0.2 — Nov 16, 2021

* [#62](https://github.com/kowainik/validation-selective/issues/62):
Support GHC-9.2.

## 🥧 0.1.0.1 — Mar 14, 2021

* [#57](https://github.com/kowainik/validation-selective/issues/57):
Expand Down
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@

![Logo](https://user-images.githubusercontent.com/8126674/76859713-c0880200-6851-11ea-8bc1-bb9dee87d44f.png)
[![GitHub CI](https://github.com/kowainik/validation-selective/workflows/CI/badge.svg)](https://github.com/kowainik/validation-selective/actions)
[![Build status](https://img.shields.io/travis/kowainik/validation-selective.svg?logo=travis)](https://travis-ci.org/kowainik/validation-selective)
[![Windows build status](https://ci.appveyor.com/api/projects/status/github/kowainik/validation-selective?branch=main&svg=true)](https://ci.appveyor.com/project/kowainik/validation-selective)

[![Hackage](https://img.shields.io/hackage/v/validation-selective.svg?logo=haskell)](https://hackage.haskell.org/package/validation-selective)
[![Stackage Lts](http://stackage.org/package/validation-selective/badge/lts)](http://stackage.org/lts/package/validation-selective)
[![Stackage Nightly](http://stackage.org/package/validation-selective/badge/nightly)](http://stackage.org/nightly/package/validation-selective)
[![MPL-2.0 license](https://img.shields.io/badge/license-MPL--2.0-blue.svg)](LICENSE)

Lightweight pure data validation based on `Applicative` and `Selective` functors.
Expand Down
34 changes: 0 additions & 34 deletions appveyor.yml

This file was deleted.

6 changes: 3 additions & 3 deletions src/Validation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -645,8 +645,8 @@ instance (Semigroup e, Monoid e) => Alternative (Validation e) where
{-# INLINE empty #-}

(<|>) :: Validation e a -> Validation e a -> Validation e a
s@Success{} <|> _ = s
_ <|> s@Success{} = s
s@Success{} <|> _ = s
_ <|> s@Success{} = s
Failure e <|> Failure e' = Failure (e <> e')
{-# INLINE (<|>) #-}

Expand Down Expand Up @@ -851,7 +851,7 @@ In case it is used by mistake, the user will see the following:
...
-}
instance (NoValidationMonadError, Semigroup e) => Monad (Validation e) where
return = error "Unreachable Validation instance of Monad"
return = pure
(>>=) = error "Unreachable Validation instance of Monad"

-- | Helper type family to produce error messages
Expand Down
1 change: 0 additions & 1 deletion stack.yaml

This file was deleted.

20 changes: 13 additions & 7 deletions validation-selective.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 2.4
name: validation-selective
version: 0.1.0.1
version: 0.1.0.2
synopsis: Lighweight pure data validation based on Applicative and Selective functors
description:
Lighweight pure data validation based on Applicative and Selective
Expand All @@ -27,16 +27,17 @@ extra-doc-files: README.md
CHANGELOG.md
tested-with: GHC == 8.4.4
GHC == 8.6.5
GHC == 8.8.3
GHC == 8.10.4
GHC == 9.0.1
GHC == 8.8.4
GHC == 8.10.7
GHC == 9.0.2
GHC == 9.2.2

source-repository head
type: git
location: https://github.com/kowainik/validation-selective.git

common common-options
build-depends: base >= 4.11.1.0 && < 4.16
build-depends: base >= 4.11 && < 4.17

ghc-options: -Wall
-Wcompat
Expand All @@ -53,6 +54,11 @@ common common-options
ghc-options: -Wmissing-deriving-strategies
if impl(ghc >= 8.10)
ghc-options: -Wunused-packages
if impl(ghc >= 9.0)
ghc-options: -Winvalid-haddock
if impl(ghc >= 9.2)
ghc-options: -Wredundant-bang-patterns
-Woperator-whitespace

default-language: Haskell2010
default-extensions: ConstraintKinds
Expand Down Expand Up @@ -88,7 +94,7 @@ test-suite validation-selective-test
Test.Properties
build-depends: validation-selective
, hedgehog >= 1.0 && < 1.2
, hspec >= 2.7.1 && < 2.9
, hspec >= 2.7.1 && < 2.10
, hspec-hedgehog ^>= 0.0.1.1
, selective
, text ^>= 1.2.3
Expand All @@ -101,5 +107,5 @@ test-suite validation-selective-doctest
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Doctest.hs
build-depends: doctest >= 0.16 && < 0.19
build-depends: doctest >= 0.16 && < 0.20
ghc-options: -threaded