-- |
-- Module      : Test.Speculate.Function.A1000
-- Copyright   : (c) 2019-2024 Rudy Matela
-- License     : 3-Clause BSD  (see the file LICENSE)
-- Maintainer  : Rudy Matela <rudy@matela.com.br>
--
-- This module is part of Speculate.
--
-- This module exports a Listable instance for functions along with two toy Eq
-- and Ord instances for functions based on 1000 sample return values.
module Test.Speculate.Function.A1000 () where

import Test.Speculate
import Test.LeanCheck.Function ()
import Test.LeanCheck.Function.List (areEqualFor, compareFor)

instance (Listable a, Eq b) => Eq (a -> b) where
  == :: (a -> b) -> (a -> b) -> Bool
(==) = Int -> (a -> b) -> (a -> b) -> Bool
forall a b.
(Listable a, Eq b) =>
Int -> (a -> b) -> (a -> b) -> Bool
areEqualFor Int
1000

instance (Listable a, Ord b) => Ord (a -> b) where
  compare :: (a -> b) -> (a -> b) -> Ordering
compare = Int -> (a -> b) -> (a -> b) -> Ordering
forall a b.
(Listable a, Ord b) =>
Int -> (a -> b) -> (a -> b) -> Ordering
compareFor Int
1000