-- | Internal.
--
-- This is because 'itemsRelated' handles @"additionalItems"@ validation.
additionalItemsVal
    :: forall err schema.
       (schema -> Value -> [err])
    -> AdditionalItems schema
    -> [(JP.Index, Value)]
       -- ^ The elements remaining to validate after the ones covered by
       -- @"items"@ have been removed.
    -> Maybe (AdditionalItemsInvalid err)
additionalItemsVal _ (AdditionalBool True) _ = Nothing
additionalItemsVal
    :: forall err schema.
       (schema -> Value -> [err])
    -> AdditionalItems schema
    -> [(JP.Index, Value)]
       -- ^ The elements remaining to validate after the ones covered by
       -- @"items"@ have been removed.
    -> Maybe (AdditionalItemsInvalid err)
additionalItemsVal _ (AdditionalBool True) _ = Nothing
additionalItemsVal _ (AdditionalBool True) _ = Nothing