Skip to content

Commit 0ea3f19

Browse files
authored
Merge pull request #41 from jhrcek/jhrcek/ghc-9.12
Add more GHCs to CI config, fix hlint warnings and haddock links
2 parents d8b00fd + 083d082 commit 0ea3f19

File tree

19 files changed

+43
-44
lines changed

19 files changed

+43
-44
lines changed

.github/workflows/haskell.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
ghc: [ '8.10.7', '9.0.1', '9.2.1', '9.10.1' ]
11+
ghc: [ '8.10.7', '9.0.2', '9.2.8', '9.4.8', '9.6.7', '9.8.4', '9.10.1', '9.12.2']
1212
steps:
13-
- uses: actions/checkout@v2
14-
- uses: haskell-actions/[email protected].6
13+
- uses: actions/checkout@v4
14+
- uses: haskell-actions/[email protected].10
1515
with:
1616
ghc-version: ${{ matrix.ghc }}
17-
cabal-version: '3.12'
17+
cabal-version: '3.14'
1818

1919
- name: cabal Cache
2020
uses: actions/cache@v3

examples/getopt.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{-# LANGUAGE OverloadedLabels, LambdaCase #-}
1+
{-# LANGUAGE OverloadedLabels #-}
22
import Control.Lens
33
import Data.Extensible
44
import Data.Extensible.GetOpt

examples/nullable.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ defaultConfig = #columns @= 80 <: #language_extensions @= [] <: nil
1212
main :: IO ()
1313
main = do
1414
config <- hzipWith fromNullable defaultConfig <$> readConfig "path/to/config.json"
15-
putStrLn $ "columns: " ++ (show $ config ^. #columns)
16-
putStrLn $ "language_extensions: " ++ (show $ config ^. #language_extensions)
15+
putStrLn $ "columns: " ++ show (config ^. #columns)
16+
putStrLn $ "language_extensions: " ++ show (config ^. #language_extensions)
1717

1818
-- dummy
1919
readConfig :: FilePath -> IO (ConfigRec :& Nullable (Field Identity))

examples/records.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{-# LANGUAGE TemplateHaskell, DataKinds, TypeOperators, TypeFamilies, FlexibleContexts, OverloadedLabels #-}
1+
{-# LANGUAGE DataKinds, TypeOperators, TypeFamilies, FlexibleContexts, OverloadedLabels #-}
22
import Data.Extensible
33
import Control.Lens
44

extensible-skeleton/src/Data/Extensible/Effect/Default.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{-# LANGUAGE MultiParamTypeClasses, UndecidableInstances #-}
2-
{-# LANGUAGE BangPatterns #-}
32
{-# LANGUAGE ScopedTypeVariables #-}
43
{-# LANGUAGE CPP #-}
54
{-# OPTIONS_GHC -fno-warn-orphans #-}
@@ -117,7 +116,7 @@ instance (Monoid e, Lookup xs "Either" (Const e)) => MonadPlus (Eff xs) where
117116
pCont :: Proxy "Cont"
118117
pCont = Proxy
119118

120-
instance MonadCont (Eff ((ContDef r (Eff xs)) ': xs)) where
119+
instance MonadCont (Eff (ContDef r (Eff xs) ': xs)) where
121120
callCC = callCCEff pCont
122121

123122
-- | mtl-compatible reader

extensible-skeleton/src/Data/Extensible/Effect/TH.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{-# LANGUAGE Trustworthy, TemplateHaskell, LambdaCase, ViewPatterns #-}
1+
{-# LANGUAGE Trustworthy, TemplateHaskellQuotes, LambdaCase, ViewPatterns #-}
22
{-# LANGUAGE CPP #-}
33
{-# LANGUAGE PatternSynonyms #-}
44
------------------------------------------------------------------------

extensible.cabal

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,14 @@ copyright: Copyright (c) 2017-2022 Fumiaki Kinoshita
1616
category: Data, Records
1717
build-type: Simple
1818
stability: experimental
19-
Tested-With: GHC == 8.10.7, GHC == 9.0.1, GHC == 9.2.1, GHC == 9.10.1
19+
Tested-With: GHC == 8.10.7
20+
|| == 9.0.2
21+
|| == 9.2.8
22+
|| == 9.4.8
23+
|| == 9.6.7
24+
|| == 9.8.4
25+
|| == 9.10.1
26+
|| == 9.12.2
2027

2128
extra-source-files:
2229
examples/*.hs
@@ -86,7 +93,7 @@ library
8693
, constraints
8794
, deepseq
8895
, ghc-prim
89-
, hashable >= 1.2 && <1.5
96+
, hashable >= 1.2 && <1.6
9097
, incremental >= 0.3.1
9198
, membership
9299
, prettyprinter ^>= 1.7
@@ -96,7 +103,6 @@ library
96103
, StateVar
97104
, tagged
98105
, template-haskell
99-
, text
100106
, th-lift >= 0.8
101107
, transformers
102108
, unordered-containers

src/Data/Extensible.hs

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,23 @@
1010
--
1111
-- * Basic
1212
--
13-
-- * 'Data.Extensible.Class': basic membership operations.
14-
-- * 'Data.Extensible.Product': Combinators for extensible products
15-
-- * 'Data.Extensible.Sum': the basic interface for extensible sums
16-
-- * 'Data.Extensible.Field': extensible records and variants
17-
-- * 'Data.Extensible.Inclusion': shrinking records and widening variants
13+
-- * [Class]("Data.Extensible.Class"): basic membership operations.
14+
-- * [Product]("Data.Extensible.Product"): Combinators for extensible products
15+
-- * [Sum]("Data.Extensible.Sum"): the basic interface for extensible sums
16+
-- * [Field]("Data.Extensible.Field"): extensible records and variants
17+
-- * [Inclusion]("Data.Extensible.Inclusion"): shrinking records and widening variants
1818
--
1919
-- * Advanced
20-
-- * 'Data.Extensible.Record': Conversion between regular records and
21-
-- extensible records
22-
-- * 'Data.Extensible.Nullable': Nullable records
23-
-- * 'Data.Extensible.Tangle': Extensible tangle
24-
-- * 'Data.Extensible.Effect': Extensible effects
25-
-- * 'Data.Extensible.Match': Extensible pattern match
20+
--
21+
-- * [Record]("Data.Extensible.Record"): Conversion between regular records and extensible records
22+
-- * [Nullable]("Data.Extensible.Nullable"): Nullable records
23+
-- * [Tangle]("Data.Extensible.Tangle"): Extensible tangle
24+
-- * [Effect]("Data.Extensible.Effect"): Extensible effects
25+
-- * [Match]("Data.Extensible.Match"): Extensible pattern match
2626
--
2727
-- * Internal
28-
-- * 'Data.Extensible.Wrapper': Stock wrappers
28+
--
29+
-- * [Wrapper]("Data.Extensible.Wrapper"): Stock wrappers
2930
-----------------------------------------------------------------------------
3031
module Data.Extensible (
3132
module Data.Extensible.Class

src/Data/Extensible/Dictionary.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{-# LANGUAGE LambdaCase #-}
2-
{-# LANGUAGE TemplateHaskell #-}
2+
{-# LANGUAGE TemplateHaskellQuotes #-}
33
{-# LANGUAGE TypeFamilies, ScopedTypeVariables #-}
44
{-# LANGUAGE UndecidableInstances, MultiParamTypeClasses #-}
55
{-# LANGUAGE UndecidableSuperClasses #-}
@@ -45,7 +45,7 @@ import qualified Data.HashMap.Strict as KM
4545
import Data.Functor.Compose
4646
import qualified Data.HashMap.Strict as HM
4747
import Data.Incremental
48-
import Data.Maybe (isJust)
48+
import Data.Maybe (isJust, fromMaybe)
4949
import Data.Monoid (Any(..))
5050
import Prettyprinter
5151
import qualified Data.Vector.Generic as G
@@ -123,7 +123,7 @@ instance WrapForall Bounded h xs => Bounded (xs :& h) where
123123
instance WrapForall TH.Lift h xs => TH.Lift (xs :& h) where
124124
lift = hfoldrWithIndexFor (Proxy :: Proxy (Instance1 TH.Lift h))
125125
(\_ x xs -> infixE (Just $ TH.lift x) (varE '(<:)) (Just xs)) (varE 'nil)
126-
#if MIN_VERSION_template_haskell(2,17,0)
126+
#if MIN_VERSION_template_haskell(2,17,0)
127127
liftTyped e = TH.Code $ TH.TExp <$> TH.lift e
128128
#elif MIN_VERSION_template_haskell(2,16,0)
129129
liftTyped e = TH.TExp <$> TH.lift e
@@ -225,7 +225,7 @@ instance Forall (KeyTargetAre KnownSymbol (Instance1 J.FromJSON h)) xs => J.From
225225
parseJSON = J.withObject "Object" $ \v -> hgenerateFor
226226
(Proxy :: Proxy (KeyTargetAre KnownSymbol (Instance1 J.FromJSON h)))
227227
$ \m -> let k = stringKeyOf m
228-
in fmap Field $ J.prependFailure ("parsing " ++ show k ++ ": ") $ J.parseJSON $ maybe J.Null id $ KM.lookup k v
228+
in fmap Field $ J.prependFailure ("parsing " ++ show k ++ ": ") $ J.parseJSON $ fromMaybe J.Null $ KM.lookup k v
229229

230230
instance Forall (KeyTargetAre KnownSymbol (Instance1 J.ToJSON h)) xs => J.ToJSON (xs :& Field h) where
231231
toJSON = J.Object . hfoldlWithIndexFor

src/Data/Extensible/Field.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
{-# LANGUAGE StandaloneDeriving #-}
44
{-# LANGUAGE ScopedTypeVariables, TypeFamilies #-}
55
{-# LANGUAGE CPP #-}
6-
{-# LANGUAGE TemplateHaskell #-}
76
{-# LANGUAGE UndecidableSuperClasses #-}
87
{-# LANGUAGE PolyKinds #-}
98
-----------------------------------------------------------------------------

0 commit comments

Comments
 (0)