Safe Haskell | None |
---|---|
Language | Haskell2010 |
Test utilities to ensure the proper layout of non-dupable elements within datatypes.
Synopsis
- type family CheckDupablesDistribution (a :: Type) :: Either (Bool, Maybe Symbol, Type) () where ...
- type VerifyDupablesDistribution a = ResToConstraint (CheckDupablesDistribution a)
- checkDupablesDistribution :: forall a. DemoteRes (CheckDupablesDistribution a) => Either BadElement ()
- testDupablesDistribution :: forall a. (Typeable a, DemoteRes (CheckDupablesDistribution a)) => TestTree
- data BadElement = BadElement {}
Documentation
type family CheckDupablesDistribution (a :: Type) :: Either (Bool, Maybe Symbol, Type) () where ... Source #
For the given type, check that at the left subtree of pairs tree it contains only dupable elements, and at the right - only non-dupable ones.
CheckDupablesDistribution a = GCheckDupablesDistribution (Rep a) |
type VerifyDupablesDistribution a = ResToConstraint (CheckDupablesDistribution a) Source #
A constraint that, for the given type, checks that at the left subtree of pairs tree it contains only dupable elements, and at the right - only non-dupable ones.
checkDupablesDistribution :: forall a. DemoteRes (CheckDupablesDistribution a) => Either BadElement () Source #
CheckDupablesDistribution
for term-level.
testDupablesDistribution :: forall a. (Typeable a, DemoteRes (CheckDupablesDistribution a)) => TestTree Source #
A term-level version of VerifyDupablesDistribution
for tests.
data BadElement Source #
Error for checkDupablesDistribution
.
Instances
Eq BadElement Source # | |
Defined in Lorentz.Test.DupableScan (==) :: BadElement -> BadElement -> Bool # (/=) :: BadElement -> BadElement -> Bool # | |
Show BadElement Source # | |
Defined in Lorentz.Test.DupableScan showsPrec :: Int -> BadElement -> ShowS # show :: BadElement -> String # showList :: [BadElement] -> ShowS # | |
Buildable BadElement Source # | |
Defined in Lorentz.Test.DupableScan build :: BadElement -> Builder # |