release 0.17.0

This commit is contained in:
ners 2023-10-14 17:43:59 +02:00 committed by Anton Latukha
parent 2c7552d115
commit a44d1c49bc
9 changed files with 42 additions and 25 deletions

View File

@ -24,6 +24,7 @@ jobs:
, "9.0"
, "9.2"
, "9.4"
, "9.6"
]
steps:

View File

@ -19,7 +19,7 @@ jobs:
strategy:
matrix:
# It is dev env, so trying to stick to last GHC.
ghc: [ "9.4" ]
ghc: [ "9.6" ]
steps:
- name: "Git checkout"

View File

@ -1,6 +1,6 @@
cabal-version: 2.2
name: hnix
version: 0.16.0
version: 0.17.0
synopsis: Haskell implementation of the Nix language
description: Haskell implementation of the Nix language.
category: System, Data, Nix
@ -351,14 +351,14 @@ common shared
, BangPatterns
, ViewPatterns
build-depends:
base >= 4.12 && < 4.18
base >= 4.12 && < 5
, data-fix >= 0.3.0 && < 0.4
, exceptions >= 0.10.0 && < 0.11
, filepath >= 1.4.2 && < 1.5
, optparse-applicative >= 0.14.3 && < 0.17
, relude >= 1.0.0 && < 1.2
, optparse-applicative >= 0.14.3 && < 0.19
, relude >= 1.0.0 && < 1.3
, serialise >= 0.2.1 && < 0.3
, template-haskell >= 2.13 && < 2.20
, template-haskell >= 2.13 && < 2.22
, time >= 1.8.0 && < 1.9 || >= 1.9.3 && < 1.13
ghc-options:
-Wall
@ -444,7 +444,7 @@ library
, cryptonite
, comonad >= 5.0.4 && < 5.1
, containers >= 0.5.11.0 && < 0.7
, deepseq >= 1.4.3 && <1.5
, deepseq >= 1.4.3 && <1.6
, deriving-compat >= 0.3 && < 0.7
, directory >= 1.3.1 && < 1.4
, extra >= 1.7 && < 1.8
@ -460,11 +460,11 @@ library
, lens-family >= 1.2.2 && < 2.2
, lens-family-core >= 1.2.2 && < 2.2
, lens-family-th >= 0.5.0 && < 0.6
, logict >= 0.6.0 && < 0.7 || >= 0.7.0.2 && < 0.8
, megaparsec >= 7.0 && < 9.3
, logict >= 0.6.0 && < 0.7 || >= 0.7.0.2 && < 0.9
, megaparsec >= 7.0 && < 9.6
, monad-control >= 1.0.2 && < 1.1
, monadlist >= 0.0.2 && < 0.1
, mtl >= 2.2.2 && < 2.3
, mtl >= 2.2.2 && < 2.4
, neat-interpolation >= 0.4 && < 0.6
, parser-combinators >= 1.0.1 && < 1.4
, pretty-show >= 1.9.5 && < 1.11
@ -473,7 +473,7 @@ library
, ref-tf >= 0.5 && < 0.6
, regex-tdfa >= 1.2.3 && < 1.4
, scientific >= 0.3.6 && < 0.4
, semialign >= 1.2 && < 1.3
, semialign >= 1.2 && < 1.4
, some >= 1.0.1 && < 1.1
, split >= 0.2.3 && < 0.3
, syb >= 0.7 && < 0.8
@ -483,13 +483,13 @@ library
-- aka Lift Text, Bytestring, Vector, Containers,
-- we use Lift Text particulrarly for GHC 8.6
, th-lift-instances >= 0.1 && < 0.2
, text >= 1.2.3 && < 2.1
, these >= 1.0.1 && < 1.2
, transformers >= 0.5.5 && < 0.6
, text >= 1.2.3 && < 2.2
, these >= 1.0.1 && < 1.3
, transformers >= 0.5.5 && < 0.7
, transformers-base >= 0.4.5 && < 0.5
, unix-compat >= 0.4.3 && < 0.6
, unix-compat >= 0.4.3 && < 0.8
, unordered-containers >= 0.2.14 && < 0.3
, vector >= 0.12.0 && < 0.13
, vector >= 0.12.0 && < 0.14
, xml >= 1.3.14 && < 1.4
executable hnix

