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

Bumps #2

Merged
merged 4 commits into from
Jan 14, 2025
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
4 changes: 2 additions & 2 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: github-action

on: [push, pull_request]
on: [push, pull_request]

jobs:
build:
strategy:
matrix:
ghc: ['8.6.5', '8.8.4', '8.10.7']
ghc: ['8.6', '8.8', '8.10', '9.0', '9.2', '9.4', '9.6', '9.8', '9.10']
os: ['ubuntu-latest', 'macos-latest']
runs-on: ${{ matrix.os }}

Expand Down
4 changes: 2 additions & 2 deletions monoid-map.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ library

build-depends:
, base >=4 && <5
, commutative-semigroups >= 0.1 && < 0.2
, commutative-semigroups >= 0.1 && < 0.3
, monoidal-containers ^>=0.6
, reflex >=0.8 && < 1
, witherable >=0.3 && <0.5
, witherable >=0.4 && <0.6
, patch >=0.0.8.0 && < 0.1

hs-source-dirs: src
Expand Down
3 changes: 1 addition & 2 deletions src/Data/MonoidMap.hs
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,19 @@
{-# LANGUAGE DataKinds #-}
module Data.MonoidMap where

import Data.Witherable
import Data.Semigroup.Commutative
import Data.Map.Monoidal (MonoidalMap)
import qualified Data.Map.Monoidal as Map
import Data.Semigroup (Semigroup, (<>))
import Reflex (Query, QueryResult, crop, Group(..))
import Data.Monoid.DecidablyEmpty
import GHC.TypeLits
import Witherable

-- | Newtype wrapper around Data.Map.Monoidal.MonoidalMap
newtype MonoidMap k v = MonoidMap { unMonoidMap :: MonoidalMap k v }
deriving (Show, Eq, Ord, Foldable)

instance TypeError (Text "Use mapMonoidMap instead of fmap; MonoidMap is not a Functor because mempty values would need to be deleted, and Functors cannot change the shape of a datastructure") => Functor (MonoidMap k) where

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 8.8 on ubuntu-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 8.8 on ubuntu-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 8.10 on ubuntu-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 8.10 on ubuntu-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 8.6 on ubuntu-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 8.6 on ubuntu-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2 on ubuntu-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2 on ubuntu-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 9.0 on ubuntu-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 9.0 on ubuntu-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 8.6 on ubuntu-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 8.6 on ubuntu-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 8.10 on ubuntu-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 8.10 on ubuntu-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 8.8 on ubuntu-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 8.8 on ubuntu-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 9.0 on ubuntu-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 9.0 on ubuntu-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2 on ubuntu-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2 on ubuntu-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 8.6 on macos-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 8.6 on macos-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 8.10 on macos-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 8.10 on macos-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 8.8 on macos-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 8.8 on macos-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 9.0 on macos-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 9.0 on macos-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2 on macos-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2 on macos-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 8.10 on macos-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 8.10 on macos-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 8.6 on macos-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 8.6 on macos-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 9.0 on macos-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 9.0 on macos-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2 on macos-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2 on macos-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 8.8 on macos-latest

Unticked promoted constructor: ‘Text’.

Check warning on line 29 in src/Data/MonoidMap.hs

View workflow job for this annotation

GitHub Actions / GHC 8.8 on macos-latest

Unticked promoted constructor: ‘Text’.
fmap = error "Impossible"

emptyToNothing :: DecidablyEmpty a => a -> Maybe a
Expand Down
Loading