    {-# LANGUAGE AllowAmbiguousTypes #-}
    {-# LANGUAGE MultiParamTypeClasses #-}
    {-# LANGUAGE ScopedTypeVariables #-}

    -- | Tests for GenValidity instances
    module Test.Validity.GenValidity.Property
      ( genGeneratesValid,
        genGeneratesInvalid,
      )
    where

    import Data.GenValidity
    import Test.QuickCheck
    import Test.Validity.Property.Utils

    -- | The given generator generates only valid data points
    genGeneratesValid ::
      forall a.
      (Show a, Validity a) =>
      Gen a ->
      Property
    genGeneratesValid :: forall a. (Show a, Validity a) => Gen a -> Property
    genGeneratesValid Gen a
    gen = Gen a -> (a -> Expectation) -> Property
    forall a prop.
    (Show a, Testable prop) =>
    Gen a -> (a -> prop) -> Property
    forAll Gen a
    gen a -> Expectation
    forall a. (Show a, Validity a) => a -> Expectation
    shouldBeValid

    -- | The given generator generates only invalid data points
    genGeneratesInvalid ::
      forall a.
      (Show a, Validity a) =>
      Gen a ->
      Property
    genGeneratesInvalid :: forall a. (Show a, Validity a) => Gen a -> Property
    genGeneratesInvalid Gen a
    gen = Gen a -> (a -> Expectation) -> Property
    forall a prop.
    (Show a, Testable prop) =>
    Gen a -> (a -> prop) -> Property
    forAll Gen a
    gen a -> Expectation
    forall a. (Show a, Validity a) => a -> Expectation
    shouldBeInvalid