    {-# LANGUAGE ScopedTypeVariables #-}
    {-# LANGUAGE RankNTypes #-}
    {-# LANGUAGE QuantifiedConstraints #-}

    module Hedgehog.Classes.Bitraversable (bitraversableLaws) where

    import Hedgehog
    import Hedgehog.Classes.Common

    import Data.Bitraversable (Bitraversable(..))
    import Data.Functor.Compose (Compose(..))
    import Data.Functor.Identity (Identity(..))

    import qualified Data.Set as S
    import qualified Control.Monad.Trans.Writer.Lazy as WL

    -- | Tests the following 'Bitraversable' laws:
    --
    -- [__Naturality__]: @'bitraverse' (t '.' f) (t '.' g)@ ≡ @t '.' 'bitraverse' f g, for every applicative transformation t@
    -- [__Identity__]: @'bitraverse' 'Identity' 'Identity'@ ≡ @'Identity'@
    -- [__Composition__]: @'Compose' '.' 'fmap' ('bitraverse' g1 g2) '.' 'bitraverse' f1 f2@ ≡ @'bitraverse' ('Compose' '.' 'fmap' g1 '.' f1) ('Compose' '.' 'fmap' g2 '.' f2)@
    bitraversableLaws :: forall f.
      ( Bitraversable f
      , forall x y. (Eq x, Eq y) => Eq (f x y)
      , forall x y. (Show x, Show y) => Show (f x y)
      ) => (forall x y. Gen x -> Gen y -> Gen (f x y)) -> Laws
    bitraversableLaws :: forall (f :: * -> * -> *).
    (Bitraversable f, forall x y. (Eq x, Eq y) => Eq (f x y),
     forall x y. (Show x, Show y) => Show (f x y)) =>
    (forall x y. Gen x -> Gen y -> Gen (f x y)) -> Laws
    bitraversableLaws forall x y. Gen x -> Gen y -> Gen (f x y)
    gen = String -> [(String, Property)] -> Laws
    Laws String
    "Bitraversable"
      [ (String
    "Naturality", (forall x y. Gen x -> Gen y -> Gen (f x y)) -> Property
    forall (f :: * -> * -> *). BitraversableProp f
    bitraversableNaturality Gen x -> Gen y -> Gen (f x y)
    forall x y. Gen x -> Gen y -> Gen (f x y)
    gen)
      , (String
    "Identity", (forall x y. Gen x -> Gen y -> Gen (f x y)) -> Property
    forall (f :: * -> * -> *). BitraversableProp f
    bitraversableIdentity Gen x -> Gen y -> Gen (f x y)
    forall x y. Gen x -> Gen y -> Gen (f x y)
    gen)
      , (String
    "Composition", (forall x y. Gen x -> Gen y -> Gen (f x y)) -> Property
    forall (f :: * -> * -> *). BitraversableProp f
    bitraversableComposition Gen x -> Gen y -> Gen (f x y)
    forall x y. Gen x -> Gen y -> Gen (f x y)
    gen)
      ]

    type BitraversableProp f =
      ( Bitraversable f
      , forall x y. (Eq x, Eq y) => Eq (f x y)
      , forall x y. (Show x, Show y) => Show (f x y)
      ) => (forall x y. Gen x -> Gen y -> Gen (f x y)) -> Property

    bitraversableNaturality :: forall f. BitraversableProp f
    bitraversableNaturality :: forall (f :: * -> * -> *). BitraversableProp f
    bitraversableNaturality forall x y. Gen x -> Gen y -> Gen (f x y)
    fgen = HasCallStack => PropertyT IO () -> Property
    PropertyT IO () -> Property
    property (PropertyT IO () -> Property) -> PropertyT IO () -> Property
    forall a b. (a -> b) -> a -> b
    $ do
      f Integer Integer
    x <- Gen (f Integer Integer) -> PropertyT IO (f Integer Integer)
    forall (m :: * -> *) a.
    (Monad m, Show a, HasCallStack) =>
    Gen a -> PropertyT m a
    forAll (Gen (f Integer Integer) -> PropertyT IO (f Integer Integer))
    -> Gen (f Integer Integer) -> PropertyT IO (f Integer Integer)
    forall a b. (a -> b) -> a -> b
    $ Gen Integer -> Gen Integer -> Gen (f Integer Integer)
    forall x y. Gen x -> Gen y -> Gen (f x y)
    fgen Gen Integer
    genSmallInteger Gen Integer
    genSmallInteger
      let t :: Compose Triple (Writer (Set Integer)) a
    -> Compose (Writer (Set Integer)) Triple a
    t = Compose Triple (Writer (Set Integer)) a
    -> Compose (Writer (Set Integer)) Triple a
    forall a.
    Compose Triple (Writer (Set Integer)) a
    -> Compose (Writer (Set Integer)) Triple a
    apTrans; f :: Integer -> Compose Triple (Writer (Set Integer)) Integer
    f = Integer -> Compose Triple (Writer (Set Integer)) Integer
    func4; g :: Integer -> Compose Triple (Writer (Set Integer)) Integer
    g = Integer -> Compose Triple (Writer (Set Integer)) Integer
    func4
      let lhs :: Compose (Writer (Set Integer)) Triple (f Integer Integer)
    lhs = (Integer -> Compose (Writer (Set Integer)) Triple Integer)
    -> (Integer -> Compose (Writer (Set Integer)) Triple Integer)
    -> f Integer Integer
    -> Compose (Writer (Set Integer)) Triple (f Integer Integer)
    forall (f :: * -> *) a c b d.
    Applicative f =>
    (a -> f c) -> (b -> f d) -> f a b -> f (f c d)
    forall (t :: * -> * -> *) (f :: * -> *) a c b d.
    (Bitraversable t, Applicative f) =>
    (a -> f c) -> (b -> f d) -> t a b -> f (t c d)
    bitraverse (Compose Triple (Writer (Set Integer)) Integer
    -> Compose (Writer (Set Integer)) Triple Integer
    forall a.
    Compose Triple (Writer (Set Integer)) a
    -> Compose (Writer (Set Integer)) Triple a
    t (Compose Triple (Writer (Set Integer)) Integer
     -> Compose (Writer (Set Integer)) Triple Integer)
    -> (Integer -> Compose Triple (Writer (Set Integer)) Integer)
    -> Integer
    -> Compose (Writer (Set Integer)) Triple Integer
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Integer -> Compose Triple (Writer (Set Integer)) Integer
    f) (Compose Triple (Writer (Set Integer)) Integer
    -> Compose (Writer (Set Integer)) Triple Integer
    forall a.
    Compose Triple (Writer (Set Integer)) a
    -> Compose (Writer (Set Integer)) Triple a
    t (Compose Triple (Writer (Set Integer)) Integer
     -> Compose (Writer (Set Integer)) Triple Integer)
    -> (Integer -> Compose Triple (Writer (Set Integer)) Integer)
    -> Integer
    -> Compose (Writer (Set Integer)) Triple Integer
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Integer -> Compose Triple (Writer (Set Integer)) Integer
    g) f Integer Integer
    x
      let rhs :: Compose (Writer (Set Integer)) Triple (f Integer Integer)
    rhs = Compose Triple (Writer (Set Integer)) (f Integer Integer)
    -> Compose (Writer (Set Integer)) Triple (f Integer Integer)
    forall a.
    Compose Triple (Writer (Set Integer)) a
    -> Compose (Writer (Set Integer)) Triple a
    t ((Integer -> Compose Triple (Writer (Set Integer)) Integer)
    -> (Integer -> Compose Triple (Writer (Set Integer)) Integer)
    -> f Integer Integer
    -> Compose Triple (Writer (Set Integer)) (f Integer Integer)
    forall (f :: * -> *) a c b d.
    Applicative f =>
    (a -> f c) -> (b -> f d) -> f a b -> f (f c d)
    forall (t :: * -> * -> *) (f :: * -> *) a c b d.
    (Bitraversable t, Applicative f) =>
    (a -> f c) -> (b -> f d) -> t a b -> f (t c d)
    bitraverse Integer -> Compose Triple (Writer (Set Integer)) Integer
    f Integer -> Compose Triple (Writer (Set Integer)) Integer
    g f Integer Integer
    x)
      let ctx :: Context
    ctx = LawContext -> Context
    contextualise (LawContext -> Context) -> LawContext -> Context
    forall a b. (a -> b) -> a -> b
    $ LawContext
            { lawContextLawName :: String
    lawContextLawName = String
    "Naturality", lawContextLawBody :: String
    lawContextLawBody = String
    "bitraverse (t . f) (t . g)" String -> String -> String
    `congruency` String
    "t . bitraverse f g, for every applicative transformation t"
            , lawContextTcName :: String
    lawContextTcName = String
    "Bitraversable", lawContextTcProp :: String
    lawContextTcProp =
                let showX :: String
    showX = f Integer Integer -> String
    forall a. Show a => a -> String
    show f Integer Integer
    x;
                in [String] -> String
    lawWhere
                     [ String
    "bitraverse (t . f) (t . g) $ x" String -> String -> String
    `congruency` String
    "t . bitraverse f g $ x, for every applicative transformation t, where"
                     , String
    "x = " String -> String -> String
    forall a. [a] -> [a] -> [a]
    ++ String
    showX
                     ]
            , lawContextReduced :: String
    lawContextReduced = Compose (Writer (Set Integer)) Triple (f Integer Integer)
    -> Compose (Writer (Set Integer)) Triple (f Integer Integer)
    -> String
    forall a. Show a => a -> a -> String
    reduced Compose (Writer (Set Integer)) Triple (f Integer Integer)
    lhs Compose (Writer (Set Integer)) Triple (f Integer Integer)
    rhs
            }
      Compose (Writer (Set Integer)) Triple (f Integer Integer)
    -> Compose (Writer (Set Integer)) Triple (f Integer Integer)
    -> Context
    -> PropertyT IO ()
    forall (m :: * -> *) a (f :: * -> *).
    (MonadTest m, HasCallStack, Eq a, Show a,
     forall x. Eq x => Eq (f x), forall x. Show x => Show (f x)) =>
    f a -> f a -> Context -> m ()
    heqCtx1 Compose (Writer (Set Integer)) Triple (f Integer Integer)
    lhs Compose (Writer (Set Integer)) Triple (f Integer Integer)
    rhs Context
    ctx

    bitraversableIdentity :: forall f. BitraversableProp f
    bitraversableIdentity :: forall (f :: * -> * -> *). BitraversableProp f
    bitraversableIdentity forall x y. Gen x -> Gen y -> Gen (f x y)
    fgen = HasCallStack => PropertyT IO () -> Property
    PropertyT IO () -> Property
    property (PropertyT IO () -> Property) -> PropertyT IO () -> Property
    forall a b. (a -> b) -> a -> b
    $ do
      f Integer Integer
    x <- Gen (f Integer Integer) -> PropertyT IO (f Integer Integer)
    forall (m :: * -> *) a.
    (Monad m, Show a, HasCallStack) =>
    Gen a -> PropertyT m a
    forAll (Gen (f Integer Integer) -> PropertyT IO (f Integer Integer))
    -> Gen (f Integer Integer) -> PropertyT IO (f Integer Integer)
    forall a b. (a -> b) -> a -> b
    $ Gen Integer -> Gen Integer -> Gen (f Integer Integer)
    forall x y. Gen x -> Gen y -> Gen (f x y)
    fgen Gen Integer
    genSmallInteger Gen Integer
    genSmallInteger
      let lhs :: Identity (f Integer Integer)
    lhs = (Integer -> Identity Integer)
    -> (Integer -> Identity Integer)
    -> f Integer Integer
    -> Identity (f Integer Integer)
    forall (f :: * -> *) a c b d.
    Applicative f =>
    (a -> f c) -> (b -> f d) -> f a b -> f (f c d)
    forall (t :: * -> * -> *) (f :: * -> *) a c b d.
    (Bitraversable t, Applicative f) =>
    (a -> f c) -> (b -> f d) -> t a b -> f (t c d)
    bitraverse Integer -> Identity Integer
    forall a. a -> Identity a
    Identity Integer -> Identity Integer
    forall a. a -> Identity a
    Identity f Integer Integer
    x
      let rhs :: Identity (f Integer Integer)
    rhs = f Integer Integer -> Identity (f Integer Integer)
    forall a. a -> Identity a
    Identity f Integer Integer
    x
      let ctx :: Context
    ctx = LawContext -> Context
    contextualise (LawContext -> Context) -> LawContext -> Context
    forall a b. (a -> b) -> a -> b
    $ LawContext
            { lawContextLawName :: String
    lawContextLawName = String
    "Identity", lawContextLawBody :: String
    lawContextLawBody = String
    "bitraverse Identity Identity" String -> String -> String
    `congruency` String
    "Identity"
            , lawContextTcName :: String
    lawContextTcName = String
    "Bitraversable", lawContextTcProp :: String
    lawContextTcProp =
                let showX :: String
    showX = f Integer Integer -> String
    forall a. Show a => a -> String
    show f Integer Integer
    x;
                in [String] -> String
    lawWhere
                     [ String
    "bitraverse Identity Identity x" String -> String -> String
    `congruency` String
    "Identity x, where"
                     , String
    "x = " String -> String -> String
    forall a. [a] -> [a] -> [a]
    ++ String
    showX
                     ]
            , lawContextReduced :: String
    lawContextReduced = Identity (f Integer Integer)
    -> Identity (f Integer Integer) -> String
    forall a. Show a => a -> a -> String
    reduced Identity (f Integer Integer)
    lhs Identity (f Integer Integer)
    rhs
            }
      Identity (f Integer Integer)
    -> Identity (f Integer Integer) -> Context -> PropertyT IO ()
    forall (m :: * -> *) a (f :: * -> *).
    (MonadTest m, HasCallStack, Eq a, Show a,
     forall x. Eq x => Eq (f x), forall x. Show x => Show (f x)) =>
    f a -> f a -> Context -> m ()
    heqCtx1 Identity (f Integer Integer)
    lhs Identity (f Integer Integer)
    rhs Context
    ctx

    bitraversableComposition :: forall f. BitraversableProp f
    bitraversableComposition :: forall (f :: * -> * -> *). BitraversableProp f
    bitraversableComposition forall x y. Gen x -> Gen y -> Gen (f x y)
    fgen = HasCallStack => PropertyT IO () -> Property
    PropertyT IO () -> Property
    property (PropertyT IO () -> Property) -> PropertyT IO () -> Property
    forall a b. (a -> b) -> a -> b
    $ do
      f Integer Integer
    x <- Gen (f Integer Integer) -> PropertyT IO (f Integer Integer)
    forall (m :: * -> *) a.
    (Monad m, Show a, HasCallStack) =>
    Gen a -> PropertyT m a
    forAll (Gen (f Integer Integer) -> PropertyT IO (f Integer Integer))
    -> Gen (f Integer Integer) -> PropertyT IO (f Integer Integer)
    forall a b. (a -> b) -> a -> b
    $ Gen Integer -> Gen Integer -> Gen (f Integer Integer)
    forall x y. Gen x -> Gen y -> Gen (f x y)
    fgen Gen Integer
    genSmallInteger Gen Integer
    genSmallInteger
      let f1 :: Integer -> Triple Integer
    f1 = Integer -> Triple Integer
    func6; f2 :: Integer -> Triple Integer
    f2 = Integer -> Triple Integer
    func5; g1 :: Integer -> Compose Triple (Writer (Set Integer)) Integer
    g1 = Integer -> Compose Triple (Writer (Set Integer)) Integer
    func4; g2 :: Integer -> Compose Triple (Writer (Set Integer)) Integer
    g2 = Integer -> Compose Triple (Writer (Set Integer)) Integer
    func4
      let lhs :: Compose Triple (Compose Triple (WL.Writer (S.Set Integer))) (f Integer Integer)
          lhs :: Compose
      Triple (Compose Triple (Writer (Set Integer))) (f Integer Integer)
    lhs = Triple (Compose Triple (Writer (Set Integer)) (f Integer Integer))
    -> Compose
         Triple (Compose Triple (Writer (Set Integer))) (f Integer Integer)
    forall {k} {k1} (f :: k -> *) (g :: k1 -> k) (a :: k1).
    f (g a) -> Compose f g a
    Compose (Triple (Compose Triple (Writer (Set Integer)) (f Integer Integer))
     -> Compose
          Triple (Compose Triple (Writer (Set Integer))) (f Integer Integer))
    -> (f Integer Integer
        -> Triple
             (Compose Triple (Writer (Set Integer)) (f Integer Integer)))
    -> f Integer Integer
    -> Compose
         Triple (Compose Triple (Writer (Set Integer))) (f Integer Integer)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (f Integer Integer
     -> Compose Triple (Writer (Set Integer)) (f Integer Integer))
    -> Triple (f Integer Integer)
    -> Triple
         (Compose Triple (Writer (Set Integer)) (f Integer Integer))
    forall a b. (a -> b) -> Triple a -> Triple b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap ((Integer -> Compose Triple (Writer (Set Integer)) Integer)
    -> (Integer -> Compose Triple (Writer (Set Integer)) Integer)
    -> f Integer Integer
    -> Compose Triple (Writer (Set Integer)) (f Integer Integer)
    forall (f :: * -> *) a c b d.
    Applicative f =>
    (a -> f c) -> (b -> f d) -> f a b -> f (f c d)
    forall (t :: * -> * -> *) (f :: * -> *) a c b d.
    (Bitraversable t, Applicative f) =>
    (a -> f c) -> (b -> f d) -> t a b -> f (t c d)
    bitraverse Integer -> Compose Triple (Writer (Set Integer)) Integer
    g1 Integer -> Compose Triple (Writer (Set Integer)) Integer
    g2) (Triple (f Integer Integer)
     -> Triple
          (Compose Triple (Writer (Set Integer)) (f Integer Integer)))
    -> (f Integer Integer -> Triple (f Integer Integer))
    -> f Integer Integer
    -> Triple
         (Compose Triple (Writer (Set Integer)) (f Integer Integer))
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Integer -> Triple Integer)
    -> (Integer -> Triple Integer)
    -> f Integer Integer
    -> Triple (f Integer Integer)
    forall (f :: * -> *) a c b d.
    Applicative f =>
    (a -> f c) -> (b -> f d) -> f a b -> f (f c d)
    forall (t :: * -> * -> *) (f :: * -> *) a c b d.
    (Bitraversable t, Applicative f) =>
    (a -> f c) -> (b -> f d) -> t a b -> f (t c d)
    bitraverse Integer -> Triple Integer
    f1 Integer -> Triple Integer
    f2 (f Integer Integer
     -> Compose
          Triple (Compose Triple (Writer (Set Integer))) (f Integer Integer))
    -> f Integer Integer
    -> Compose
         Triple (Compose Triple (Writer (Set Integer))) (f Integer Integer)
    forall a b. (a -> b) -> a -> b
    $ f Integer Integer
    x

      let rhs :: Compose Triple (Compose Triple (WL.Writer (S.Set Integer))) (f Integer Integer)
          rhs :: Compose
      Triple (Compose Triple (Writer (Set Integer))) (f Integer Integer)
    rhs = (Integer
     -> Compose Triple (Compose Triple (Writer (Set Integer))) Integer)
    -> (Integer
        -> Compose Triple (Compose Triple (Writer (Set Integer))) Integer)
    -> f Integer Integer
    -> Compose
         Triple (Compose Triple (Writer (Set Integer))) (f Integer Integer)
    forall (f :: * -> *) a c b d.
    Applicative f =>
    (a -> f c) -> (b -> f d) -> f a b -> f (f c d)
    forall (t :: * -> * -> *) (f :: * -> *) a c b d.
    (Bitraversable t, Applicative f) =>
    (a -> f c) -> (b -> f d) -> t a b -> f (t c d)
    bitraverse (Triple (Compose Triple (Writer (Set Integer)) Integer)
    -> Compose Triple (Compose Triple (Writer (Set Integer))) Integer
    forall {k} {k1} (f :: k -> *) (g :: k1 -> k) (a :: k1).
    f (g a) -> Compose f g a
    Compose (Triple (Compose Triple (Writer (Set Integer)) Integer)
     -> Compose Triple (Compose Triple (Writer (Set Integer))) Integer)
    -> (Integer
        -> Triple (Compose Triple (Writer (Set Integer)) Integer))
    -> Integer
    -> Compose Triple (Compose Triple (Writer (Set Integer))) Integer
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Integer -> Compose Triple (Writer (Set Integer)) Integer)
    -> Triple Integer
    -> Triple (Compose Triple (Writer (Set Integer)) Integer)
    forall a b. (a -> b) -> Triple a -> Triple b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap Integer -> Compose Triple (Writer (Set Integer)) Integer
    g1 (Triple Integer
     -> Triple (Compose Triple (Writer (Set Integer)) Integer))
    -> (Integer -> Triple Integer)
    -> Integer
    -> Triple (Compose Triple (Writer (Set Integer)) Integer)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Integer -> Triple Integer
    f1) (Triple (Compose Triple (Writer (Set Integer)) Integer)
    -> Compose Triple (Compose Triple (Writer (Set Integer))) Integer
    forall {k} {k1} (f :: k -> *) (g :: k1 -> k) (a :: k1).
    f (g a) -> Compose f g a
    Compose (Triple (Compose Triple (Writer (Set Integer)) Integer)
     -> Compose Triple (Compose Triple (Writer (Set Integer))) Integer)
    -> (Integer
        -> Triple (Compose Triple (Writer (Set Integer)) Integer))
    -> Integer
    -> Compose Triple (Compose Triple (Writer (Set Integer))) Integer
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Integer -> Compose Triple (Writer (Set Integer)) Integer)
    -> Triple Integer
    -> Triple (Compose Triple (Writer (Set Integer)) Integer)
    forall a b. (a -> b) -> Triple a -> Triple b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap Integer -> Compose Triple (Writer (Set Integer)) Integer
    g2 (Triple Integer
     -> Triple (Compose Triple (Writer (Set Integer)) Integer))
    -> (Integer -> Triple Integer)
    -> Integer
    -> Triple (Compose Triple (Writer (Set Integer)) Integer)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Integer -> Triple Integer
    f2) f Integer Integer
    x
      let ctx :: Context
    ctx = LawContext -> Context
    contextualise (LawContext -> Context) -> LawContext -> Context
    forall a b. (a -> b) -> a -> b
    $ LawContext
            { lawContextLawName :: String
    lawContextLawName = String
    "Composition", lawContextLawBody :: String
    lawContextLawBody = String
    "Compose . fmap (bitraverse g1 g2) . bitraverse f1 f2" String -> String -> String
    `congruency` String
    "bitraverse (Compose . fmap g1 . f1) (Compose . fmap g2 . f2)"
            , lawContextTcName :: String
    lawContextTcName = String
    "Bitraversable", lawContextTcProp :: String
    lawContextTcProp =
                let showX :: String
    showX = f Integer Integer -> String
    forall a. Show a => a -> String
    show f Integer Integer
    x;
                in [String] -> String
    lawWhere
                     [ String
    "Compose . fmap (bitraverse g1 g2) . bitraverse f1 f2 $ x" String -> String -> String
    `congruency` String
    "bitraverse (Compose . fmap g1 . f1) (Compose . fmap g2 . f2) $ x, where"
                     , String
    "x = " String -> String -> String
    forall a. [a] -> [a] -> [a]
    ++ String
    showX
                     ]
            , lawContextReduced :: String
    lawContextReduced = Compose
      Triple (Compose Triple (Writer (Set Integer))) (f Integer Integer)
    -> Compose
         Triple (Compose Triple (Writer (Set Integer))) (f Integer Integer)
    -> String
    forall a. Show a => a -> a -> String
    reduced Compose
      Triple (Compose Triple (Writer (Set Integer))) (f Integer Integer)
    lhs Compose
      Triple (Compose Triple (Writer (Set Integer))) (f Integer Integer)
    rhs
            }
      Compose
      Triple (Compose Triple (Writer (Set Integer))) (f Integer Integer)
    -> Compose
         Triple (Compose Triple (Writer (Set Integer))) (f Integer Integer)
    -> Context
    -> PropertyT IO ()
    forall (m :: * -> *) a (f :: * -> *).
    (MonadTest m, HasCallStack, Eq a, Show a,
     forall x. Eq x => Eq (f x), forall x. Show x => Show (f x)) =>
    f a -> f a -> Context -> m ()
    heqCtx1 Compose
      Triple (Compose Triple (Writer (Set Integer))) (f Integer Integer)
    lhs Compose
      Triple (Compose Triple (Writer (Set Integer))) (f Integer Integer)
    rhs Context
    ctx