| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Nix.Diff.Types
Contents
- NOTE: Lawless instances
All the Arbitrary instances here are written to
check if `decode . encode == id` rule was broken,
so they don't respect to internal laws of these types,
such as "Maps from
extraOutputsmust not have intersecting keys" and so on. If you want to test these invariants, you have to rewrite instances manually. - Outputs diff
- Arguments diff
- Sources diff
- Inputs diff
- Environment diff
- Helpers
- Orphan instances
Synopsis
- data Changed a = Changed {}
- newtype TextDiff = TextDiff {
- unTextDiff :: [Item Text]
- type OutputHash = Text
- type Platform = Text
- type Builder = Text
- type Argument = Text
- newtype OutputNames = OutputNames {
- unOutputNames :: Set Text
- data DerivationDiff
- = DerivationsAreTheSame
- | AlreadyCompared
- | OnlyAlreadyComparedBelow { }
- | NamesDontMatch { }
- | OutputsDontMatch { }
- | DerivationDiff { }
- data OutputStructure = OutputStructure {}
- data OutputsDiff = OutputsDiff {
- extraOutputs :: Maybe (Changed (Map Text (DerivationOutput StorePath Text)))
- outputHashDiff :: [OutputDiff]
- data OutputDiff = OutputDiff {}
- newtype ArgumentsDiff = ArgumentsDiff {}
- data SourcesDiff = SourcesDiff {
- extraSrcNames :: Maybe (Changed (Set Text))
- srcFilesDiff :: [SourceFileDiff]
- data SourceFileDiff
- = OneSourceFileDiff { }
- | SomeSourceFileDiff {
- srcName :: Text
- srcFileDiff :: Changed [StorePath]
- data InputsDiff = InputsDiff {}
- data InputDerivationsDiff
- = OneDerivationDiff {
- drvName :: Text
- drvDiff :: DerivationDiff
- | SomeDerivationsDiff { }
- | ManyDerivationsAlreadyComparedDiff { }
- = OneDerivationDiff {
- data EnvironmentDiff
- = EnvironmentsAreEqual
- | EnvironmentDiff {
- extraEnvDiff :: Changed (Map Text Text)
- envContentDiff :: [EnvVarDiff]
- data EnvVarDiff = EnvVarDiff {
- envKey :: Text
- envValueDiff :: TextDiff
- changedToJSON :: (a -> Value) -> Changed a -> Value
- changedFromJSON :: (Value -> Parser a) -> Value -> Parser (Changed a)
- itemToJSON :: ToJSON v => Item v -> Value
- itemFromJSON :: FromJSON v => Value -> Parser (Item v)
- arbitraryItem :: Arbitrary a => Gen (Item a)
- arbitraryDerivationOutput :: (Arbitrary fp, Arbitrary txt) => Gen (DerivationOutput fp txt)
NOTE: Lawless instances
All the Arbitrary instances here are written to
check if `decode . encode == id` rule was broken,
so they don't respect to internal laws of these types,
such as "Maps from extraOutputs must not have
intersecting keys" and so on.
If you want to test these invariants, you have to rewrite
instances manually.
Instances
| Foldable Changed Source # | |
Defined in Nix.Diff.Types Methods fold :: Monoid m => Changed m -> m # foldMap :: Monoid m => (a -> m) -> Changed a -> m # foldMap' :: Monoid m => (a -> m) -> Changed a -> m # foldr :: (a -> b -> b) -> b -> Changed a -> b # foldr' :: (a -> b -> b) -> b -> Changed a -> b # foldl :: (b -> a -> b) -> b -> Changed a -> b # foldl' :: (b -> a -> b) -> b -> Changed a -> b # foldr1 :: (a -> a -> a) -> Changed a -> a # foldl1 :: (a -> a -> a) -> Changed a -> a # elem :: Eq a => a -> Changed a -> Bool # maximum :: Ord a => Changed a -> a # minimum :: Ord a => Changed a -> a # | |
| Traversable Changed Source # | |
| Functor Changed Source # | |
| Arbitrary a => Arbitrary (Changed a) Source # | |
| FromJSON a => FromJSON (Changed a) Source # | |
Defined in Nix.Diff.Types | |
| ToJSON a => ToJSON (Changed a) Source # | |
| Data a => Data (Changed a) Source # | |
Defined in Nix.Diff.Types Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Changed a -> c (Changed a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Changed a) # toConstr :: Changed a -> Constr # dataTypeOf :: Changed a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Changed a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Changed a)) # gmapT :: (forall b. Data b => b -> b) -> Changed a -> Changed a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Changed a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Changed a -> r # gmapQ :: (forall d. Data d => d -> u) -> Changed a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Changed a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Changed a -> m (Changed a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Changed a -> m (Changed a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Changed a -> m (Changed a) # | |
| Generic (Changed a) Source # | |
| Show a => Show (Changed a) Source # | |
| Eq a => Eq (Changed a) Source # | |
| type Rep (Changed a) Source # | |
Defined in Nix.Diff.Types type Rep (Changed a) = D1 ('MetaData "Changed" "Nix.Diff.Types" "nix-diff-1.0.21-9upfo2llU6vKJbTes5Z7ck" 'False) (C1 ('MetaCons "Changed" 'PrefixI 'True) (S1 ('MetaSel ('Just "before") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Just "now") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) | |
Constructors
| TextDiff | |
Fields
| |
Instances
| Arbitrary TextDiff Source # | |
| FromJSON TextDiff Source # | |
Defined in Nix.Diff.Types | |
| ToJSON TextDiff Source # | |
| Data TextDiff Source # | |
Defined in Nix.Diff.Types Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TextDiff -> c TextDiff # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TextDiff # toConstr :: TextDiff -> Constr # dataTypeOf :: TextDiff -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TextDiff) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TextDiff) # gmapT :: (forall b. Data b => b -> b) -> TextDiff -> TextDiff # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TextDiff -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TextDiff -> r # gmapQ :: (forall d. Data d => d -> u) -> TextDiff -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TextDiff -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TextDiff -> m TextDiff # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TextDiff -> m TextDiff # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TextDiff -> m TextDiff # | |
| Show TextDiff Source # | |
| Eq TextDiff Source # | |
type OutputHash = Text Source #
newtype OutputNames Source #
A set of Nix derivation output names.
Constructors
| OutputNames | |
Fields
| |
Instances
data DerivationDiff Source #
Constructors
| DerivationsAreTheSame | |
| AlreadyCompared | |
| OnlyAlreadyComparedBelow | |
Fields | |
| NamesDontMatch | |
Fields | |
| OutputsDontMatch | |
Fields | |
| DerivationDiff | |
Fields
| |
Instances
data OutputStructure Source #
Constructors
| OutputStructure | |
Fields | |
Instances
Outputs diff
data OutputsDiff Source #
Constructors
| OutputsDiff | |
Fields
| |
Instances
data OutputDiff Source #
Constructors
| OutputDiff | |
Fields | |
Instances
Arguments diff
newtype ArgumentsDiff Source #
Constructors
| ArgumentsDiff | |
Fields | |
Instances
Sources diff
data SourcesDiff Source #
Constructors
| SourcesDiff | |
Fields
| |
Instances
data SourceFileDiff Source #
Constructors
| OneSourceFileDiff | |
Fields
| |
| SomeSourceFileDiff | |
Fields
| |
Instances
Inputs diff
data InputsDiff Source #
Constructors
| InputsDiff | |
Fields
| |
Instances
data InputDerivationsDiff Source #
Constructors
| OneDerivationDiff | |
Fields
| |
| SomeDerivationsDiff | |
Fields
| |
| ManyDerivationsAlreadyComparedDiff | Many input derivations differ, but they've all already been compared. |
Instances
Environment diff
data EnvironmentDiff Source #
Constructors
| EnvironmentsAreEqual | |
| EnvironmentDiff | |
Fields
| |
Instances
data EnvVarDiff Source #
Constructors
| EnvVarDiff | |
Fields
| |
Instances
Helpers
arbitraryDerivationOutput :: (Arbitrary fp, Arbitrary txt) => Gen (DerivationOutput fp txt) Source #