View File

@ -224,7 +224,7 @@ data Params r
( Eq, Ord, Generic, Generic1
, Typeable, Data, NFData, NFData1, Serialise, Binary, ToJSON, ToJSON1, FromJSON, FromJSON1
, Functor, Foldable, Traversable
, Show, Hashable
, Show, Read, Hashable
)
instance IsString (Params r) where

View File

@ -14,7 +14,7 @@ import Control.Monad.Catch ( MonadCatch
, MonadMask
, MonadThrow
)
import Control.Monad.Except ( MonadFix )
import Control.Monad.Fix ( MonadFix )
import Control.Monad.Ref ( MonadAtomicRef(..)
, MonadRef(Ref)
)

View File

@ -19,7 +19,7 @@ import Control.Monad.Catch ( MonadThrow
import Control.Monad.Fail ( MonadFail )
#endif
import Control.Monad.Free ( Free(Free) )
import Control.Monad.Reader ( MonadFix )
import Control.Monad.Fix ( MonadFix )
import Control.Monad.Ref ( MonadRef(newRef)
, MonadAtomicRef
)

View File

@ -26,8 +26,8 @@ import Control.Monad.Catch ( MonadThrow(..)
, MonadCatch(..)
)
import Control.Monad.Except ( MonadError(throwError,catchError) )
import Control.Monad.Logic hiding ( fail )
import Control.Monad.Reader ( MonadFix )
import Control.Monad.Logic
import Control.Monad.Fix ( MonadFix )
import Control.Monad.Ref ( MonadAtomicRef(..)
, MonadRef(..)
)

View File

@ -68,6 +68,7 @@ import Relude hiding ( pass
import Data.Binary ( Binary )
import Data.Data ( Data )
import Codec.Serialise ( Serialise )
import Control.Monad ( foldM )
import Control.Monad.Fix ( MonadFix(..) )
import Control.Monad.Free ( Free(..) )
import Control.Monad.Trans.Control ( MonadTransControl(..) )
@ -84,7 +85,6 @@ import Lens.Family2.Stock ( _1
, _2
)
import qualified System.FilePath as FilePath
import Control.Monad.List (foldM)
#if ENABLE_TRACING
import qualified Relude.Debug as X
@ -310,7 +310,7 @@ replaceExtension = coerce FilePath.replaceExtension
-- | 'Path's 'FilePath.readFile'.
readFile :: MonadIO m => Path -> m Text
readFile = readFileText . coerce
readFile = fmap decodeUtf8 . readFileBS . coerce
-- * Recursion scheme

View File

@ -27,7 +27,6 @@ import Data.Functor.Classes ( Show1
, liftShowsPrec
, showsUnaryWith
, Eq1(liftEq) )
import Data.Eq.Deriving
import qualified Text.Show
import Text.Show ( showsPrec
, showString
@ -140,6 +139,16 @@ data NValueF p m r
deriving (Generic, Typeable, Functor)
-- ** Eq
instance Eq r => Eq (NValueF p m r) where
(==) (NVConstantF x) (NVConstantF y) = x == y
(==) (NVStrF x) (NVStrF y) = x == y
(==) (NVPathF x) (NVPathF y) = x == y
(==) (NVListF x) (NVListF y) = x == y
(==) (NVSetF _ x) (NVSetF _ y) = x == y
(==) _ _ = False
-- ** Eq1
instance Eq1 (NValueF p m) where
@ -715,10 +724,17 @@ type MonadDataErrorContext t f m
instance MonadDataErrorContext t f m => Exception (ValueFrame t f m)
-- * @instance Eq NValue'@
instance (Eq a, Comonad f) => Eq (NValue' t f m a) where
(==) (NValue' (extract -> x)) (NValue' (extract -> y)) = x == y
-- * @instance Eq1 NValue'@
-- TH derivable works only after MonadDataContext
$(deriveEq1 ''NValue')
instance Comonad f => Eq1 (NValue' t f m) where
liftEq eq (NValue' (extract -> x)) (NValue' (extract -> y)) = liftEq eq x y
-- * @NValueF@ traversals, getter & setters