package Ġarrow . mt l Ċ Ċ import Ġarrow . Kind Ċ import Ġarrow . Kind 2 Ċ import Ġarrow . core . For Function 1 Ċ import Ġarrow . core . For List K Ċ import Ġarrow . core . For Non Empty List Ċ import Ġarrow . core . For Option Ċ import Ġarrow . core . For Tuple 2 Ċ import Ġarrow . core . Function 1 Ċ import Ġarrow . core . List K Ċ import Ġarrow . core . Non Empty List Ċ import Ġarrow . core . Option Ċ import Ġarrow . core . Tuple 2 Ċ import Ġarrow . core . extensions . function 1 . contr av ari ant . contr av ari ant Ċ import Ġarrow . core . extensions . list k . eq K . eq K Ċ import Ġarrow . core . extensions . list k . mon oid K . mon oid K Ċ import Ġarrow . core . extensions . list k . sem ig roup K . sem ig roup K Ċ import Ġarrow . core . extensions . none mpty list . applic ative . applic ative Ċ import Ġarrow . core . extensions . none mpty list . eq K . eq K Ċ import Ġarrow . core . extensions . none mpty list . fold able . fold able Ċ import Ġarrow . core . extensions . none mpty list . functor . functor Ċ import Ġarrow . core . extensions . none mpty list . traverse . traverse Ċ import Ġarrow . core . extensions . option . applic ative . applic ative Ċ import Ġarrow . core . extensions . option . eq K . eq K Ċ import Ġarrow . core . extensions . option . fold able . fold able Ċ import Ġarrow . core . extensions . option . functor . functor Ċ import Ġarrow . core . extensions . option . traverse . traverse Ċ import Ġarrow . core . extensions . tuple 2 . b if un ctor . b if un ctor Ċ import Ġarrow . core . fix Ċ import Ġarrow . core . invoke Ċ import Ġarrow . core . k Ċ import Ġarrow . mt l . extensions . nested Ċ import Ġarrow . mt l . type classes . Comp osed Applic ative Ċ import Ġarrow . mt l . type classes . Comp osed B if un ctor Ċ import Ġarrow . mt l . type classes . Comp osed Fold able Ċ import Ġarrow . mt l . type classes . Comp osed Functor Ċ import Ġarrow . mt l . type classes . Comp osed Invariant Contr av ari ant Ċ import Ġarrow . mt l . type classes . Comp osed Invariant Co variant Ċ import Ġarrow . mt l . type classes . Comp osed Mon oid K Ċ import Ġarrow . mt l . type classes . Comp osed Sem ig roup K Ċ import Ġarrow . mt l . type classes . Comp osed Tra verse Ċ import Ġarrow . mt l . type classes . Nested Ċ import Ġarrow . mt l . type classes . bin est Ċ import Ġarrow . mt l . type classes . bi un nest Ċ import Ġarrow . mt l . type classes . nest Ċ import Ġarrow . test . Unit Spec Ċ import Ġarrow . test . generators . Gen K Ċ import Ġarrow . test . generators . Gen K 2 Ċ import Ġarrow . test . generators . function A To B Ċ import Ġarrow . test . generators . gen K Ċ import Ġarrow . test . generators . nested Ċ import Ġarrow . test . l aws . Applic ative L aws Ċ import Ġarrow . test . l aws . B if un ctor L aws Ċ import Ġarrow . test . l aws . Fold able L aws Ċ import Ġarrow . test . l aws . Functor L aws Ċ import Ġarrow . test . l aws . Invariant L aws Ċ import Ġarrow . test . l aws . Mon oid KL aws Ċ import Ġarrow . test . l aws . Sem ig roup KL aws Ċ import Ġarrow . test . l aws . Tra verse L aws Ċ import Ġarrow . type classes . Con ested Ċ import Ġarrow . type classes . Eq Ċ import Ġarrow . type classes . Eq K Ċ import Ġarrow . type classes . Eq K 2 Ċ import Ġarrow . type classes . con est Ċ import Ġarrow . type classes . co un nest Ċ import Ġio . kot lint est . properties . Gen Ċ Ċ class ĠComp osed Instances Test Ġ: ĠUnit Spec () Ġ{ ĊĠ Ġinit Ġ{ ĊĊĠĠĠ Ġval ĠGEN K _ LK _ OPTION Ġ= ĠList K . gen K (). nested ( Option . gen K ()) ĊĊĠĠĠ Ġval ĠE QK _ LK _ OPTION Ġ= ĠList K . eq K (). nested ( Option . eq K ()) ĊĊĠĠĠ Ġfun ĠE QK _ FN 1 () Ġ= Ġobject Ġ: ĠEq K < Con ested < For Function 1 , ĠInt >> Ġ{ ĊĠĠĠĠĠ Ġoverride Ġfun Ġ< A > ĠKind < Con ested < For Function 1 , ĠInt >, ĠA >. eq K ( other : ĠKind < Con ested < For Function 1 , ĠInt >, ĠA >, ĠE Q : ĠEq < A >): ĠBoolean Ġ= ĊĠĠĠĠĠĠĠ Ġ( this . co un nest () Ġto Ġother . co un nest ()). let Ġ{ ĊĠĠĠĠĠĠĠĠĠ Ġval Ġls Ġ= Ġit . first . fix (). invoke ( 1 ) ĊĠĠĠĠĠĠĠĠĠ Ġval Ġrs Ġ= Ġit . first . fix (). invoke ( 1 ) ĊĊĠĠĠĠĠĠĠĠĠ Ġls Ġ== Ġrs ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġval ĠE QK _ OPTION _ FN 1 : ĠEq K < Nested < For Option , ĠCon ested < For Function 1 , ĠInt >>> Ġ= ĠOption . eq K (). nested ( EQ K _ FN 1 ()) ĊĊĠĠĠ Ġfun Ġ< A > ĠGEN K _ OPTION _ FN 1 ( gen A : ĠGen < A >): ĠGen K < Nested < For Option , ĠCon ested < For Function 1 , ĠA >>> Ġ= ĊĠĠĠĠĠ Ġobject Ġ: ĠGen K < Nested < For Option , ĠCon ested < For Function 1 , ĠA >>> Ġ{ ĊĠĠĠĠĠĠĠ Ġoverride Ġfun Ġ< B > Ġgen K ( gen : ĠGen < B >): ĠGen < Kind < Nested < For Option , ĠCon ested < For Function 1 , ĠA >>, ĠB >> Ġ= ĊĠĠĠĠĠĠĠĠĠ ĠGen . function A To B < B , ĠA >( gen A ). map Ġ{ Ġit . k (). con est () Ġ}. or Null (). map Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠOption . from Nullable ( it ). nest () ĊĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠ Ġ} ĊĊĠĠĠ Ġval ĠE QK _ OPTION _ NEL : ĠEq K < Nested < For Option , ĠFor Non Empty List >> Ġ= ĊĠĠĠĠĠ ĠOption . eq K (). nested ( Non Empty List . eq K ()) ĊĊĠĠĠ Ġval ĠGEN K _ OPTION _ NEL : ĠGen K < Nested < For Option , ĠFor Non Empty List >> Ġ= ĊĠĠĠĠĠ ĠOption . gen K (). nested ( Non Empty List . gen K ()) ĊĊĠĠĠ Ġval Ġbi Functor Gen k Ġ= Ġobject Ġ: ĠGen K 2 < Nested < For Tuple 2 , ĠFor Tuple 2 >> Ġ{ ĊĠĠĠĠĠ Ġoverride Ġfun Ġ< A , ĠB > Ġgen K ( gen A : ĠGen < A >, Ġgen B : ĠGen < B >): ĠGen < Kind 2 < Nested < For Tuple 2 , ĠFor Tuple 2 >, ĠA , ĠB >> Ġ= ĊĠĠĠĠĠĠĠ ĠGen . bind ( gen A , Ġgen B ) Ġ{ Ġa , Ġb Ġ-> ĊĠĠĠĠĠĠĠĠĠ ĠTuple 2 ( Tuple 2 ( a , Ġb ), ĠTuple 2 ( a , Ġb )). bin est () ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġval Ġbi Functor Eq k Ġ= Ġobject Ġ: ĠEq K 2 < Nested < For Tuple 2 , ĠFor Tuple 2 >> Ġ{ ĊĠĠĠĠĠ Ġoverride Ġfun Ġ< A , ĠB > ĠKind 2 < Nested < For Tuple 2 , ĠFor Tuple 2 >, ĠA , ĠB >. eq K ( other : ĠKind 2 < Nested < For Tuple 2 , ĠFor Tuple 2 >, ĠA , ĠB >, ĠE QA : ĠEq < A >, ĠE QB : ĠEq < B >): ĠBoolean Ġ= ĊĠĠĠĠĠĠĠ Ġ( bi un nest (). fix () Ġto Ġother . bi un nest (). fix ()). let Ġ{ ĊĠĠĠĠĠĠĠĠĠ Ġit . first Ġ== Ġit . second ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġtest L aws ( ĊĠĠĠĠĠ ĠIn variant L aws . l aws ( Comp osed Invariant Co variant ( Option . functor (), ĠNon Empty List . functor ()), ĠGEN K _ OPTION _ NEL , ĠE QK _ OPTION _ NEL ) ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġtest L aws ( ĊĠĠĠĠĠ ĠIn variant L aws . l aws ( Comp osed Invariant Contr av ari ant ( Option . functor (), ĠFunction 1 . contr av ari ant < Int > ()), ĠGEN K _ OPTION _ FN 1 ( Gen . int ()), ĠE QK _ OPTION _ FN 1 ) ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġtest L aws ( ĊĠĠĠĠĠ ĠFun ctor L aws . l aws ( Comp osed Functor ( Option . functor (), ĠNon Empty List . functor ()), ĠGEN K _ OPTION _ NEL , ĠE QK _ OPTION _ NEL ), ĊĠĠĠĠĠ ĠApplic ative L aws . l aws ( Comp osed Applic ative ( Option . applic ative (), ĠNon Empty List . applic ative ()), ĠGEN K _ OPTION _ NEL , ĠE QK _ OPTION _ NEL ), ĊĠĠĠĠĠ ĠFold able L aws . l aws ( Comp osed Fold able ( Option . fold able (), ĠNon Empty List . fold able ()), ĠGEN K _ OPTION _ NEL ), ĊĠĠĠĠĠ ĠTra verse L aws . l aws ( Comp osed Tra verse ( Option . traverse (), ĠNon Empty List . traverse ()), ĠGEN K _ OPTION _ NEL , ĠE QK _ OPTION _ NEL ), ĊĠĠĠĠĠ ĠSem ig roup KL aws . l aws ( Comp osed Sem ig roup K < For List K , ĠFor Option >( List K . sem ig roup K ()), ĠGEN K _ LK _ OPTION , ĠE QK _ LK _ OPTION ), ĊĠĠĠĠĠ ĠMon oid KL aws . l aws ( Comp osed Mon oid K < For List K , ĠFor Option >( List K . mon oid K ()), ĠGEN K _ LK _ OPTION , ĠE QK _ LK _ OPTION ), ĊĠĠĠĠĠ ĠB if un ctor L aws . l aws ( Comp osed B if un ctor ( Tuple 2 . b if un ctor (), ĠTuple 2 . b if un ctor ()), Ġbi Functor Gen k , Ġbi Functor Eq k ) ĊĠĠĠ Ġ) ĊĠ Ġ} Ċ } Ċ