module Hix.Managed.Data.EnvContext where
import GHC.Generics (Generically (Generically))
import Hix.Data.Bounds (Ranges)
import Hix.Data.EnvName (EnvName)
import Hix.Data.PackageName (LocalPackage)
import Hix.Managed.Cabal.Data.Config (GhcDb)
import Hix.Managed.Data.Mutable (MutableDep)
import Hix.Managed.Data.Targets (Targets)
data EnvDeps =
EnvDeps {
EnvDeps -> Set MutableDep
mutable :: Set MutableDep,
EnvDeps -> Set LocalPackage
local :: Set LocalPackage
}
deriving stock (EnvDeps -> EnvDeps -> Bool
(EnvDeps -> EnvDeps -> Bool)
-> (EnvDeps -> EnvDeps -> Bool) -> Eq EnvDeps
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EnvDeps -> EnvDeps -> Bool
== :: EnvDeps -> EnvDeps -> Bool
$c/= :: EnvDeps -> EnvDeps -> Bool
/= :: EnvDeps -> EnvDeps -> Bool
Eq, Int -> EnvDeps -> ShowS
[EnvDeps] -> ShowS
EnvDeps -> String
(Int -> EnvDeps -> ShowS)
-> (EnvDeps -> String) -> ([EnvDeps] -> ShowS) -> Show EnvDeps
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EnvDeps -> ShowS
showsPrec :: Int -> EnvDeps -> ShowS
$cshow :: EnvDeps -> String
show :: EnvDeps -> String
$cshowList :: [EnvDeps] -> ShowS
showList :: [EnvDeps] -> ShowS
Show, (forall x. EnvDeps -> Rep EnvDeps x)
-> (forall x. Rep EnvDeps x -> EnvDeps) -> Generic EnvDeps
forall x. Rep EnvDeps x -> EnvDeps
forall x. EnvDeps -> Rep EnvDeps x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. EnvDeps -> Rep EnvDeps x
from :: forall x. EnvDeps -> Rep EnvDeps x
$cto :: forall x. Rep EnvDeps x -> EnvDeps
to :: forall x. Rep EnvDeps x -> EnvDeps
Generic)
deriving (NonEmpty EnvDeps -> EnvDeps
EnvDeps -> EnvDeps -> EnvDeps
(EnvDeps -> EnvDeps -> EnvDeps)
-> (NonEmpty EnvDeps -> EnvDeps)
-> (forall b. Integral b => b -> EnvDeps -> EnvDeps)
-> Semigroup EnvDeps
forall b. Integral b => b -> EnvDeps -> EnvDeps
forall a.
(a -> a -> a)
-> (NonEmpty a -> a)
-> (forall b. Integral b => b -> a -> a)
-> Semigroup a
$c<> :: EnvDeps -> EnvDeps -> EnvDeps
<> :: EnvDeps -> EnvDeps -> EnvDeps
$csconcat :: NonEmpty EnvDeps -> EnvDeps
sconcat :: NonEmpty EnvDeps -> EnvDeps
$cstimes :: forall b. Integral b => b -> EnvDeps -> EnvDeps
stimes :: forall b. Integral b => b -> EnvDeps -> EnvDeps
Semigroup, Semigroup EnvDeps
EnvDeps
Semigroup EnvDeps =>
EnvDeps
-> (EnvDeps -> EnvDeps -> EnvDeps)
-> ([EnvDeps] -> EnvDeps)
-> Monoid EnvDeps
[EnvDeps] -> EnvDeps
EnvDeps -> EnvDeps -> EnvDeps
forall a.
Semigroup a =>
a -> (a -> a -> a) -> ([a] -> a) -> Monoid a
$cmempty :: EnvDeps
mempty :: EnvDeps
$cmappend :: EnvDeps -> EnvDeps -> EnvDeps
mappend :: EnvDeps -> EnvDeps -> EnvDeps
$cmconcat :: [EnvDeps] -> EnvDeps
mconcat :: [EnvDeps] -> EnvDeps
Monoid) via (Generically EnvDeps)
data EnvContext =
EnvContext {
EnvContext -> EnvName
env :: EnvName,
EnvContext -> GhcDb
ghc :: GhcDb,
EnvContext -> Targets
targets :: Targets,
EnvContext -> EnvDeps
deps :: EnvDeps,
EnvContext -> NonEmpty MutableDep
query :: NonEmpty MutableDep,
EnvContext -> Ranges
solverBounds :: Ranges
}
deriving stock (EnvContext -> EnvContext -> Bool
(EnvContext -> EnvContext -> Bool)
-> (EnvContext -> EnvContext -> Bool) -> Eq EnvContext
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EnvContext -> EnvContext -> Bool
== :: EnvContext -> EnvContext -> Bool
$c/= :: EnvContext -> EnvContext -> Bool
/= :: EnvContext -> EnvContext -> Bool
Eq, Int -> EnvContext -> ShowS
[EnvContext] -> ShowS
EnvContext -> String
(Int -> EnvContext -> ShowS)
-> (EnvContext -> String)
-> ([EnvContext] -> ShowS)
-> Show EnvContext
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EnvContext -> ShowS
showsPrec :: Int -> EnvContext -> ShowS
$cshow :: EnvContext -> String
show :: EnvContext -> String
$cshowList :: [EnvContext] -> ShowS
showList :: [EnvContext] -> ShowS
Show, (forall x. EnvContext -> Rep EnvContext x)
-> (forall x. Rep EnvContext x -> EnvContext) -> Generic EnvContext
forall x. Rep EnvContext x -> EnvContext
forall x. EnvContext -> Rep EnvContext x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. EnvContext -> Rep EnvContext x
from :: forall x. EnvContext -> Rep EnvContext x
$cto :: forall x. Rep EnvContext x -> EnvContext
to :: forall x. Rep EnvContext x -> EnvContext
Generic)