{-# OPTIONS_GHC -fno-warn-orphans #-}
module Test.QuickCheck.Instances.Void where

import Test.QuickCheck

import Data.Void (Void, absurd)

-------------------------------------------------------------------------------
-- void
-------------------------------------------------------------------------------

instance CoArbitrary Void where
    coarbitrary :: Void -> Gen b -> Gen b
coarbitrary = Void -> Gen b -> Gen b
forall a. Void -> a
absurd

-- | All @'Void' -> a@ functions are 'absurd'.
instance Function Void where
    function :: (Void -> b) -> Void :-> b
function Void -> b
_ = (forall a. Void -> a) -> Void :-> b
forall void c. (forall b. void -> b) -> void :-> c
functionVoid forall a. Void -> a
absurd