Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- mkGen :: forall a. (Generic a, GMkGen (Rep a) '[], Typeable a) => GenMap -> Gen a
- mkGenWith :: forall a glist. (Generic a, GMkGen (Rep a) glist, Typeable a) => GenList glist -> GenMap -> Gen a
- emptyGens :: GenMap
- byType :: Typeable t => Gen t -> GenMap -> GenMap
- byField :: forall s (field :: Symbol) t. (KnownSymbol field, Typeable s, Typeable t, FromEither (ValidateSel s (Rep s) field t)) => Gen t -> GenMap -> GenMap
- byPos :: forall s (pos :: Nat) t. (KnownNat pos, Typeable s, Typeable t, FromEither (ValidatePos s (Rep s) pos 1 t)) => Gen t -> GenMap -> GenMap
- data GenList (or :: [*]) where
- type GenMap = TypeRepMap Gen
Documentation
byType :: Typeable t => Gen t -> GenMap -> GenMap Source #
byType
is used to override the Gen
for type t.
This have lower precedences than byField
& byPos
i.e. when there is field or position based override applied to the target type, that gets the percedence. If there is no such overrides, all the occurrences of this type uses the Gen
provided by this override.
byField :: forall s (field :: Symbol) t. (KnownSymbol field, Typeable s, Typeable t, FromEither (ValidateSel s (Rep s) field t)) => Gen t -> GenMap -> GenMap Source #
byPos :: forall s (pos :: Nat) t. (KnownNat pos, Typeable s, Typeable t, FromEither (ValidatePos s (Rep s) pos 1 t)) => Gen t -> GenMap -> GenMap Source #