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

release 0.17.0 #1092

Merged
merged 1 commit into from
Oct 25, 2023
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
1 change: 1 addition & 0 deletions .github/workflows/Cabal-Linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
, "9.0"
, "9.2"
, "9.4"
, "9.6"
]
steps:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Cabal-macOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
30 changes: 15 additions & 15 deletions hnix.cabal
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Nix/Expr/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Nix/Fresh.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)
Expand Down
2 changes: 1 addition & 1 deletion src/Nix/Standard.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
4 changes: 2 additions & 2 deletions src/Nix/Type/Infer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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(..)
)
Expand Down
4 changes: 2 additions & 2 deletions src/Nix/Utils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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(..) )
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
20 changes: 18 additions & 2 deletions src/Nix/Value.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading