{-# OPTIONS --cubical --safe #-}

module Testers where

open import Prelude
open import Data.List using (List; map; _⋯_)
open import Data.List.Sugar using (liftA2)

testIso : (fns : A  B)  List A  Type _
testIso (to iff fro) xs = xs  map (fro  to) xs

testIsoℕ : (fns :   A)    Type _
testIsoℕ fns n = testIso fns (0  n)

testUnary : (A  B)  (A  A)  (B  B)  List A  Type _
testUnary to f g xs =
  map (to  f) xs  map (g  to) xs

testBinary : (A  B)  (A  A  A)  (B  B  B)  List A  Type _
testBinary to f g xs =
  liftA2  x y  to (f x y)) xs xs  liftA2  x y  g (to x) (to y)) xs xs

testUnaryℕ : (  A)  (  )  (A  A)    Type _
testUnaryℕ to f g n = testUnary to f g (0  n)

testBinaryℕ : (  A)  (    )  (A  A  A)    Type _
testBinaryℕ to f g n = testBinary to f g (0  n)