From 466f7023b5d43ee5080b5373ef4464d0c982a923 Mon Sep 17 00:00:00 2001 From: Yao Li Date: Tue, 30 Jan 2024 10:39:44 -0800 Subject: [PATCH 01/24] WIP migrating to GHC 8.10 and Coq 8.18. --- base/Control/Applicative.h2ci | 12 +- base/Control/Applicative.v | 151 +- base/Control/Arrow.h2ci | 184 +- base/Control/Arrow.v | 227 ++- base/Control/Category.h2ci | 4 +- base/Control/Category.v | 20 +- base/Control/Monad.v | 33 +- base/Control/Monad/Fail.h2ci | 4 +- base/Control/Monad/Fail.v | 10 +- base/Control/Monad/Zip.h2ci | 34 +- base/Control/Monad/Zip.v | 128 +- base/Data/Bifoldable.h2ci | 70 +- base/Data/Bifoldable.v | 192 ++- base/Data/Bifunctor.h2ci | 26 +- base/Data/Bifunctor.v | 75 +- base/Data/Bitraversable.h2ci | 16 +- base/Data/Bitraversable.v | 65 +- base/Data/Bool.v | 2 +- base/Data/Either.h2ci | 4 +- base/Data/Either.v | 143 +- base/Data/Foldable.h2ci | 216 +-- base/Data/Foldable.v | 1496 ++++++++++++++--- base/Data/Function.v | 4 +- base/Data/Functor.v | 10 +- base/Data/Functor/Classes.h2ci | 32 +- base/Data/Functor/Classes.v | 140 +- base/Data/Functor/Compose.h2ci | 8 +- base/Data/Functor/Compose.v | 178 +- base/Data/Functor/Const.h2ci | 8 +- base/Data/Functor/Const.v | 235 +-- base/Data/Functor/Identity.h2ci | 8 +- base/Data/Functor/Identity.v | 205 +-- base/Data/Functor/Product.h2ci | 4 +- base/Data/Functor/Product.v | 171 +- base/Data/Functor/Sum.h2ci | 10 +- base/Data/Functor/Sum.v | 153 +- base/Data/Functor/Utils.h2ci | 24 +- base/Data/Functor/Utils.v | 56 +- base/Data/List/NonEmpty.v | 56 +- base/Data/Maybe.v | 17 +- base/Data/Monoid.h2ci | 16 +- base/Data/Monoid.v | 355 +--- base/Data/OldList.h2ci | 4 +- base/Data/OldList.v | 253 ++- base/Data/Ord.h2ci | 8 +- base/Data/Ord.v | 112 +- base/Data/Proxy.h2ci | 6 +- base/Data/Proxy.v | 61 +- base/Data/Semigroup.h2ci | 34 +- base/Data/Semigroup.v | 1051 ++++-------- base/Data/SemigroupInternal.h2ci | 38 +- base/Data/SemigroupInternal.v | 687 ++------ base/Data/Traversable.h2ci | 22 +- base/Data/Traversable.v | 656 +++++++- base/Data/Tuple.v | 11 +- base/Data/Type/Equality.h2ci | 1 + base/Data/Void.h2ci | 2 +- base/Data/Void.v | 72 +- base/GHC/Base.h2ci | 114 +- base/GHC/Base.v | 650 ++++--- base/GHC/List.v | 126 +- examples/base-src/Makefile | 2 +- examples/base-src/deps/Data.Foldable.mk | 2 +- .../base-src/deps/Data.Functor.Classes.mk | 2 +- examples/base-src/deps/Data.Traversable.mk | 2 +- examples/base-src/edits | 15 +- .../base-src/manual/Data/Type/Equality.h2ci | 1 + examples/base-src/manual/Data/Type/Equality.v | 2 + examples/base-src/manual/GHC/Enum.v | 6 +- examples/base-src/manual/GHC/Num.v | 3 + examples/base-src/manual/GHC/Prim.v | 1 + examples/base-src/manual/GHC/Real.v | 11 +- examples/base-src/manual/HsToCoq/Err.v | 16 +- examples/base-src/manual/HsToCoq/Nat.v | 6 + examples/base-src/manual/HsToCoq/Unpeel.v | 5 + .../base-src/module-edits/Data/Monoid/edits | 2 + .../base-src/module-edits/Data/Ord/midamble.v | 13 + examples/base-src/module-edits/GHC/Base/edits | 1 + .../base-src/module-edits/GHC/Base/midamble.v | 18 + examples/ghc/ghc | 2 +- src/lib/HsToCoq/Coq/FreeVars.hs | 5 +- src/lib/HsToCoq/Coq/Gallina.hs | 3 +- src/lib/HsToCoq/Coq/Pretty.hs | 17 +- stack.yaml | 2 +- 84 files changed, 4894 insertions(+), 3953 deletions(-) create mode 120000 base/Data/Type/Equality.h2ci create mode 100644 examples/base-src/manual/Data/Type/Equality.h2ci create mode 100644 examples/base-src/module-edits/Data/Ord/midamble.v diff --git a/base/Control/Applicative.h2ci b/base/Control/Applicative.h2ci index d5fff7f4c..d69bd17e6 100644 --- a/base/Control/Applicative.h2ci +++ b/base/Control/Applicative.h2ci @@ -1,12 +1,12 @@ -constructors: - Control.Applicative.WrappedArrow: ! '[Qualified "Control.Applicative" "WrapArrow"]' - Control.Applicative.WrappedMonad: ! '[Qualified "Control.Applicative" "WrapMonad"]' constructorFields: Control.Applicative.WrapMonad: RecordFields [Qualified "Control.Applicative" "unwrapMonad"] Control.Applicative.WrapArrow: RecordFields [Qualified "Control.Applicative" "unwrapArrow"] -recordFieldTypes: - Control.Applicative.unwrapMonad: Qualified "Control.Applicative" "WrappedMonad" - Control.Applicative.unwrapArrow: Qualified "Control.Applicative" "WrappedArrow" constructorTypes: Control.Applicative.WrapMonad: Qualified "Control.Applicative" "WrappedMonad" Control.Applicative.WrapArrow: Qualified "Control.Applicative" "WrappedArrow" +constructors: + Control.Applicative.WrappedMonad: '[Qualified "Control.Applicative" "WrapMonad"]' + Control.Applicative.WrappedArrow: '[Qualified "Control.Applicative" "WrapArrow"]' +recordFieldTypes: + Control.Applicative.unwrapMonad: Qualified "Control.Applicative" "WrappedMonad" + Control.Applicative.unwrapArrow: Qualified "Control.Applicative" "WrappedArrow" diff --git a/base/Control/Applicative.v b/base/Control/Applicative.v index 4d126af24..de457f7b2 100644 --- a/base/Control/Applicative.v +++ b/base/Control/Applicative.v @@ -16,7 +16,6 @@ Require Control.Arrow. Require Control.Category. Require Data.Tuple. Require GHC.Base. -Require GHC.Prim. Require HsToCoq.Unpeel. Import Control.Arrow.Notations. Import Control.Category.Notations. @@ -34,48 +33,45 @@ Arguments WrapMonad {_} {_} _. Arguments WrapArrow {_} {_} {_} _. -Definition unwrapMonad {m : Type -> Type} {a} (arg_0__ : WrappedMonad m a) := +#[global] Definition unwrapMonad {m : Type -> Type} {a} (arg_0__ + : WrappedMonad m a) := let 'WrapMonad unwrapMonad := arg_0__ in unwrapMonad. -Definition unwrapArrow {a : Type -> Type -> Type} {b} {c} (arg_0__ +#[global] Definition unwrapArrow {a : Type -> Type -> Type} {b} {c} (arg_0__ : WrappedArrow a b c) := let 'WrapArrow unwrapArrow := arg_0__ in unwrapArrow. (* Converted value declarations: *) -(* Skipping all instances of class `GHC.Generics.Generic', including - `Control.Applicative.Generic__WrappedMonad' *) - -(* Skipping all instances of class `GHC.Generics.Generic1', including - `Control.Applicative.Generic1__TYPE__WrappedMonad__LiftedRep' *) - -Instance Unpeel_WrappedMonad {m} {a} - : HsToCoq.Unpeel.Unpeel (WrappedMonad m a) (m a) := - HsToCoq.Unpeel.Build_Unpeel _ _ unwrapMonad WrapMonad. - -Local Definition Monad__WrappedMonad_op_zgzg__ {inst_m : Type -> Type} +#[local] Definition Functor__WrappedMonad_fmap {inst_m : Type -> Type} `{GHC.Base.Monad inst_m} : forall {a : Type}, - forall {b : Type}, - WrappedMonad inst_m a -> WrappedMonad inst_m b -> WrappedMonad inst_m b := - fun {a : Type} {b : Type} => GHC.Prim.coerce _GHC.Base.>>_. + forall {b : Type}, (a -> b) -> WrappedMonad inst_m a -> WrappedMonad inst_m b := + fun {a : Type} {b : Type} => + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | f, WrapMonad v => WrapMonad (GHC.Base.liftM f v) + end. -Local Definition Monad__WrappedMonad_op_zgzgze__ {inst_m : Type -> Type} +#[local] Definition Functor__WrappedMonad_op_zlzd__ {inst_m : Type -> Type} `{GHC.Base.Monad inst_m} : forall {a : Type}, - forall {b : Type}, - WrappedMonad inst_m a -> - (a -> WrappedMonad inst_m b) -> WrappedMonad inst_m b := - fun {a : Type} {b : Type} => GHC.Prim.coerce _GHC.Base.>>=_. + forall {b : Type}, a -> WrappedMonad inst_m b -> WrappedMonad inst_m a := + fun {a : Type} {b : Type} => + Functor__WrappedMonad_fmap GHC.Base.∘ GHC.Base.const. -Local Definition Monad__WrappedMonad_return_ {inst_m : Type -> Type} - `{GHC.Base.Monad inst_m} - : forall {a : Type}, a -> WrappedMonad inst_m a := - fun {a : Type} => GHC.Prim.coerce GHC.Base.return_. +#[global] +Program Instance Functor__WrappedMonad {m : Type -> Type} `{GHC.Base.Monad m} + : GHC.Base.Functor (WrappedMonad m) := + fun _ k__ => + k__ {| GHC.Base.fmap__ := fun {a : Type} {b : Type} => + Functor__WrappedMonad_fmap ; + GHC.Base.op_zlzd____ := fun {a : Type} {b : Type} => + Functor__WrappedMonad_op_zlzd__ |}. -Local Definition Applicative__WrappedMonad_liftA2 {inst_m : Type -> Type} +#[local] Definition Applicative__WrappedMonad_liftA2 {inst_m : Type -> Type} `{GHC.Base.Monad inst_m} : forall {a : Type}, forall {b : Type}, @@ -88,8 +84,8 @@ Local Definition Applicative__WrappedMonad_liftA2 {inst_m : Type -> Type} | f, WrapMonad x, WrapMonad y => WrapMonad (GHC.Base.liftM2 f x y) end. -Local Definition Applicative__WrappedMonad_op_zlztzg__ {inst_m : Type -> Type} - `{GHC.Base.Monad inst_m} +#[local] Definition Applicative__WrappedMonad_op_zlztzg__ {inst_m + : Type -> Type} `{GHC.Base.Monad inst_m} : forall {a : Type}, forall {b : Type}, WrappedMonad inst_m (a -> b) -> @@ -100,32 +96,7 @@ Local Definition Applicative__WrappedMonad_op_zlztzg__ {inst_m : Type -> Type} | WrapMonad f, WrapMonad v => WrapMonad (GHC.Base.ap f v) end. -Local Definition Functor__WrappedMonad_fmap {inst_m : Type -> Type} - `{GHC.Base.Monad inst_m} - : forall {a : Type}, - forall {b : Type}, (a -> b) -> WrappedMonad inst_m a -> WrappedMonad inst_m b := - fun {a : Type} {b : Type} => - fun arg_0__ arg_1__ => - match arg_0__, arg_1__ with - | f, WrapMonad v => WrapMonad (GHC.Base.liftM f v) - end. - -Local Definition Functor__WrappedMonad_op_zlzd__ {inst_m : Type -> Type} - `{GHC.Base.Monad inst_m} - : forall {a : Type}, - forall {b : Type}, a -> WrappedMonad inst_m b -> WrappedMonad inst_m a := - fun {a : Type} {b : Type} => - Functor__WrappedMonad_fmap GHC.Base.∘ GHC.Base.const. - -Program Instance Functor__WrappedMonad {m : Type -> Type} `{GHC.Base.Monad m} - : GHC.Base.Functor (WrappedMonad m) := - fun _ k__ => - k__ {| GHC.Base.fmap__ := fun {a : Type} {b : Type} => - Functor__WrappedMonad_fmap ; - GHC.Base.op_zlzd____ := fun {a : Type} {b : Type} => - Functor__WrappedMonad_op_zlzd__ |}. - -Local Definition Applicative__WrappedMonad_op_ztzg__ {inst_m : Type -> Type} +#[local] Definition Applicative__WrappedMonad_op_ztzg__ {inst_m : Type -> Type} `{GHC.Base.Monad inst_m} : forall {a : Type}, forall {b : Type}, @@ -134,11 +105,12 @@ Local Definition Applicative__WrappedMonad_op_ztzg__ {inst_m : Type -> Type} fun a1 a2 => Applicative__WrappedMonad_op_zlztzg__ (GHC.Base.id GHC.Base.<$ a1) a2. -Local Definition Applicative__WrappedMonad_pure {inst_m : Type -> Type} +#[local] Definition Applicative__WrappedMonad_pure {inst_m : Type -> Type} `{GHC.Base.Monad inst_m} : forall {a : Type}, a -> WrappedMonad inst_m a := fun {a : Type} => WrapMonad GHC.Base.∘ GHC.Base.pure. +#[global] Program Instance Applicative__WrappedMonad {m : Type -> Type} `{GHC.Base.Monad m} : GHC.Base.Applicative (WrappedMonad m) := @@ -151,49 +123,10 @@ Program Instance Applicative__WrappedMonad {m : Type -> Type} `{GHC.Base.Monad Applicative__WrappedMonad_op_ztzg__ ; GHC.Base.pure__ := fun {a : Type} => Applicative__WrappedMonad_pure |}. -Program Instance Monad__WrappedMonad {m : Type -> Type} `{GHC.Base.Monad m} - : GHC.Base.Monad (WrappedMonad m) := - fun _ k__ => - k__ {| GHC.Base.op_zgzg____ := fun {a : Type} {b : Type} => - Monad__WrappedMonad_op_zgzg__ ; - GHC.Base.op_zgzgze____ := fun {a : Type} {b : Type} => - Monad__WrappedMonad_op_zgzgze__ ; - GHC.Base.return___ := fun {a : Type} => Monad__WrappedMonad_return_ |}. - -(* Skipping all instances of class `GHC.Generics.Generic', including - `Control.Applicative.Generic__WrappedArrow' *) - -(* Skipping all instances of class `GHC.Generics.Generic1', including - `Control.Applicative.Generic1__TYPE__WrappedArrow__LiftedRep' *) - -(* Skipping all instances of class `GHC.Show.Show', including - `Control.Applicative.Show__ZipList' *) - -(* Skipping instance `Control.Applicative.Eq___ZipList' of class - `GHC.Base.Eq_' *) - -(* Skipping instance `Control.Applicative.Ord__ZipList' of class - `GHC.Base.Ord' *) - -(* Skipping all instances of class `GHC.Read.Read', including - `Control.Applicative.Read__ZipList' *) - -(* Skipping instance `Control.Applicative.Functor__ZipList' of class - `GHC.Base.Functor' *) - -(* Skipping instance `Control.Applicative.Foldable__ZipList' of class - `Data.Foldable.Foldable' *) - -(* Skipping all instances of class `GHC.Generics.Generic', including - `Control.Applicative.Generic__ZipList' *) - -(* Skipping all instances of class `GHC.Generics.Generic1', including - `Control.Applicative.Generic1__TYPE__ZipList__LiftedRep' *) - (* Skipping all instances of class `GHC.Base.Alternative', including `Control.Applicative.Alternative__WrappedMonad' *) -Local Definition Functor__WrappedArrow_fmap {inst_a : Type -> Type -> Type} +#[local] Definition Functor__WrappedArrow_fmap {inst_a : Type -> Type -> Type} {inst_b : Type} `{Control.Arrow.Arrow inst_a} : forall {a : Type}, forall {b : Type}, @@ -204,14 +137,15 @@ Local Definition Functor__WrappedArrow_fmap {inst_a : Type -> Type -> Type} | f, WrapArrow a => WrapArrow (a Control.Category.>>> Control.Arrow.arr f) end. -Local Definition Functor__WrappedArrow_op_zlzd__ {inst_a : Type -> Type -> Type} - {inst_b : Type} `{Control.Arrow.Arrow inst_a} +#[local] Definition Functor__WrappedArrow_op_zlzd__ {inst_a + : Type -> Type -> Type} {inst_b : Type} `{Control.Arrow.Arrow inst_a} : forall {a : Type}, forall {b : Type}, a -> WrappedArrow inst_a inst_b b -> WrappedArrow inst_a inst_b a := fun {a : Type} {b : Type} => Functor__WrappedArrow_fmap GHC.Base.∘ GHC.Base.const. +#[global] Program Instance Functor__WrappedArrow {a : Type -> Type -> Type} {b : Type} `{Control.Arrow.Arrow a} : GHC.Base.Functor (WrappedArrow a b) := @@ -221,7 +155,7 @@ Program Instance Functor__WrappedArrow {a : Type -> Type -> Type} {b : Type} GHC.Base.op_zlzd____ := fun {a : Type} {b : Type} => Functor__WrappedArrow_op_zlzd__ |}. -Local Definition Applicative__WrappedArrow_liftA2 {inst_a +#[local] Definition Applicative__WrappedArrow_liftA2 {inst_a : Type -> Type -> Type} {inst_b : Type} `{Control.Arrow.Arrow inst_a} : forall {a : Type}, forall {b : Type}, @@ -237,7 +171,7 @@ Local Definition Applicative__WrappedArrow_liftA2 {inst_a Control.Arrow.arr (Data.Tuple.uncurry f)) end. -Local Definition Applicative__WrappedArrow_op_zlztzg__ {inst_a +#[local] Definition Applicative__WrappedArrow_op_zlztzg__ {inst_a : Type -> Type -> Type} {inst_b : Type} `{Control.Arrow.Arrow inst_a} : forall {a : Type}, forall {b : Type}, @@ -245,7 +179,7 @@ Local Definition Applicative__WrappedArrow_op_zlztzg__ {inst_a WrappedArrow inst_a inst_b a -> WrappedArrow inst_a inst_b b := fun {a : Type} {b : Type} => Applicative__WrappedArrow_liftA2 GHC.Base.id. -Local Definition Applicative__WrappedArrow_op_ztzg__ {inst_a +#[local] Definition Applicative__WrappedArrow_op_ztzg__ {inst_a : Type -> Type -> Type} {inst_b : Type} `{Control.Arrow.Arrow inst_a} : forall {a : Type}, forall {b : Type}, @@ -255,11 +189,12 @@ Local Definition Applicative__WrappedArrow_op_ztzg__ {inst_a fun a1 a2 => Applicative__WrappedArrow_op_zlztzg__ (GHC.Base.id GHC.Base.<$ a1) a2. -Local Definition Applicative__WrappedArrow_pure {inst_a : Type -> Type -> Type} - {inst_b : Type} `{Control.Arrow.Arrow inst_a} +#[local] Definition Applicative__WrappedArrow_pure {inst_a + : Type -> Type -> Type} {inst_b : Type} `{Control.Arrow.Arrow inst_a} : forall {a : Type}, a -> WrappedArrow inst_a inst_b a := fun {a : Type} => fun x => WrapArrow (Control.Arrow.arr (GHC.Base.const x)). +#[global] Program Instance Applicative__WrappedArrow {a : Type -> Type -> Type} {b : Type} `{Control.Arrow.Arrow a} : GHC.Base.Applicative (WrappedArrow a b) := @@ -287,14 +222,16 @@ Instance Unpeel_WrappedArrow {a} {b} {c} : HsToCoq.Unpeel.Unpeel (WrappedArrow a b c) (a b c) := HsToCoq.Unpeel.Build_Unpeel _ _ unwrapArrow WrapArrow. +Instance Unpeel_WrappedMonad {m} {a} + : HsToCoq.Unpeel.Unpeel (WrappedMonad m a) (m a) := + HsToCoq.Unpeel.Build_Unpeel _ _ unwrapMonad WrapMonad. + (* External variables: Type Control.Arrow.Arrow Control.Arrow.arr Control.Arrow.op_zazaza__ Control.Category.op_zgzgzg__ Data.Tuple.uncurry GHC.Base.Applicative GHC.Base.Functor GHC.Base.Monad GHC.Base.ap GHC.Base.const GHC.Base.fmap__ GHC.Base.id GHC.Base.liftA2__ GHC.Base.liftM GHC.Base.liftM2 - GHC.Base.op_z2218U__ GHC.Base.op_zgzg__ GHC.Base.op_zgzg____ - GHC.Base.op_zgzgze__ GHC.Base.op_zgzgze____ GHC.Base.op_zlzd__ - GHC.Base.op_zlzd____ GHC.Base.op_zlztzg____ GHC.Base.op_ztzg____ GHC.Base.pure - GHC.Base.pure__ GHC.Base.return_ GHC.Base.return___ GHC.Prim.coerce + GHC.Base.op_z2218U__ GHC.Base.op_zlzd__ GHC.Base.op_zlzd____ + GHC.Base.op_zlztzg____ GHC.Base.op_ztzg____ GHC.Base.pure GHC.Base.pure__ HsToCoq.Unpeel.Build_Unpeel HsToCoq.Unpeel.Unpeel *) diff --git a/base/Control/Arrow.h2ci b/base/Control/Arrow.h2ci index 4ca84374b..51ad4cedc 100644 --- a/base/Control/Arrow.h2ci +++ b/base/Control/Arrow.h2ci @@ -1,88 +1,13 @@ -superclassCount: - Control.Arrow.Arrow: '1' - Control.Arrow.ArrowApply: '2' - Control.Arrow.ArrowChoice: '2' - Control.Arrow.ArrowZero: '2' - Control.Arrow.ArrowPlus: '3' - Control.Arrow.ArrowLoop: '2' -defaultMethods: - Control.Arrow.Arrow: fromList [(Qualified "Control.Arrow" "first",Parens (Fun (ExplicitBinder - (Ident (Bare "arg_0__")) :| []) (App (Qualid (Qualified "Control.Arrow" "op_ztztzt__")) - (PosArg (Qualid (Bare "arg_0__")) :| [PosArg (Qualid (Qualified "Control.Category" - "id"))])))),(Qualified "Control.Arrow" "op_zazaza__",Fun (ExplicitBinder (Ident - (Bare "f")) :| [ExplicitBinder (Ident (Bare "g"))]) (App (Qualid (Qualified "Control.Category" - "op_zgzgzg__")) (PosArg (App (Qualid (Qualified "Control.Arrow" "arr")) (PosArg - (Parens (Fun (ExplicitBinder (Ident (Bare "b")) :| []) (App (Qualid (Bare "pair")) - (PosArg (Qualid (Bare "b")) :| [PosArg (Qualid (Bare "b"))])))) :| [])) :| [PosArg - (App (Qualid (Qualified "Control.Arrow" "op_ztztzt__")) (PosArg (Qualid (Bare - "f")) :| [PosArg (Qualid (Bare "g"))]))]))),(Qualified "Control.Arrow" "op_ztztzt__",Fun - (ExplicitBinder (Ident (Bare "f")) :| [ExplicitBinder (Ident (Bare "g"))]) (Let - (Bare "swap") [] Nothing (Fun (ExplicitBinder (Ident (Bare "arg_0__")) :| []) - (Match (MatchItem (Qualid (Bare "arg_0__")) Nothing Nothing :| []) Nothing [Equation - (MultPattern (ArgsPat (Bare "pair") [QualidPat (Bare "x"),QualidPat (Bare "y")] - :| []) :| []) (App (Qualid (Bare "pair")) (PosArg (Qualid (Bare "y")) :| [PosArg - (Qualid (Bare "x"))]))])) (App (Qualid (Qualified "Control.Category" "op_zgzgzg__")) - (PosArg (App (Qualid (Qualified "Control.Arrow" "first")) (PosArg (Qualid (Bare - "f")) :| [])) :| [PosArg (App (Qualid (Qualified "Control.Category" "op_zgzgzg__")) - (PosArg (App (Qualid (Qualified "Control.Arrow" "arr")) (PosArg (Qualid (Bare - "swap")) :| [])) :| [PosArg (App (Qualid (Qualified "Control.Category" "op_zgzgzg__")) - (PosArg (App (Qualid (Qualified "Control.Arrow" "first")) (PosArg (Qualid (Bare - "g")) :| [])) :| [PosArg (App (Qualid (Qualified "Control.Arrow" "arr")) (PosArg - (Qualid (Bare "swap")) :| []))]))]))])))),(Qualified "Control.Arrow" "second",Parens - (Fun (ExplicitBinder (Ident (Bare "arg_0__")) :| []) (App (Qualid (Qualified "Control.Arrow" - "op_ztztzt__")) (PosArg (Qualid (Qualified "Control.Category" "id")) :| [PosArg - (Qualid (Bare "arg_0__"))]))))] - Control.Arrow.ArrowChoice: fromList [(Qualified "Control.Arrow" "left_",Parens (Fun - (ExplicitBinder (Ident (Bare "arg_0__")) :| []) (App (Qualid (Qualified "Control.Arrow" - "op_zpzpzp__")) (PosArg (Qualid (Bare "arg_0__")) :| [PosArg (Qualid (Qualified - "Control.Category" "id"))])))),(Qualified "Control.Arrow" "op_zbzbzb__",Fun (ExplicitBinder - (Ident (Bare "f")) :| [ExplicitBinder (Ident (Bare "g"))]) (Let (Bare "untag") - [] Nothing (Fun (ExplicitBinder (Ident (Bare "arg_0__")) :| []) (Match (MatchItem - (Qualid (Bare "arg_0__")) Nothing Nothing :| []) Nothing [Equation (MultPattern - (ArgsPat (Qualified "Data.Either" "Left") [QualidPat (Bare "x")] :| []) :| []) - (Qualid (Bare "x")),Equation (MultPattern (ArgsPat (Qualified "Data.Either" "Right") - [QualidPat (Bare "y")] :| []) :| []) (Qualid (Bare "y"))])) (App (Qualid (Qualified - "Control.Category" "op_zgzgzg__")) (PosArg (App (Qualid (Qualified "Control.Arrow" - "op_zpzpzp__")) (PosArg (Qualid (Bare "f")) :| [PosArg (Qualid (Bare "g"))])) - :| [PosArg (App (Qualid (Qualified "Control.Arrow" "arr")) (PosArg (Qualid (Bare - "untag")) :| []))])))),(Qualified "Control.Arrow" "op_zpzpzp__",Fun (ExplicitBinder - (Ident (Bare "f")) :| [ExplicitBinder (Ident (Bare "g"))]) (Let (Bare "mirror") - [ImplicitBinders (Ident (Bare "x") :| []),ImplicitBinders (Ident (Bare "y") :| - [])] (Just (Arrow (App (App (Qualid (Qualified "Data.Either" "Either")) (PosArg - (Qualid (Bare "x")) :| [])) (PosArg (Qualid (Bare "y")) :| [])) (App (App (Qualid - (Qualified "Data.Either" "Either")) (PosArg (Qualid (Bare "y")) :| [])) (PosArg - (Qualid (Bare "x")) :| [])))) (Fun (ExplicitBinder (Ident (Bare "arg_0__")) :| - []) (Match (MatchItem (Qualid (Bare "arg_0__")) Nothing Nothing :| []) Nothing - [Equation (MultPattern (ArgsPat (Qualified "Data.Either" "Left") [QualidPat (Bare - "x")] :| []) :| []) (App (Qualid (Qualified "Data.Either" "Right")) (PosArg (Qualid - (Bare "x")) :| [])),Equation (MultPattern (ArgsPat (Qualified "Data.Either" "Right") - [QualidPat (Bare "y")] :| []) :| []) (App (Qualid (Qualified "Data.Either" "Left")) - (PosArg (Qualid (Bare "y")) :| []))])) (App (Qualid (Qualified "Control.Category" - "op_zgzgzg__")) (PosArg (App (Qualid (Qualified "Control.Arrow" "left_")) (PosArg - (Qualid (Bare "f")) :| [])) :| [PosArg (App (Qualid (Qualified "Control.Category" - "op_zgzgzg__")) (PosArg (App (Qualid (Qualified "Control.Arrow" "arr")) (PosArg - (Qualid (Bare "mirror")) :| [])) :| [PosArg (App (Qualid (Qualified "Control.Category" - "op_zgzgzg__")) (PosArg (App (Qualid (Qualified "Control.Arrow" "left_")) (PosArg - (Qualid (Bare "g")) :| [])) :| [PosArg (App (Qualid (Qualified "Control.Arrow" - "arr")) (PosArg (Qualid (Bare "mirror")) :| []))]))]))])))),(Qualified "Control.Arrow" - "right_",Parens (Fun (ExplicitBinder (Ident (Bare "arg_0__")) :| []) (App (Qualid - (Qualified "Control.Arrow" "op_zpzpzp__")) (PosArg (Qualid (Qualified "Control.Category" - "id")) :| [PosArg (Qualid (Bare "arg_0__"))]))))] classTypes: Control.Arrow.Arrow: fromList [] Control.Arrow.ArrowApply: fromList [] Control.Arrow.ArrowChoice: fromList [] - Control.Arrow.ArrowZero: fromList [] - Control.Arrow.ArrowPlus: fromList [] Control.Arrow.ArrowLoop: fromList [] -constructors: - Control.Arrow.Kleisli: ! '[Qualified "Control.Arrow" "Mk_Kleisli"]' - Control.Arrow.ArrowMonad: ! '[Qualified "Control.Arrow" "Mk_ArrowMonad"]' + Control.Arrow.ArrowPlus: fromList [] + Control.Arrow.ArrowZero: fromList [] constructorFields: Control.Arrow.Mk_ArrowMonad: NonRecordFields 1 Control.Arrow.Mk_Kleisli: RecordFields [Qualified "Control.Arrow" "runKleisli"] -recordFieldTypes: - Control.Arrow.runKleisli: Qualified "Control.Arrow" "Kleisli" classDefns: Control.Arrow.Arrow: ClassDefinition (Qualified "Control.Arrow" "Arrow") [Typed Ungeneralizable Explicit (Ident (Bare "a") :| []) (Arrow (Qualid (Bare "Type")) @@ -184,15 +109,20 @@ classDefns: (App (Qualid (Qualified "Data.Either" "Either")) (PosArg (Qualid (Bare "d")) :| [PosArg (Qualid (Bare "b"))])) :| [])) (PosArg (App (Qualid (Qualified "Data.Either" "Either")) (PosArg (Qualid (Bare "d")) :| [PosArg (Qualid (Bare "c"))])) :| []))))))] - Control.Arrow.ArrowZero: ClassDefinition (Qualified "Control.Arrow" "ArrowZero") + Control.Arrow.ArrowLoop: ClassDefinition (Qualified "Control.Arrow" "ArrowLoop") [Typed Ungeneralizable Explicit (Ident (Bare "a") :| []) (Arrow (Qualid (Bare "Type")) (Arrow (Qualid (Bare "Type")) (Qualid (Bare "Type")))),Generalized Implicit (App (Qualid (Qualified "Control.Arrow" "Arrow")) (PosArg (Qualid (Bare "a")) - :| []))] Nothing [(Qualified "Control.Arrow" "zeroArrow",Forall (Typed Ungeneralizable + :| []))] Nothing [(Qualified "Control.Arrow" "loop",Forall (Typed Ungeneralizable Implicit (Ident (Bare "b") :| []) (Qualid (Bare "Type")) :| []) (Forall (Typed - Ungeneralizable Implicit (Ident (Bare "c") :| []) (Qualid (Bare "Type")) :| []) - (App (App (Qualid (Bare "a")) (PosArg (Qualid (Bare "b")) :| [])) (PosArg (Qualid - (Bare "c")) :| []))))] + Ungeneralizable Implicit (Ident (Bare "d") :| []) (Qualid (Bare "Type")) :| []) + (Forall (Typed Ungeneralizable Implicit (Ident (Bare "c") :| []) (Qualid (Bare + "Type")) :| []) (Arrow (App (App (Qualid (Bare "a")) (PosArg (InScope (App (Qualid + (Bare "op_zt__")) (PosArg (Qualid (Bare "b")) :| [PosArg (Qualid (Bare "d"))])) + "type") :| [])) (PosArg (InScope (App (Qualid (Bare "op_zt__")) (PosArg (Qualid + (Bare "c")) :| [PosArg (Qualid (Bare "d"))])) "type") :| [])) (App (App (Qualid + (Bare "a")) (PosArg (Qualid (Bare "b")) :| [])) (PosArg (Qualid (Bare "c")) :| + []))))))] Control.Arrow.ArrowPlus: ClassDefinition (Qualified "Control.Arrow" "ArrowPlus") [Typed Ungeneralizable Explicit (Ident (Bare "a") :| []) (Arrow (Qualid (Bare "Type")) (Arrow (Qualid (Bare "Type")) (Qualid (Bare "Type")))),Generalized Implicit @@ -204,20 +134,90 @@ classDefns: (Qualid (Bare "c")) :| [])) (Arrow (App (App (Qualid (Bare "a")) (PosArg (Qualid (Bare "b")) :| [])) (PosArg (Qualid (Bare "c")) :| [])) (App (App (Qualid (Bare "a")) (PosArg (Qualid (Bare "b")) :| [])) (PosArg (Qualid (Bare "c")) :| []))))))] - Control.Arrow.ArrowLoop: ClassDefinition (Qualified "Control.Arrow" "ArrowLoop") + Control.Arrow.ArrowZero: ClassDefinition (Qualified "Control.Arrow" "ArrowZero") [Typed Ungeneralizable Explicit (Ident (Bare "a") :| []) (Arrow (Qualid (Bare "Type")) (Arrow (Qualid (Bare "Type")) (Qualid (Bare "Type")))),Generalized Implicit (App (Qualid (Qualified "Control.Arrow" "Arrow")) (PosArg (Qualid (Bare "a")) - :| []))] Nothing [(Qualified "Control.Arrow" "loop",Forall (Typed Ungeneralizable + :| []))] Nothing [(Qualified "Control.Arrow" "zeroArrow",Forall (Typed Ungeneralizable Implicit (Ident (Bare "b") :| []) (Qualid (Bare "Type")) :| []) (Forall (Typed - Ungeneralizable Implicit (Ident (Bare "d") :| []) (Qualid (Bare "Type")) :| []) - (Forall (Typed Ungeneralizable Implicit (Ident (Bare "c") :| []) (Qualid (Bare - "Type")) :| []) (Arrow (App (App (Qualid (Bare "a")) (PosArg (InScope (App (Qualid - (Bare "op_zt__")) (PosArg (Qualid (Bare "b")) :| [PosArg (Qualid (Bare "d"))])) - "type") :| [])) (PosArg (InScope (App (Qualid (Bare "op_zt__")) (PosArg (Qualid - (Bare "c")) :| [PosArg (Qualid (Bare "d"))])) "type") :| [])) (App (App (Qualid - (Bare "a")) (PosArg (Qualid (Bare "b")) :| [])) (PosArg (Qualid (Bare "c")) :| - []))))))] + Ungeneralizable Implicit (Ident (Bare "c") :| []) (Qualid (Bare "Type")) :| []) + (App (App (Qualid (Bare "a")) (PosArg (Qualid (Bare "b")) :| [])) (PosArg (Qualid + (Bare "c")) :| []))))] constructorTypes: Control.Arrow.Mk_ArrowMonad: Qualified "Control.Arrow" "ArrowMonad" Control.Arrow.Mk_Kleisli: Qualified "Control.Arrow" "Kleisli" +superclassCount: + Control.Arrow.Arrow: '1' + Control.Arrow.ArrowApply: '2' + Control.Arrow.ArrowChoice: '2' + Control.Arrow.ArrowLoop: '2' + Control.Arrow.ArrowPlus: '3' + Control.Arrow.ArrowZero: '2' +defaultMethods: + Control.Arrow.Arrow: fromList [(Qualified "Control.Arrow" "first",Parens (Fun (ExplicitBinder + (Ident (Bare "arg_0__")) :| []) (App (Qualid (Qualified "Control.Arrow" "op_ztztzt__")) + (PosArg (Qualid (Bare "arg_0__")) :| [PosArg (Qualid (Qualified "Control.Category" + "id"))])))),(Qualified "Control.Arrow" "op_zazaza__",Fun (ExplicitBinder (Ident + (Bare "f")) :| [ExplicitBinder (Ident (Bare "g"))]) (App (Qualid (Qualified "Control.Category" + "op_zgzgzg__")) (PosArg (App (Qualid (Qualified "Control.Arrow" "arr")) (PosArg + (Parens (Fun (ExplicitBinder (Ident (Bare "b")) :| []) (App (Qualid (Bare "pair")) + (PosArg (Qualid (Bare "b")) :| [PosArg (Qualid (Bare "b"))])))) :| [])) :| [PosArg + (App (Qualid (Qualified "Control.Arrow" "op_ztztzt__")) (PosArg (Qualid (Bare + "f")) :| [PosArg (Qualid (Bare "g"))]))]))),(Qualified "Control.Arrow" "op_ztztzt__",Fun + (ExplicitBinder (Ident (Bare "f")) :| [ExplicitBinder (Ident (Bare "g"))]) (Let + (Bare "swap") [] Nothing (Fun (ExplicitBinder (Ident (Bare "arg_0__")) :| []) + (Match (MatchItem (Qualid (Bare "arg_0__")) Nothing Nothing :| []) Nothing [Equation + (MultPattern (ArgsPat (Bare "pair") [QualidPat (Bare "x"),QualidPat (Bare "y")] + :| []) :| []) (App (Qualid (Bare "pair")) (PosArg (Qualid (Bare "y")) :| [PosArg + (Qualid (Bare "x"))]))])) (App (Qualid (Qualified "Control.Category" "op_zgzgzg__")) + (PosArg (App (Qualid (Qualified "Control.Arrow" "first")) (PosArg (Qualid (Bare + "f")) :| [])) :| [PosArg (App (Qualid (Qualified "Control.Category" "op_zgzgzg__")) + (PosArg (App (Qualid (Qualified "Control.Arrow" "arr")) (PosArg (Qualid (Bare + "swap")) :| [])) :| [PosArg (App (Qualid (Qualified "Control.Category" "op_zgzgzg__")) + (PosArg (App (Qualid (Qualified "Control.Arrow" "first")) (PosArg (Qualid (Bare + "g")) :| [])) :| [PosArg (App (Qualid (Qualified "Control.Arrow" "arr")) (PosArg + (Qualid (Bare "swap")) :| []))]))]))])))),(Qualified "Control.Arrow" "second",Parens + (Fun (ExplicitBinder (Ident (Bare "arg_0__")) :| []) (App (Qualid (Qualified "Control.Arrow" + "op_ztztzt__")) (PosArg (Qualid (Qualified "Control.Category" "id")) :| [PosArg + (Qualid (Bare "arg_0__"))]))))] + Control.Arrow.ArrowChoice: fromList [(Qualified "Control.Arrow" "left_",Parens (Fun + (ExplicitBinder (Ident (Bare "arg_0__")) :| []) (App (Qualid (Qualified "Control.Arrow" + "op_zpzpzp__")) (PosArg (Qualid (Bare "arg_0__")) :| [PosArg (Qualid (Qualified + "Control.Category" "id"))])))),(Qualified "Control.Arrow" "op_zbzbzb__",Fun (ExplicitBinder + (Ident (Bare "f")) :| [ExplicitBinder (Ident (Bare "g"))]) (Let (Bare "untag") + [] Nothing (Fun (ExplicitBinder (Ident (Bare "arg_0__")) :| []) (Match (MatchItem + (Qualid (Bare "arg_0__")) Nothing Nothing :| []) Nothing [Equation (MultPattern + (ArgsPat (Qualified "Data.Either" "Left") [QualidPat (Bare "x")] :| []) :| []) + (Qualid (Bare "x")),Equation (MultPattern (ArgsPat (Qualified "Data.Either" "Right") + [QualidPat (Bare "y")] :| []) :| []) (Qualid (Bare "y"))])) (App (Qualid (Qualified + "Control.Category" "op_zgzgzg__")) (PosArg (App (Qualid (Qualified "Control.Arrow" + "op_zpzpzp__")) (PosArg (Qualid (Bare "f")) :| [PosArg (Qualid (Bare "g"))])) + :| [PosArg (App (Qualid (Qualified "Control.Arrow" "arr")) (PosArg (Qualid (Bare + "untag")) :| []))])))),(Qualified "Control.Arrow" "op_zpzpzp__",Fun (ExplicitBinder + (Ident (Bare "f")) :| [ExplicitBinder (Ident (Bare "g"))]) (Let (Bare "mirror") + [ImplicitBinders (Ident (Bare "x") :| []),ImplicitBinders (Ident (Bare "y") :| + [])] (Just (Arrow (App (App (Qualid (Qualified "Data.Either" "Either")) (PosArg + (Qualid (Bare "x")) :| [])) (PosArg (Qualid (Bare "y")) :| [])) (App (App (Qualid + (Qualified "Data.Either" "Either")) (PosArg (Qualid (Bare "y")) :| [])) (PosArg + (Qualid (Bare "x")) :| [])))) (Fun (ExplicitBinder (Ident (Bare "arg_0__")) :| + []) (Match (MatchItem (Qualid (Bare "arg_0__")) Nothing Nothing :| []) Nothing + [Equation (MultPattern (ArgsPat (Qualified "Data.Either" "Left") [QualidPat (Bare + "x")] :| []) :| []) (App (Qualid (Qualified "Data.Either" "Right")) (PosArg (Qualid + (Bare "x")) :| [])),Equation (MultPattern (ArgsPat (Qualified "Data.Either" "Right") + [QualidPat (Bare "y")] :| []) :| []) (App (Qualid (Qualified "Data.Either" "Left")) + (PosArg (Qualid (Bare "y")) :| []))])) (App (Qualid (Qualified "Control.Category" + "op_zgzgzg__")) (PosArg (App (Qualid (Qualified "Control.Arrow" "left_")) (PosArg + (Qualid (Bare "f")) :| [])) :| [PosArg (App (Qualid (Qualified "Control.Category" + "op_zgzgzg__")) (PosArg (App (Qualid (Qualified "Control.Arrow" "arr")) (PosArg + (Qualid (Bare "mirror")) :| [])) :| [PosArg (App (Qualid (Qualified "Control.Category" + "op_zgzgzg__")) (PosArg (App (Qualid (Qualified "Control.Arrow" "left_")) (PosArg + (Qualid (Bare "g")) :| [])) :| [PosArg (App (Qualid (Qualified "Control.Arrow" + "arr")) (PosArg (Qualid (Bare "mirror")) :| []))]))]))])))),(Qualified "Control.Arrow" + "right_",Parens (Fun (ExplicitBinder (Ident (Bare "arg_0__")) :| []) (App (Qualid + (Qualified "Control.Arrow" "op_zpzpzp__")) (PosArg (Qualid (Qualified "Control.Category" + "id")) :| [PosArg (Qualid (Bare "arg_0__"))]))))] +constructors: + Control.Arrow.Kleisli: '[Qualified "Control.Arrow" "Mk_Kleisli"]' + Control.Arrow.ArrowMonad: '[Qualified "Control.Arrow" "Mk_ArrowMonad"]' +recordFieldTypes: + Control.Arrow.runKleisli: Qualified "Control.Arrow" "Kleisli" diff --git a/base/Control/Arrow.v b/base/Control/Arrow.v index 11725daf9..9dd9cca39 100644 --- a/base/Control/Arrow.v +++ b/base/Control/Arrow.v @@ -44,36 +44,36 @@ Record Arrow__Dict (a : Type -> Type -> Type) := Arrow__Dict_Build { second__ : forall {b : Type}, forall {c : Type}, forall {d : Type}, a b c -> a (d * b)%type (d * c)%type }. -Definition Arrow (a : Type -> Type -> Type) `{Control.Category.Category Type - a} := +#[global] Definition Arrow (a : Type -> Type -> Type) + `{Control.Category.Category Type a} := forall r__, (Arrow__Dict a -> r__) -> r__. Existing Class Arrow. Record ArrowPlus__Dict (a : Type -> Type -> Type) := ArrowPlus__Dict_Build { op_zlzpzg____ : forall {b : Type}, forall {c : Type}, a b c -> a b c -> a b c }. -Definition arr `{g__0__ : Arrow a} +#[global] Definition arr `{g__0__ : Arrow a} : forall {b : Type}, forall {c : Type}, (b -> c) -> a b c := g__0__ _ (arr__ a). -Definition first `{g__0__ : Arrow a} +#[global] Definition first `{g__0__ : Arrow a} : forall {b : Type}, forall {c : Type}, forall {d : Type}, a b c -> a (b * d)%type (c * d)%type := g__0__ _ (first__ a). -Definition op_zazaza__ `{g__0__ : Arrow a} +#[global] Definition op_zazaza__ `{g__0__ : Arrow a} : forall {b : Type}, forall {c : Type}, forall {c' : Type}, a b c -> a b c' -> a b (c * c')%type := g__0__ _ (op_zazaza____ a). -Definition op_ztztzt__ `{g__0__ : Arrow a} +#[global] Definition op_ztztzt__ `{g__0__ : Arrow a} : forall {b : Type}, forall {c : Type}, forall {b' : Type}, forall {c' : Type}, a b c -> a b' c' -> a (b * b')%type (c * c')%type := g__0__ _ (op_ztztzt____ a). -Definition second `{g__0__ : Arrow a} +#[global] Definition second `{g__0__ : Arrow a} : forall {b : Type}, forall {c : Type}, forall {d : Type}, a b c -> a (d * b)%type (d * c)%type := g__0__ _ (second__ a). @@ -89,11 +89,11 @@ Infix "***" := (_***_) (at level 99). Record ArrowApply__Dict (a : Type -> Type -> Type) := ArrowApply__Dict_Build { app__ : forall {b : Type}, forall {c : Type}, a (a b c * b)%type c }. -Definition ArrowApply (a : Type -> Type -> Type) `{Arrow a} := +#[global] Definition ArrowApply (a : Type -> Type -> Type) `{Arrow a} := forall r__, (ArrowApply__Dict a -> r__) -> r__. Existing Class ArrowApply. -Definition app `{g__0__ : ArrowApply a} +#[global] Definition app `{g__0__ : ArrowApply a} : forall {b : Type}, forall {c : Type}, a (a b c * b)%type c := g__0__ _ (app__ a). @@ -115,24 +115,24 @@ Record ArrowChoice__Dict (a : Type -> Type -> Type) := ArrowChoice__Dict_Build { forall {d : Type}, a b c -> a (Data.Either.Either d b) (Data.Either.Either d c) }. -Definition ArrowChoice (a : Type -> Type -> Type) `{Arrow a} := +#[global] Definition ArrowChoice (a : Type -> Type -> Type) `{Arrow a} := forall r__, (ArrowChoice__Dict a -> r__) -> r__. Existing Class ArrowChoice. -Definition left_ `{g__0__ : ArrowChoice a} +#[global] Definition left_ `{g__0__ : ArrowChoice a} : forall {b : Type}, forall {c : Type}, forall {d : Type}, a b c -> a (Data.Either.Either b d) (Data.Either.Either c d) := g__0__ _ (left___ a). -Definition op_zbzbzb__ `{g__0__ : ArrowChoice a} +#[global] Definition op_zbzbzb__ `{g__0__ : ArrowChoice a} : forall {b : Type}, forall {d : Type}, forall {c : Type}, a b d -> a c d -> a (Data.Either.Either b c) d := g__0__ _ (op_zbzbzb____ a). -Definition op_zpzpzp__ `{g__0__ : ArrowChoice a} +#[global] Definition op_zpzpzp__ `{g__0__ : ArrowChoice a} : forall {b : Type}, forall {c : Type}, forall {b' : Type}, @@ -140,7 +140,7 @@ Definition op_zpzpzp__ `{g__0__ : ArrowChoice a} a b c -> a b' c' -> a (Data.Either.Either b b') (Data.Either.Either c c') := g__0__ _ (op_zpzpzp____ a). -Definition right_ `{g__0__ : ArrowChoice a} +#[global] Definition right_ `{g__0__ : ArrowChoice a} : forall {b : Type}, forall {c : Type}, forall {d : Type}, @@ -159,11 +159,11 @@ Record ArrowLoop__Dict (a : Type -> Type -> Type) := ArrowLoop__Dict_Build { loop__ : forall {b : Type}, forall {d : Type}, forall {c : Type}, a (b * d)%type (c * d)%type -> a b c }. -Definition ArrowLoop (a : Type -> Type -> Type) `{Arrow a} := +#[global] Definition ArrowLoop (a : Type -> Type -> Type) `{Arrow a} := forall r__, (ArrowLoop__Dict a -> r__) -> r__. Existing Class ArrowLoop. -Definition loop `{g__0__ : ArrowLoop a} +#[global] Definition loop `{g__0__ : ArrowLoop a} : forall {b : Type}, forall {d : Type}, forall {c : Type}, a (b * d)%type (c * d)%type -> a b c := g__0__ _ (loop__ a). @@ -171,19 +171,19 @@ Definition loop `{g__0__ : ArrowLoop a} Record ArrowZero__Dict (a : Type -> Type -> Type) := ArrowZero__Dict_Build { zeroArrow__ : forall {b : Type}, forall {c : Type}, a b c }. -Definition ArrowZero (a : Type -> Type -> Type) `{Arrow a} := +#[global] Definition ArrowZero (a : Type -> Type -> Type) `{Arrow a} := forall r__, (ArrowZero__Dict a -> r__) -> r__. Existing Class ArrowZero. -Definition zeroArrow `{g__0__ : ArrowZero a} +#[global] Definition zeroArrow `{g__0__ : ArrowZero a} : forall {b : Type}, forall {c : Type}, a b c := g__0__ _ (zeroArrow__ a). -Definition ArrowPlus (a : Type -> Type -> Type) `{ArrowZero a} := +#[global] Definition ArrowPlus (a : Type -> Type -> Type) `{ArrowZero a} := forall r__, (ArrowPlus__Dict a -> r__) -> r__. Existing Class ArrowPlus. -Definition op_zlzpzg__ `{g__0__ : ArrowPlus a} +#[global] Definition op_zlzpzg__ `{g__0__ : ArrowPlus a} : forall {b : Type}, forall {c : Type}, a b c -> a b c -> a b c := g__0__ _ (op_zlzpzg____ a). @@ -195,7 +195,8 @@ Arguments Mk_Kleisli {_} {_} {_} _. Arguments Mk_ArrowMonad {_} {_} _. -Definition runKleisli {m : Type -> Type} {a} {b} (arg_0__ : Kleisli m a b) := +#[global] Definition runKleisli {m : Type -> Type} {a} {b} (arg_0__ + : Kleisli m a b) := let 'Mk_Kleisli runKleisli := arg_0__ in runKleisli. @@ -218,11 +219,49 @@ Definition arrow_second {b}{c}{d} (f : (b -> c)) : (d * b)%type -> (d * c)%type (* Converted value declarations: *) -Local Definition Arrow__arrow_arr +#[local] Definition Functor__Kleisli_fmap {inst_m : Type -> Type} {inst_a + : Type} `{GHC.Base.Functor inst_m} + : forall {a : Type}, + forall {b : Type}, + (a -> b) -> Kleisli inst_m inst_a a -> Kleisli inst_m inst_a b := + fun {a : Type} {b : Type} => + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | f, Mk_Kleisli a1 => + Mk_Kleisli ((fun b2 b3 => GHC.Base.fmap f (b2 ((fun b1 => b1) b3))) a1) + end. + +#[local] Definition Functor__Kleisli_op_zlzd__ {inst_m : Type -> Type} {inst_a + : Type} `{GHC.Base.Functor inst_m} + : forall {a : Type}, + forall {b : Type}, a -> Kleisli inst_m inst_a b -> Kleisli inst_m inst_a a := + fun {a : Type} {b : Type} => + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | z, Mk_Kleisli a1 => + Mk_Kleisli ((fun b3 b4 => _GHC.Base.<$_ z (b3 ((fun b1 => b1) b4))) a1) + end. + +#[global] +Program Instance Functor__Kleisli {m : Type -> Type} {a : Type} + `{GHC.Base.Functor m} + : GHC.Base.Functor (Kleisli m a) := + fun _ k__ => + k__ {| GHC.Base.fmap__ := fun {a : Type} {b : Type} => Functor__Kleisli_fmap ; + GHC.Base.op_zlzd____ := fun {a : Type} {b : Type} => + Functor__Kleisli_op_zlzd__ |}. + +(* Skipping all instances of class `GHC.Generics.Generic1', including + `Control.Arrow.Generic1__TYPE__Kleisli__LiftedRep' *) + +(* Skipping all instances of class `GHC.Generics.Generic', including + `Control.Arrow.Generic__Kleisli' *) + +#[local] Definition Arrow__arrow_arr : forall {b : Type}, forall {c : Type}, (b -> c) -> GHC.Prim.arrow b c := fun {b : Type} {c : Type} => fun f => f. -Local Definition Arrow__arrow_op_ztztzt__ +#[local] Definition Arrow__arrow_op_ztztzt__ : forall {b : Type}, forall {c : Type}, forall {b' : Type}, @@ -235,7 +274,7 @@ Local Definition Arrow__arrow_op_ztztzt__ | f, g, pair x y => pair (f x) (g y) end. -Local Definition Arrow__arrow_first +#[local] Definition Arrow__arrow_first : forall {b : Type}, forall {c : Type}, forall {d : Type}, @@ -243,7 +282,7 @@ Local Definition Arrow__arrow_first fun {b : Type} {c : Type} {d : Type} => (fun arg_0__ => Arrow__arrow_op_ztztzt__ arg_0__ Control.Category.id). -Local Definition Arrow__arrow_op_zazaza__ +#[local] Definition Arrow__arrow_op_zazaza__ : forall {b : Type}, forall {c : Type}, forall {c' : Type}, @@ -253,7 +292,7 @@ Local Definition Arrow__arrow_op_zazaza__ Arrow__arrow_arr (fun b => pair b b) Control.Category.>>> Arrow__arrow_op_ztztzt__ f g. -Local Definition Arrow__arrow_second +#[local] Definition Arrow__arrow_second : forall {b : Type}, forall {c : Type}, forall {d : Type}, @@ -261,6 +300,7 @@ Local Definition Arrow__arrow_second fun {b : Type} {c : Type} {d : Type} => (fun arg_0__ => Arrow__arrow_op_ztztzt__ Control.Category.id arg_0__). +#[global] Program Instance Arrow__arrow : Arrow GHC.Prim.arrow := fun _ k__ => k__ {| arr__ := fun {b : Type} {c : Type} => Arrow__arrow_arr ; @@ -271,6 +311,101 @@ Program Instance Arrow__arrow : Arrow GHC.Prim.arrow := Arrow__arrow_op_ztztzt__ ; second__ := fun {b : Type} {c : Type} {d : Type} => Arrow__arrow_second |}. +#[local] Definition Applicative__Kleisli_op_zlztzg__ {inst_m : Type -> Type} + {inst_a : Type} `{GHC.Base.Applicative inst_m} + : forall {a : Type}, + forall {b : Type}, + Kleisli inst_m inst_a (a -> b) -> + Kleisli inst_m inst_a a -> Kleisli inst_m inst_a b := + fun {a : Type} {b : Type} => + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | Mk_Kleisli f, Mk_Kleisli g => Mk_Kleisli (fun x => f x GHC.Base.<*> g x) + end. + +#[local] Definition Applicative__Kleisli_liftA2 {inst_m : Type -> Type} {inst_a + : Type} `{GHC.Base.Applicative inst_m} + : forall {a : Type}, + forall {b : Type}, + forall {c : Type}, + (a -> b -> c) -> + Kleisli inst_m inst_a a -> Kleisli inst_m inst_a b -> Kleisli inst_m inst_a c := + fun {a : Type} {b : Type} {c : Type} => + fun f x => Applicative__Kleisli_op_zlztzg__ (GHC.Base.fmap f x). + +#[local] Definition Applicative__Kleisli_op_ztzg__ {inst_m : Type -> Type} + {inst_a : Type} `{GHC.Base.Applicative inst_m} + : forall {a : Type}, + forall {b : Type}, + Kleisli inst_m inst_a a -> Kleisli inst_m inst_a b -> Kleisli inst_m inst_a b := + fun {a : Type} {b : Type} => + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | Mk_Kleisli f, Mk_Kleisli g => Mk_Kleisli (fun x => f x GHC.Base.*> g x) + end. + +#[local] Definition Applicative__Kleisli_pure {inst_m : Type -> Type} {inst_a + : Type} `{GHC.Base.Applicative inst_m} + : forall {a : Type}, a -> Kleisli inst_m inst_a a := + fun {a : Type} => + Mk_Kleisli Control.Category.∘ (GHC.Base.const Control.Category.∘ GHC.Base.pure). + +#[global] +Program Instance Applicative__Kleisli {m : Type -> Type} {a : Type} + `{GHC.Base.Applicative m} + : GHC.Base.Applicative (Kleisli m a) := + fun _ k__ => + k__ {| GHC.Base.liftA2__ := fun {a : Type} {b : Type} {c : Type} => + Applicative__Kleisli_liftA2 ; + GHC.Base.op_zlztzg____ := fun {a : Type} {b : Type} => + Applicative__Kleisli_op_zlztzg__ ; + GHC.Base.op_ztzg____ := fun {a : Type} {b : Type} => + Applicative__Kleisli_op_ztzg__ ; + GHC.Base.pure__ := fun {a : Type} => Applicative__Kleisli_pure |}. + +(* Skipping all instances of class `GHC.Base.Alternative', including + `Control.Arrow.Alternative__Kleisli' *) + +#[local] Definition Monad__Kleisli_op_zgzgze__ {inst_m : Type -> Type} {inst_a + : Type} `{GHC.Base.Monad inst_m} + : forall {a : Type}, + forall {b : Type}, + Kleisli inst_m inst_a a -> + (a -> Kleisli inst_m inst_a b) -> Kleisli inst_m inst_a b := + fun {a : Type} {b : Type} => + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | Mk_Kleisli f, k => + Mk_Kleisli (fun x => f x GHC.Base.>>= (fun a => runKleisli (k a) x)) + end. + +#[local] Definition Monad__Kleisli_op_zgzg__ {inst_m : Type -> Type} {inst_a + : Type} `{GHC.Base.Monad inst_m} + : forall {a : Type}, + forall {b : Type}, + Kleisli inst_m inst_a a -> Kleisli inst_m inst_a b -> Kleisli inst_m inst_a b := + fun {a : Type} {b : Type} => + fun m k => Monad__Kleisli_op_zgzgze__ m (fun arg_0__ => k). + +#[local] Definition Monad__Kleisli_return_ {inst_m : Type -> Type} {inst_a + : Type} `{GHC.Base.Monad inst_m} + : forall {a : Type}, a -> Kleisli inst_m inst_a a := + fun {a : Type} => GHC.Base.pure. + +#[global] +Program Instance Monad__Kleisli {m : Type -> Type} {a : Type} `{GHC.Base.Monad + m} + : GHC.Base.Monad (Kleisli m a) := + fun _ k__ => + k__ {| GHC.Base.op_zgzg____ := fun {a : Type} {b : Type} => + Monad__Kleisli_op_zgzg__ ; + GHC.Base.op_zgzgze____ := fun {a : Type} {b : Type} => + Monad__Kleisli_op_zgzgze__ ; + GHC.Base.return___ := fun {a : Type} => Monad__Kleisli_return_ |}. + +(* Skipping all instances of class `GHC.Base.MonadPlus', including + `Control.Arrow.MonadPlus__Kleisli' *) + (* Skipping instance `Control.Arrow.Category__Kleisli' of class `Control.Category.Category' *) @@ -289,11 +424,12 @@ Program Instance Arrow__arrow : Arrow GHC.Prim.arrow := (* Skipping instance `Control.Arrow.ArrowChoice__Kleisli' of class `Control.Arrow.ArrowChoice' *) -Local Definition ArrowApply__arrow_app +#[local] Definition ArrowApply__arrow_app : forall {b : Type}, forall {c : Type}, GHC.Prim.arrow (GHC.Prim.arrow b c * b)%type c := fun {b : Type} {c : Type} => fun '(pair f x) => f x. +#[global] Program Instance ArrowApply__arrow : ArrowApply GHC.Prim.arrow := fun _ k__ => k__ {| app__ := fun {b : Type} {c : Type} => ArrowApply__arrow_app |}. @@ -301,7 +437,7 @@ Program Instance ArrowApply__arrow : ArrowApply GHC.Prim.arrow := (* Skipping instance `Control.Arrow.ArrowApply__Kleisli' of class `Control.Arrow.ArrowApply' *) -Local Definition Functor__ArrowMonad_fmap {inst_a : Type -> Type -> Type} +#[local] Definition Functor__ArrowMonad_fmap {inst_a : Type -> Type -> Type} `{Arrow inst_a} : forall {a : Type}, forall {b : Type}, (a -> b) -> ArrowMonad inst_a a -> ArrowMonad inst_a b := @@ -311,12 +447,13 @@ Local Definition Functor__ArrowMonad_fmap {inst_a : Type -> Type -> Type} | f, Mk_ArrowMonad m => Mk_ArrowMonad (m Control.Category.>>> arr f) end. -Local Definition Functor__ArrowMonad_op_zlzd__ {inst_a : Type -> Type -> Type} - `{Arrow inst_a} +#[local] Definition Functor__ArrowMonad_op_zlzd__ {inst_a + : Type -> Type -> Type} `{Arrow inst_a} : forall {a : Type}, forall {b : Type}, a -> ArrowMonad inst_a b -> ArrowMonad inst_a a := fun {a : Type} {b : Type} => Functor__ArrowMonad_fmap GHC.Base.∘ GHC.Base.const. +#[global] Program Instance Functor__ArrowMonad {a : Type -> Type -> Type} `{Arrow a} : GHC.Base.Functor (ArrowMonad a) := fun _ k__ => @@ -343,11 +480,12 @@ Program Instance Functor__ArrowMonad {a : Type -> Type -> Type} `{Arrow a} (* Skipping instance `Control.Arrow.ArrowLoop__Kleisli' of class `Control.Arrow.ArrowLoop' *) -Definition returnA {a : Type -> Type -> Type} {b : Type} `{Arrow a} : a b b := +#[global] Definition returnA {a : Type -> Type -> Type} {b : Type} `{Arrow a} + : a b b := arr Control.Category.id. -Definition op_zczgzg__ {a : Type -> Type -> Type} {b : Type} {c : Type} {d - : Type} `{Arrow a} +#[global] Definition op_zczgzg__ {a : Type -> Type -> Type} {b : Type} {c + : Type} {d : Type} `{Arrow a} : (b -> c) -> a c d -> a b d := fun f a => arr f Control.Category.>>> a. @@ -355,8 +493,8 @@ Notation "'_^>>_'" := (op_zczgzg__). Infix "^>>" := (_^>>_) (at level 99). -Definition op_zgzgzc__ {a : Type -> Type -> Type} {b : Type} {c : Type} {d - : Type} `{Arrow a} +#[global] Definition op_zgzgzc__ {a : Type -> Type -> Type} {b : Type} {c + : Type} {d : Type} `{Arrow a} : a b c -> (c -> d) -> a b d := fun a f => a Control.Category.>>> arr f. @@ -364,8 +502,8 @@ Notation "'_>>^_'" := (op_zgzgzc__). Infix ">>^" := (_>>^_) (at level 99). -Definition op_zlzlzc__ {a : Type -> Type -> Type} {c : Type} {d : Type} {b - : Type} `{Arrow a} +#[global] Definition op_zlzlzc__ {a : Type -> Type -> Type} {c : Type} {d + : Type} {b : Type} `{Arrow a} : a c d -> (b -> c) -> a b d := fun a f => a Control.Category.<<< arr f. @@ -373,8 +511,8 @@ Notation "'_<<^_'" := (op_zlzlzc__). Infix "<<^" := (_<<^_) (at level 99). -Definition op_zczlzl__ {a : Type -> Type -> Type} {c : Type} {d : Type} {b - : Type} `{Arrow a} +#[global] Definition op_zczlzl__ {a : Type -> Type -> Type} {c : Type} {d + : Type} {b : Type} `{Arrow a} : (c -> d) -> a b c -> a b d := fun f a => arr f Control.Category.<<< a. @@ -407,7 +545,12 @@ End Notations. (* External variables: Type op_zt__ pair unit Control.Category.Category Control.Category.id - Control.Category.op_zgzgzg__ Control.Category.op_zlzlzl__ Data.Either.Either - GHC.Base.Functor GHC.Base.const GHC.Base.fmap__ GHC.Base.op_z2218U__ - GHC.Base.op_zlzd____ GHC.Prim.arrow + Control.Category.op_z2218U__ Control.Category.op_zgzgzg__ + Control.Category.op_zlzlzl__ Data.Either.Either GHC.Base.Applicative + GHC.Base.Functor GHC.Base.Monad GHC.Base.const GHC.Base.fmap GHC.Base.fmap__ + GHC.Base.liftA2__ GHC.Base.op_z2218U__ GHC.Base.op_zgzg____ GHC.Base.op_zgzgze__ + GHC.Base.op_zgzgze____ GHC.Base.op_zlzd__ GHC.Base.op_zlzd____ + GHC.Base.op_zlztzg__ GHC.Base.op_zlztzg____ GHC.Base.op_ztzg__ + GHC.Base.op_ztzg____ GHC.Base.pure GHC.Base.pure__ GHC.Base.return___ + GHC.Prim.arrow *) diff --git a/base/Control/Category.h2ci b/base/Control/Category.h2ci index 82c0a0aed..39e8d99de 100644 --- a/base/Control/Category.h2ci +++ b/base/Control/Category.h2ci @@ -1,5 +1,3 @@ -superclassCount: - Control.Category.Category: '0' classTypes: Control.Category.Category: fromList [] classDefns: @@ -18,3 +16,5 @@ classDefns: (Bare "cat")) (PosArg (Qualid (Bare "a")) :| [])) (PosArg (Qualid (Bare "b")) :| [])) (App (App (Qualid (Bare "cat")) (PosArg (Qualid (Bare "a")) :| [])) (PosArg (Qualid (Bare "c")) :| [])))))))] +superclassCount: + Control.Category.Category: '0' diff --git a/base/Control/Category.v b/base/Control/Category.v index 7b6ab618f..72676a1cc 100644 --- a/base/Control/Category.v +++ b/base/Control/Category.v @@ -27,14 +27,14 @@ Record Category__Dict {k : Type} (cat : k -> k -> Type) := op_z2218U____ : forall {b : k}, forall {c : k}, forall {a : k}, cat b c -> cat a b -> cat a c }. -Definition Category {k : Type} (cat : k -> k -> Type) := +#[global] Definition Category {k : Type} (cat : k -> k -> Type) := forall r__, (Category__Dict cat -> r__) -> r__. Existing Class Category. -Definition id `{g__0__ : Category k cat} : forall {a : k}, cat a a := +#[global] Definition id `{g__0__ : Category k cat} : forall {a : k}, cat a a := g__0__ _ (id__ cat). -Definition op_z2218U__ `{g__0__ : Category k cat} +#[global] Definition op_z2218U__ `{g__0__ : Category k cat} : forall {b : k}, forall {c : k}, forall {a : k}, cat b c -> cat a b -> cat a c := g__0__ _ (op_z2218U____ cat). @@ -45,16 +45,18 @@ Infix "∘" := (_∘_) (left associativity, at level 40). (* Converted value declarations: *) -Local Definition Category__arrow_id : forall {a : Type}, GHC.Prim.arrow a a := +#[local] Definition Category__arrow_id + : forall {a : Type}, GHC.Prim.arrow a a := fun {a : Type} => GHC.Base.id. -Local Definition Category__arrow_op_z2218U__ +#[local] Definition Category__arrow_op_z2218U__ : forall {b : Type}, forall {c : Type}, forall {a : Type}, GHC.Prim.arrow b c -> GHC.Prim.arrow a b -> GHC.Prim.arrow a c := fun {b : Type} {c : Type} {a : Type} => _GHC.Base.∘_. +#[global] Program Instance Category__arrow : Category GHC.Prim.arrow := fun _ k__ => k__ {| id__ := fun {a : Type} => Category__arrow_id ; @@ -70,8 +72,8 @@ Program Instance Category__arrow : Category GHC.Prim.arrow := (* Skipping instance `Control.Category.Category__Coercion' of class `Control.Category.Category' *) -Definition op_zlzlzl__ {k : Type} {cat : k -> k -> Type} {b : k} {c : k} {a : k} - `{Category k cat} +#[global] Definition op_zlzlzl__ {k : Type} {cat : k -> k -> Type} {b : k} {c + : k} {a : k} `{Category k cat} : cat b c -> cat a b -> cat a c := _∘_. @@ -79,8 +81,8 @@ Notation "'_<<<_'" := (op_zlzlzl__). Infix "<<<" := (_<<<_) (at level 99). -Definition op_zgzgzg__ {k : Type} {cat : k -> k -> Type} {a : k} {b : k} {c : k} - `{Category k cat} +#[global] Definition op_zgzgzg__ {k : Type} {cat : k -> k -> Type} {a : k} {b + : k} {c : k} `{Category k cat} : cat a b -> cat b c -> cat a c := fun f g => g ∘ f. diff --git a/base/Control/Monad.v b/base/Control/Monad.v index addb67527..cba9c5df3 100644 --- a/base/Control/Monad.v +++ b/base/Control/Monad.v @@ -31,7 +31,8 @@ Import GHC.Base.Notations. (* Skipping definition `Control.Monad.guard' *) -Definition filterM {m : Type -> Type} {a : Type} `{GHC.Base.Applicative m} +#[global] Definition filterM {m : Type -> Type} {a : Type} + `{GHC.Base.Applicative m} : (a -> m bool) -> list a -> m (list a) := fun p => GHC.Base.foldr (fun x => @@ -40,8 +41,8 @@ Definition filterM {m : Type -> Type} {a : Type} `{GHC.Base.Applicative m} then (fun arg_0__ => cons x arg_0__) else GHC.Base.id) (p x)) (GHC.Base.pure nil). -Definition op_zgzezg__ {m : Type -> Type} {a : Type} {b : Type} {c : Type} - `{GHC.Base.Monad m} +#[global] Definition op_zgzezg__ {m : Type -> Type} {a : Type} {b : Type} {c + : Type} `{GHC.Base.Monad m} : (a -> m b) -> (b -> m c) -> a -> m c := fun f g => fun x => f x GHC.Base.>>= g. @@ -49,8 +50,8 @@ Notation "'_>=>_'" := (op_zgzezg__). Infix ">=>" := (_>=>_) (at level 99). -Definition op_zlzezl__ {m : Type -> Type} {b : Type} {c : Type} {a : Type} - `{GHC.Base.Monad m} +#[global] Definition op_zlzezl__ {m : Type -> Type} {b : Type} {c : Type} {a + : Type} `{GHC.Base.Monad m} : (b -> m c) -> (a -> m b) -> a -> m c := GHC.Base.flip _>=>_. @@ -60,28 +61,28 @@ Infix "<=<" := (_<=<_) (at level 99). (* Skipping definition `Control.Monad.forever' *) -Definition mapAndUnzipM {m : Type -> Type} {a : Type} {b : Type} {c : Type} - `{GHC.Base.Applicative m} +#[global] Definition mapAndUnzipM {m : Type -> Type} {a : Type} {b : Type} {c + : Type} `{GHC.Base.Applicative m} : (a -> m (b * c)%type) -> list a -> m (list b * list c)%type := fun f xs => GHC.List.unzip Data.Functor.<$> Data.Traversable.traverse f xs. -Definition zipWithM {m} {a} {b} {c} `{_ : GHC.Base.Applicative m} +#[global] Definition zipWithM {m} {a} {b} {c} `{_ : GHC.Base.Applicative m} : (a -> b -> m c) -> list a -> list b -> m (list c) := fun f xs ys => (@Data.Traversable.sequenceA _ _ _ _ m _ _ _ (GHC.List.zipWith f xs ys)). -Definition zipWithM_ {m : Type -> Type} {a : Type} {b : Type} {c : Type} - `{GHC.Base.Applicative m} +#[global] Definition zipWithM_ {m : Type -> Type} {a : Type} {b : Type} {c + : Type} `{GHC.Base.Applicative m} : (a -> b -> m c) -> list a -> list b -> m unit := fun f xs ys => Data.Foldable.sequenceA_ (GHC.List.zipWith f xs ys). -Definition foldM {t : Type -> Type} {m : Type -> Type} {b : Type} {a : Type} - `{Data.Foldable.Foldable t} `{GHC.Base.Monad m} +#[global] Definition foldM {t : Type -> Type} {m : Type -> Type} {b : Type} {a + : Type} `{Data.Foldable.Foldable t} `{GHC.Base.Monad m} : (b -> a -> m b) -> b -> t a -> m b := Data.Foldable.foldlM. -Definition foldM_ {t : Type -> Type} {m : Type -> Type} {b : Type} {a : Type} - `{Data.Foldable.Foldable t} `{GHC.Base.Monad m} +#[global] Definition foldM_ {t : Type -> Type} {m : Type -> Type} {b : Type} {a + : Type} `{Data.Foldable.Foldable t} `{GHC.Base.Monad m} : (b -> a -> m b) -> b -> t a -> m unit := fun f a xs => Data.Foldable.foldlM f a xs GHC.Base.>> GHC.Base.return_ tt. @@ -89,11 +90,11 @@ Definition foldM_ {t : Type -> Type} {m : Type -> Type} {b : Type} {a : Type} (* Skipping definition `Control.Monad.replicateM_' *) -Definition unless {f : Type -> Type} `{GHC.Base.Applicative f} +#[global] Definition unless {f : Type -> Type} `{GHC.Base.Applicative f} : bool -> f unit -> f unit := fun p s => if p : bool then GHC.Base.pure tt else s. -Definition op_zlzdznzg__ {m : Type -> Type} {a : Type} {b : Type} +#[global] Definition op_zlzdznzg__ {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} : (a -> b) -> m a -> m b := fun f m => diff --git a/base/Control/Monad/Fail.h2ci b/base/Control/Monad/Fail.h2ci index d532d6add..56d86caca 100644 --- a/base/Control/Monad/Fail.h2ci +++ b/base/Control/Monad/Fail.h2ci @@ -1,5 +1,3 @@ -superclassCount: - Control.Monad.Fail.MonadFail: '3' classTypes: Control.Monad.Fail.MonadFail: fromList [] classDefns: @@ -10,3 +8,5 @@ classDefns: "Control.Monad.Fail" "fail",Forall (Typed Ungeneralizable Implicit (Ident (Bare "a") :| []) (Qualid (Bare "Type")) :| []) (Arrow (Qualid (Qualified "GHC.Base" "String")) (App (Qualid (Bare "m")) (PosArg (Qualid (Bare "a")) :| []))))] +superclassCount: + Control.Monad.Fail.MonadFail: '3' diff --git a/base/Control/Monad/Fail.v b/base/Control/Monad/Fail.v index 7e1733f76..681ce1de7 100644 --- a/base/Control/Monad/Fail.v +++ b/base/Control/Monad/Fail.v @@ -19,27 +19,29 @@ Require GHC.Base. Record MonadFail__Dict (m : Type -> Type) := MonadFail__Dict_Build { fail__ : forall {a : Type}, GHC.Base.String -> m a }. -Definition MonadFail (m : Type -> Type) `{GHC.Base.Monad m} := +#[global] Definition MonadFail (m : Type -> Type) `{GHC.Base.Monad m} := forall r__, (MonadFail__Dict m -> r__) -> r__. Existing Class MonadFail. -Definition fail `{g__0__ : MonadFail m} +#[global] Definition fail `{g__0__ : MonadFail m} : forall {a : Type}, GHC.Base.String -> m a := g__0__ _ (fail__ m). (* Converted value declarations: *) -Local Definition MonadFail__option_fail +#[local] Definition MonadFail__option_fail : forall {a : Type}, GHC.Base.String -> option a := fun {a : Type} => fun arg_0__ => None. +#[global] Program Instance MonadFail__option : MonadFail option := fun _ k__ => k__ {| fail__ := fun {a : Type} => MonadFail__option_fail |}. -Local Definition MonadFail__list_fail +#[local] Definition MonadFail__list_fail : forall {a : Type}, GHC.Base.String -> list a := fun {a : Type} => fun arg_0__ => nil. +#[global] Program Instance MonadFail__list : MonadFail list := fun _ k__ => k__ {| fail__ := fun {a : Type} => MonadFail__list_fail |}. diff --git a/base/Control/Monad/Zip.h2ci b/base/Control/Monad/Zip.h2ci index d78a578a0..2d9d75f37 100644 --- a/base/Control/Monad/Zip.h2ci +++ b/base/Control/Monad/Zip.h2ci @@ -1,20 +1,3 @@ -superclassCount: - Control.Monad.Zip.MonadZip: '3' -defaultMethods: - Control.Monad.Zip.MonadZip: fromList [(Qualified "Control.Monad.Zip" "munzip",Fun - (ExplicitBinder (Ident (Bare "mab")) :| []) (App (Qualid (Bare "pair")) (PosArg - (App (App (Qualid (Qualified "GHC.Base" "liftM")) (PosArg (Qualid (Qualified "Data.Tuple" - "fst")) :| [])) (PosArg (Qualid (Bare "mab")) :| [])) :| [PosArg (App (App (Qualid - (Qualified "GHC.Base" "liftM")) (PosArg (Qualid (Qualified "Data.Tuple" "snd")) - :| [])) (PosArg (Qualid (Bare "mab")) :| []))]))),(Qualified "Control.Monad.Zip" - "mzip",App (Qualid (Qualified "Control.Monad.Zip" "mzipWith")) (PosArg (Qualid - (Qualified "GHC.Tuple" "pair2")) :| [])),(Qualified "Control.Monad.Zip" "mzipWith",Fun - (ExplicitBinder (Ident (Bare "f")) :| [ExplicitBinder (Ident (Bare "ma")),ExplicitBinder - (Ident (Bare "mb"))]) (App (App (Qualid (Qualified "GHC.Base" "liftM")) (PosArg - (Parens (App (Qualid (Qualified "Data.Tuple" "uncurry")) (PosArg (Qualid (Bare - "f")) :| []))) :| [])) (PosArg (Parens (App (App (Qualid (Qualified "Control.Monad.Zip" - "mzip")) (PosArg (Qualid (Bare "ma")) :| [])) (PosArg (Qualid (Bare "mb")) :| - []))) :| [])))] classTypes: Control.Monad.Zip.MonadZip: fromList [] classDefns: @@ -43,3 +26,20 @@ classDefns: (Bare "c")))) (Arrow (App (Qualid (Bare "m")) (PosArg (Qualid (Bare "a")) :| [])) (Arrow (App (Qualid (Bare "m")) (PosArg (Qualid (Bare "b")) :| [])) (App (Qualid (Bare "m")) (PosArg (Qualid (Bare "c")) :| []))))))))] +superclassCount: + Control.Monad.Zip.MonadZip: '3' +defaultMethods: + Control.Monad.Zip.MonadZip: fromList [(Qualified "Control.Monad.Zip" "munzip",Fun + (ExplicitBinder (Ident (Bare "mab")) :| []) (App (Qualid (Bare "pair")) (PosArg + (App (App (Qualid (Qualified "GHC.Base" "liftM")) (PosArg (Qualid (Qualified "Data.Tuple" + "fst")) :| [])) (PosArg (Qualid (Bare "mab")) :| [])) :| [PosArg (App (App (Qualid + (Qualified "GHC.Base" "liftM")) (PosArg (Qualid (Qualified "Data.Tuple" "snd")) + :| [])) (PosArg (Qualid (Bare "mab")) :| []))]))),(Qualified "Control.Monad.Zip" + "mzip",App (Qualid (Qualified "Control.Monad.Zip" "mzipWith")) (PosArg (Qualid + (Qualified "GHC.Tuple" "pair2")) :| [])),(Qualified "Control.Monad.Zip" "mzipWith",Fun + (ExplicitBinder (Ident (Bare "f")) :| [ExplicitBinder (Ident (Bare "ma")),ExplicitBinder + (Ident (Bare "mb"))]) (App (App (Qualid (Qualified "GHC.Base" "liftM")) (PosArg + (Parens (App (Qualid (Qualified "Data.Tuple" "uncurry")) (PosArg (Qualid (Bare + "f")) :| []))) :| [])) (PosArg (Parens (App (App (Qualid (Qualified "Control.Monad.Zip" + "mzip")) (PosArg (Qualid (Bare "ma")) :| [])) (PosArg (Qualid (Bare "mb")) :| + []))) :| [])))] diff --git a/base/Control/Monad/Zip.v b/base/Control/Monad/Zip.v index 84d7d5b76..f03ef04f0 100644 --- a/base/Control/Monad/Zip.v +++ b/base/Control/Monad/Zip.v @@ -15,6 +15,7 @@ Require Coq.Program.Wf. Require Data.Functor.Identity. Require Data.List.NonEmpty. Require Data.Monoid. +Require Data.Ord. Require Data.Proxy. Require Data.SemigroupInternal. Require Data.Tuple. @@ -31,41 +32,42 @@ Record MonadZip__Dict (m : Type -> Type) := MonadZip__Dict_Build { mzipWith__ : forall {a : Type}, forall {b : Type}, forall {c : Type}, (a -> b -> c) -> m a -> m b -> m c }. -Definition MonadZip (m : Type -> Type) `{GHC.Base.Monad m} := +#[global] Definition MonadZip (m : Type -> Type) `{GHC.Base.Monad m} := forall r__, (MonadZip__Dict m -> r__) -> r__. Existing Class MonadZip. -Definition munzip `{g__0__ : MonadZip m} +#[global] Definition munzip `{g__0__ : MonadZip m} : forall {a : Type}, forall {b : Type}, m (a * b)%type -> (m a * m b)%type := g__0__ _ (munzip__ m). -Definition mzip `{g__0__ : MonadZip m} +#[global] Definition mzip `{g__0__ : MonadZip m} : forall {a : Type}, forall {b : Type}, m a -> m b -> m (a * b)%type := g__0__ _ (mzip__ m). -Definition mzipWith `{g__0__ : MonadZip m} +#[global] Definition mzipWith `{g__0__ : MonadZip m} : forall {a : Type}, forall {b : Type}, forall {c : Type}, (a -> b -> c) -> m a -> m b -> m c := g__0__ _ (mzipWith__ m). (* Converted value declarations: *) -Local Definition MonadZip__list_munzip +#[local] Definition MonadZip__list_munzip : forall {a : Type}, forall {b : Type}, list (a * b)%type -> (list a * list b)%type := fun {a : Type} {b : Type} => GHC.List.unzip. -Local Definition MonadZip__list_mzip +#[local] Definition MonadZip__list_mzip : forall {a : Type}, forall {b : Type}, list a -> list b -> list (a * b)%type := fun {a : Type} {b : Type} => GHC.List.zip. -Local Definition MonadZip__list_mzipWith +#[local] Definition MonadZip__list_mzipWith : forall {a : Type}, forall {b : Type}, forall {c : Type}, (a -> b -> c) -> list a -> list b -> list c := fun {a : Type} {b : Type} {c : Type} => GHC.List.zipWith. +#[global] Program Instance MonadZip__list : MonadZip list := fun _ k__ => k__ {| munzip__ := fun {a : Type} {b : Type} => MonadZip__list_munzip ; @@ -73,20 +75,20 @@ Program Instance MonadZip__list : MonadZip list := mzipWith__ := fun {a : Type} {b : Type} {c : Type} => MonadZip__list_mzipWith |}. -Local Definition MonadZip__NonEmpty_munzip +#[local] Definition MonadZip__NonEmpty_munzip : forall {a : Type}, forall {b : Type}, GHC.Base.NonEmpty (a * b)%type -> (GHC.Base.NonEmpty a * GHC.Base.NonEmpty b)%type := fun {a : Type} {b : Type} => Data.List.NonEmpty.unzip. -Local Definition MonadZip__NonEmpty_mzip +#[local] Definition MonadZip__NonEmpty_mzip : forall {a : Type}, forall {b : Type}, GHC.Base.NonEmpty a -> GHC.Base.NonEmpty b -> GHC.Base.NonEmpty (a * b)%type := fun {a : Type} {b : Type} => Data.List.NonEmpty.zip. -Local Definition MonadZip__NonEmpty_mzipWith +#[local] Definition MonadZip__NonEmpty_mzipWith : forall {a : Type}, forall {b : Type}, forall {c : Type}, @@ -94,6 +96,7 @@ Local Definition MonadZip__NonEmpty_mzipWith GHC.Base.NonEmpty a -> GHC.Base.NonEmpty b -> GHC.Base.NonEmpty c := fun {a : Type} {b : Type} {c : Type} => Data.List.NonEmpty.zipWith. +#[global] Program Instance MonadZip__NonEmpty : MonadZip GHC.Base.NonEmpty := fun _ k__ => k__ {| munzip__ := fun {a : Type} {b : Type} => MonadZip__NonEmpty_munzip ; @@ -101,7 +104,7 @@ Program Instance MonadZip__NonEmpty : MonadZip GHC.Base.NonEmpty := mzipWith__ := fun {a : Type} {b : Type} {c : Type} => MonadZip__NonEmpty_mzipWith |}. -Local Definition MonadZip__Identity_munzip +#[local] Definition MonadZip__Identity_munzip : forall {a : Type}, forall {b : Type}, Data.Functor.Identity.Identity (a * b)%type -> @@ -111,7 +114,7 @@ Local Definition MonadZip__Identity_munzip pair (Data.Functor.Identity.Mk_Identity a) (Data.Functor.Identity.Mk_Identity b). -Local Definition MonadZip__Identity_mzipWith +#[local] Definition MonadZip__Identity_mzipWith : forall {a : Type}, forall {b : Type}, forall {c : Type}, @@ -120,7 +123,7 @@ Local Definition MonadZip__Identity_mzipWith Data.Functor.Identity.Identity b -> Data.Functor.Identity.Identity c := fun {a : Type} {b : Type} {c : Type} => GHC.Base.liftM2. -Local Definition MonadZip__Identity_mzip +#[local] Definition MonadZip__Identity_mzip : forall {a : Type}, forall {b : Type}, Data.Functor.Identity.Identity a -> @@ -128,6 +131,7 @@ Local Definition MonadZip__Identity_mzip Data.Functor.Identity.Identity (a * b)%type := fun {a : Type} {b : Type} => MonadZip__Identity_mzipWith GHC.Tuple.pair2. +#[global] Program Instance MonadZip__Identity : MonadZip Data.Functor.Identity.Identity := fun _ k__ => k__ {| munzip__ := fun {a : Type} {b : Type} => MonadZip__Identity_munzip ; @@ -135,7 +139,7 @@ Program Instance MonadZip__Identity : MonadZip Data.Functor.Identity.Identity := mzipWith__ := fun {a : Type} {b : Type} {c : Type} => MonadZip__Identity_mzipWith |}. -Local Definition MonadZip__Dual_munzip +#[local] Definition MonadZip__Dual_munzip : forall {a : Type}, forall {b : Type}, Data.SemigroupInternal.Dual (a * b)%type -> @@ -144,7 +148,7 @@ Local Definition MonadZip__Dual_munzip fun mab => pair (GHC.Base.liftM Data.Tuple.fst mab) (GHC.Base.liftM Data.Tuple.snd mab). -Local Definition MonadZip__Dual_mzipWith +#[local] Definition MonadZip__Dual_mzipWith : forall {a : Type}, forall {b : Type}, forall {c : Type}, @@ -153,13 +157,14 @@ Local Definition MonadZip__Dual_mzipWith Data.SemigroupInternal.Dual b -> Data.SemigroupInternal.Dual c := fun {a : Type} {b : Type} {c : Type} => GHC.Base.liftM2. -Local Definition MonadZip__Dual_mzip +#[local] Definition MonadZip__Dual_mzip : forall {a : Type}, forall {b : Type}, Data.SemigroupInternal.Dual a -> Data.SemigroupInternal.Dual b -> Data.SemigroupInternal.Dual (a * b)%type := fun {a : Type} {b : Type} => MonadZip__Dual_mzipWith GHC.Tuple.pair2. +#[global] Program Instance MonadZip__Dual : MonadZip Data.SemigroupInternal.Dual := fun _ k__ => k__ {| munzip__ := fun {a : Type} {b : Type} => MonadZip__Dual_munzip ; @@ -167,7 +172,7 @@ Program Instance MonadZip__Dual : MonadZip Data.SemigroupInternal.Dual := mzipWith__ := fun {a : Type} {b : Type} {c : Type} => MonadZip__Dual_mzipWith |}. -Local Definition MonadZip__Sum_munzip +#[local] Definition MonadZip__Sum_munzip : forall {a : Type}, forall {b : Type}, Data.SemigroupInternal.Sum (a * b)%type -> @@ -176,7 +181,7 @@ Local Definition MonadZip__Sum_munzip fun mab => pair (GHC.Base.liftM Data.Tuple.fst mab) (GHC.Base.liftM Data.Tuple.snd mab). -Local Definition MonadZip__Sum_mzipWith +#[local] Definition MonadZip__Sum_mzipWith : forall {a : Type}, forall {b : Type}, forall {c : Type}, @@ -185,20 +190,21 @@ Local Definition MonadZip__Sum_mzipWith Data.SemigroupInternal.Sum b -> Data.SemigroupInternal.Sum c := fun {a : Type} {b : Type} {c : Type} => GHC.Base.liftM2. -Local Definition MonadZip__Sum_mzip +#[local] Definition MonadZip__Sum_mzip : forall {a : Type}, forall {b : Type}, Data.SemigroupInternal.Sum a -> Data.SemigroupInternal.Sum b -> Data.SemigroupInternal.Sum (a * b)%type := fun {a : Type} {b : Type} => MonadZip__Sum_mzipWith GHC.Tuple.pair2. +#[global] Program Instance MonadZip__Sum : MonadZip Data.SemigroupInternal.Sum := fun _ k__ => k__ {| munzip__ := fun {a : Type} {b : Type} => MonadZip__Sum_munzip ; mzip__ := fun {a : Type} {b : Type} => MonadZip__Sum_mzip ; mzipWith__ := fun {a : Type} {b : Type} {c : Type} => MonadZip__Sum_mzipWith |}. -Local Definition MonadZip__Product_munzip +#[local] Definition MonadZip__Product_munzip : forall {a : Type}, forall {b : Type}, Data.SemigroupInternal.Product (a * b)%type -> @@ -207,7 +213,7 @@ Local Definition MonadZip__Product_munzip fun mab => pair (GHC.Base.liftM Data.Tuple.fst mab) (GHC.Base.liftM Data.Tuple.snd mab). -Local Definition MonadZip__Product_mzipWith +#[local] Definition MonadZip__Product_mzipWith : forall {a : Type}, forall {b : Type}, forall {c : Type}, @@ -216,7 +222,7 @@ Local Definition MonadZip__Product_mzipWith Data.SemigroupInternal.Product b -> Data.SemigroupInternal.Product c := fun {a : Type} {b : Type} {c : Type} => GHC.Base.liftM2. -Local Definition MonadZip__Product_mzip +#[local] Definition MonadZip__Product_mzip : forall {a : Type}, forall {b : Type}, Data.SemigroupInternal.Product a -> @@ -224,6 +230,7 @@ Local Definition MonadZip__Product_mzip Data.SemigroupInternal.Product (a * b)%type := fun {a : Type} {b : Type} => MonadZip__Product_mzipWith GHC.Tuple.pair2. +#[global] Program Instance MonadZip__Product : MonadZip Data.SemigroupInternal.Product := fun _ k__ => k__ {| munzip__ := fun {a : Type} {b : Type} => MonadZip__Product_munzip ; @@ -231,24 +238,25 @@ Program Instance MonadZip__Product : MonadZip Data.SemigroupInternal.Product := mzipWith__ := fun {a : Type} {b : Type} {c : Type} => MonadZip__Product_mzipWith |}. -Local Definition MonadZip__option_munzip +#[local] Definition MonadZip__option_munzip : forall {a : Type}, forall {b : Type}, option (a * b)%type -> (option a * option b)%type := fun {a : Type} {b : Type} => fun mab => pair (GHC.Base.liftM Data.Tuple.fst mab) (GHC.Base.liftM Data.Tuple.snd mab). -Local Definition MonadZip__option_mzipWith +#[local] Definition MonadZip__option_mzipWith : forall {a : Type}, forall {b : Type}, forall {c : Type}, (a -> b -> c) -> option a -> option b -> option c := fun {a : Type} {b : Type} {c : Type} => GHC.Base.liftM2. -Local Definition MonadZip__option_mzip +#[local] Definition MonadZip__option_mzip : forall {a : Type}, forall {b : Type}, option a -> option b -> option (a * b)%type := fun {a : Type} {b : Type} => MonadZip__option_mzipWith GHC.Tuple.pair2. +#[global] Program Instance MonadZip__option : MonadZip option := fun _ k__ => k__ {| munzip__ := fun {a : Type} {b : Type} => MonadZip__option_munzip ; @@ -256,7 +264,7 @@ Program Instance MonadZip__option : MonadZip option := mzipWith__ := fun {a : Type} {b : Type} {c : Type} => MonadZip__option_mzipWith |}. -Local Definition MonadZip__First_munzip +#[local] Definition MonadZip__First_munzip : forall {a : Type}, forall {b : Type}, Data.Monoid.First (a * b)%type -> @@ -265,7 +273,7 @@ Local Definition MonadZip__First_munzip fun mab => pair (GHC.Base.liftM Data.Tuple.fst mab) (GHC.Base.liftM Data.Tuple.snd mab). -Local Definition MonadZip__First_mzipWith +#[local] Definition MonadZip__First_mzipWith : forall {a : Type}, forall {b : Type}, forall {c : Type}, @@ -273,12 +281,13 @@ Local Definition MonadZip__First_mzipWith Data.Monoid.First a -> Data.Monoid.First b -> Data.Monoid.First c := fun {a : Type} {b : Type} {c : Type} => GHC.Base.liftM2. -Local Definition MonadZip__First_mzip +#[local] Definition MonadZip__First_mzip : forall {a : Type}, forall {b : Type}, Data.Monoid.First a -> Data.Monoid.First b -> Data.Monoid.First (a * b)%type := fun {a : Type} {b : Type} => MonadZip__First_mzipWith GHC.Tuple.pair2. +#[global] Program Instance MonadZip__First : MonadZip Data.Monoid.First := fun _ k__ => k__ {| munzip__ := fun {a : Type} {b : Type} => MonadZip__First_munzip ; @@ -286,7 +295,7 @@ Program Instance MonadZip__First : MonadZip Data.Monoid.First := mzipWith__ := fun {a : Type} {b : Type} {c : Type} => MonadZip__First_mzipWith |}. -Local Definition MonadZip__Last_munzip +#[local] Definition MonadZip__Last_munzip : forall {a : Type}, forall {b : Type}, Data.Monoid.Last (a * b)%type -> @@ -295,7 +304,7 @@ Local Definition MonadZip__Last_munzip fun mab => pair (GHC.Base.liftM Data.Tuple.fst mab) (GHC.Base.liftM Data.Tuple.snd mab). -Local Definition MonadZip__Last_mzipWith +#[local] Definition MonadZip__Last_mzipWith : forall {a : Type}, forall {b : Type}, forall {c : Type}, @@ -303,12 +312,13 @@ Local Definition MonadZip__Last_mzipWith Data.Monoid.Last a -> Data.Monoid.Last b -> Data.Monoid.Last c := fun {a : Type} {b : Type} {c : Type} => GHC.Base.liftM2. -Local Definition MonadZip__Last_mzip +#[local] Definition MonadZip__Last_mzip : forall {a : Type}, forall {b : Type}, Data.Monoid.Last a -> Data.Monoid.Last b -> Data.Monoid.Last (a * b)%type := fun {a : Type} {b : Type} => MonadZip__Last_mzipWith GHC.Tuple.pair2. +#[global] Program Instance MonadZip__Last : MonadZip Data.Monoid.Last := fun _ k__ => k__ {| munzip__ := fun {a : Type} {b : Type} => MonadZip__Last_munzip ; @@ -316,7 +326,8 @@ Program Instance MonadZip__Last : MonadZip Data.Monoid.Last := mzipWith__ := fun {a : Type} {b : Type} {c : Type} => MonadZip__Last_mzipWith |}. -Local Definition MonadZip__Alt_munzip {inst_f : Type -> Type} `{MonadZip inst_f} +#[local] Definition MonadZip__Alt_munzip {inst_f : Type -> Type} `{MonadZip + inst_f} : forall {a : Type}, forall {b : Type}, Data.SemigroupInternal.Alt inst_f (a * b)%type -> @@ -326,7 +337,7 @@ Local Definition MonadZip__Alt_munzip {inst_f : Type -> Type} `{MonadZip inst_f} fun mab => pair (GHC.Base.liftM Data.Tuple.fst mab) (GHC.Base.liftM Data.Tuple.snd mab). -Local Definition MonadZip__Alt_mzipWith {inst_f : Type -> Type} `{MonadZip +#[local] Definition MonadZip__Alt_mzipWith {inst_f : Type -> Type} `{MonadZip inst_f} : forall {a : Type}, forall {b : Type}, @@ -341,7 +352,8 @@ Local Definition MonadZip__Alt_mzipWith {inst_f : Type -> Type} `{MonadZip Data.SemigroupInternal.Mk_Alt (mzipWith f ma mb) end. -Local Definition MonadZip__Alt_mzip {inst_f : Type -> Type} `{MonadZip inst_f} +#[local] Definition MonadZip__Alt_mzip {inst_f : Type -> Type} `{MonadZip + inst_f} : forall {a : Type}, forall {b : Type}, Data.SemigroupInternal.Alt inst_f a -> @@ -349,6 +361,7 @@ Local Definition MonadZip__Alt_mzip {inst_f : Type -> Type} `{MonadZip inst_f} Data.SemigroupInternal.Alt inst_f (a * b)%type := fun {a : Type} {b : Type} => MonadZip__Alt_mzipWith GHC.Tuple.pair2. +#[global] Program Instance MonadZip__Alt {f : Type -> Type} `{MonadZip f} : MonadZip (Data.SemigroupInternal.Alt f) := fun _ k__ => @@ -356,7 +369,7 @@ Program Instance MonadZip__Alt {f : Type -> Type} `{MonadZip f} mzip__ := fun {a : Type} {b : Type} => MonadZip__Alt_mzip ; mzipWith__ := fun {a : Type} {b : Type} {c : Type} => MonadZip__Alt_mzipWith |}. -Local Definition MonadZip__Proxy_munzip +#[local] Definition MonadZip__Proxy_munzip : forall {a : Type}, forall {b : Type}, Data.Proxy.Proxy (a * b)%type -> @@ -365,7 +378,7 @@ Local Definition MonadZip__Proxy_munzip fun mab => pair (GHC.Base.liftM Data.Tuple.fst mab) (GHC.Base.liftM Data.Tuple.snd mab). -Local Definition MonadZip__Proxy_mzipWith +#[local] Definition MonadZip__Proxy_mzipWith : forall {a : Type}, forall {b : Type}, forall {c : Type}, @@ -374,12 +387,13 @@ Local Definition MonadZip__Proxy_mzipWith fun {a : Type} {b : Type} {c : Type} => fun arg_0__ arg_1__ arg_2__ => Data.Proxy.Mk_Proxy. -Local Definition MonadZip__Proxy_mzip +#[local] Definition MonadZip__Proxy_mzip : forall {a : Type}, forall {b : Type}, Data.Proxy.Proxy a -> Data.Proxy.Proxy b -> Data.Proxy.Proxy (a * b)%type := fun {a : Type} {b : Type} => MonadZip__Proxy_mzipWith GHC.Tuple.pair2. +#[global] Program Instance MonadZip__Proxy : MonadZip Data.Proxy.Proxy := fun _ k__ => k__ {| munzip__ := fun {a : Type} {b : Type} => MonadZip__Proxy_munzip ; @@ -402,13 +416,43 @@ Program Instance MonadZip__Proxy : MonadZip Data.Proxy.Proxy := (* Skipping instance `Control.Monad.Zip.MonadZip__op_ZCztZC__' of class `Control.Monad.Zip.MonadZip' *) +#[local] Definition MonadZip__Down_munzip + : forall {a : Type}, + forall {b : Type}, + Data.Ord.Down (a * b)%type -> (Data.Ord.Down a * Data.Ord.Down b)%type := + fun {a : Type} {b : Type} => + fun mab => + pair (GHC.Base.liftM Data.Tuple.fst mab) (GHC.Base.liftM Data.Tuple.snd mab). + +#[local] Definition MonadZip__Down_mzipWith + : forall {a : Type}, + forall {b : Type}, + forall {c : Type}, + (a -> b -> c) -> Data.Ord.Down a -> Data.Ord.Down b -> Data.Ord.Down c := + fun {a : Type} {b : Type} {c : Type} => GHC.Base.liftM2. + +#[local] Definition MonadZip__Down_mzip + : forall {a : Type}, + forall {b : Type}, + Data.Ord.Down a -> Data.Ord.Down b -> Data.Ord.Down (a * b)%type := + fun {a : Type} {b : Type} => MonadZip__Down_mzipWith GHC.Tuple.pair2. + +#[global] +Program Instance MonadZip__Down : MonadZip Data.Ord.Down := + fun _ k__ => + k__ {| munzip__ := fun {a : Type} {b : Type} => MonadZip__Down_munzip ; + mzip__ := fun {a : Type} {b : Type} => MonadZip__Down_mzip ; + mzipWith__ := fun {a : Type} {b : Type} {c : Type} => + MonadZip__Down_mzipWith |}. + (* External variables: Type list op_zt__ option pair Data.Functor.Identity.Identity Data.Functor.Identity.Mk_Identity Data.List.NonEmpty.unzip Data.List.NonEmpty.zip Data.List.NonEmpty.zipWith Data.Monoid.First - Data.Monoid.Last Data.Proxy.Mk_Proxy Data.Proxy.Proxy Data.SemigroupInternal.Alt - Data.SemigroupInternal.Dual Data.SemigroupInternal.Mk_Alt - Data.SemigroupInternal.Product Data.SemigroupInternal.Sum Data.Tuple.fst - Data.Tuple.snd GHC.Base.Monad GHC.Base.NonEmpty GHC.Base.liftM GHC.Base.liftM2 - GHC.List.unzip GHC.List.zip GHC.List.zipWith GHC.Tuple.pair2 + Data.Monoid.Last Data.Ord.Down Data.Proxy.Mk_Proxy Data.Proxy.Proxy + Data.SemigroupInternal.Alt Data.SemigroupInternal.Dual + Data.SemigroupInternal.Mk_Alt Data.SemigroupInternal.Product + Data.SemigroupInternal.Sum Data.Tuple.fst Data.Tuple.snd GHC.Base.Monad + GHC.Base.NonEmpty GHC.Base.liftM GHC.Base.liftM2 GHC.List.unzip GHC.List.zip + GHC.List.zipWith GHC.Tuple.pair2 *) diff --git a/base/Data/Bifoldable.h2ci b/base/Data/Bifoldable.h2ci index 3933614b5..48726a3fd 100644 --- a/base/Data/Bifoldable.h2ci +++ b/base/Data/Bifoldable.h2ci @@ -1,3 +1,38 @@ +classTypes: + Data.Bifoldable.Bifoldable: fromList [] +classDefns: + Data.Bifoldable.Bifoldable: ClassDefinition (Qualified "Data.Bifoldable" "Bifoldable") + [Typed Ungeneralizable Explicit (Ident (Bare "p") :| []) (Arrow (Qualid (Bare + "Type")) (Arrow (Qualid (Bare "Type")) (Qualid (Bare "Type"))))] Nothing [(Qualified + "Data.Bifoldable" "bifold",Forall (Typed Ungeneralizable Implicit (Ident (Bare + "m") :| []) (Qualid (Bare "Type")) :| []) (Forall (Generalized Implicit (App (Qualid + (Qualified "GHC.Base" "Monoid")) (PosArg (Qualid (Bare "m")) :| [])) :| []) (Arrow + (App (App (Qualid (Bare "p")) (PosArg (Qualid (Bare "m")) :| [])) (PosArg (Qualid + (Bare "m")) :| [])) (Qualid (Bare "m"))))),(Qualified "Data.Bifoldable" "bifoldMap",Forall + (Typed Ungeneralizable Implicit (Ident (Bare "m") :| []) (Qualid (Bare "Type")) + :| []) (Forall (Typed Ungeneralizable Implicit (Ident (Bare "a") :| []) (Qualid + (Bare "Type")) :| []) (Forall (Typed Ungeneralizable Implicit (Ident (Bare "b") + :| []) (Qualid (Bare "Type")) :| []) (Forall (Generalized Implicit (App (Qualid + (Qualified "GHC.Base" "Monoid")) (PosArg (Qualid (Bare "m")) :| [])) :| []) (Arrow + (Arrow (Qualid (Bare "a")) (Qualid (Bare "m"))) (Arrow (Arrow (Qualid (Bare "b")) + (Qualid (Bare "m"))) (Arrow (App (App (Qualid (Bare "p")) (PosArg (Qualid (Bare + "a")) :| [])) (PosArg (Qualid (Bare "b")) :| [])) (Qualid (Bare "m"))))))))),(Qualified + "Data.Bifoldable" "bifoldl",Forall (Typed Ungeneralizable Implicit (Ident (Bare + "c") :| []) (Qualid (Bare "Type")) :| []) (Forall (Typed Ungeneralizable Implicit + (Ident (Bare "a") :| []) (Qualid (Bare "Type")) :| []) (Forall (Typed Ungeneralizable + Implicit (Ident (Bare "b") :| []) (Qualid (Bare "Type")) :| []) (Arrow (Arrow + (Qualid (Bare "c")) (Arrow (Qualid (Bare "a")) (Qualid (Bare "c")))) (Arrow (Arrow + (Qualid (Bare "c")) (Arrow (Qualid (Bare "b")) (Qualid (Bare "c")))) (Arrow (Qualid + (Bare "c")) (Arrow (App (App (Qualid (Bare "p")) (PosArg (Qualid (Bare "a")) :| + [])) (PosArg (Qualid (Bare "b")) :| [])) (Qualid (Bare "c"))))))))),(Qualified + "Data.Bifoldable" "bifoldr",Forall (Typed Ungeneralizable Implicit (Ident (Bare + "a") :| []) (Qualid (Bare "Type")) :| []) (Forall (Typed Ungeneralizable Implicit + (Ident (Bare "c") :| []) (Qualid (Bare "Type")) :| []) (Forall (Typed Ungeneralizable + Implicit (Ident (Bare "b") :| []) (Qualid (Bare "Type")) :| []) (Arrow (Arrow + (Qualid (Bare "a")) (Arrow (Qualid (Bare "c")) (Qualid (Bare "c")))) (Arrow (Arrow + (Qualid (Bare "b")) (Arrow (Qualid (Bare "c")) (Qualid (Bare "c")))) (Arrow (Qualid + (Bare "c")) (Arrow (App (App (Qualid (Bare "p")) (PosArg (Qualid (Bare "a")) :| + [])) (PosArg (Qualid (Bare "b")) :| [])) (Qualid (Bare "c")))))))))] superclassCount: Data.Bifoldable.Bifoldable: '0' defaultMethods: @@ -35,38 +70,3 @@ defaultMethods: (PosArg (Qualid (Qualified "Data.SemigroupInternal" "Mk_Endo")) :| [PosArg (Qualid (Bare "g"))]))) :| [])) (PosArg (Qualid (Bare "t")) :| []))) :| [])) (PosArg (Qualid (Bare "z")) :| [])))] -classTypes: - Data.Bifoldable.Bifoldable: fromList [] -classDefns: - Data.Bifoldable.Bifoldable: ClassDefinition (Qualified "Data.Bifoldable" "Bifoldable") - [Typed Ungeneralizable Explicit (Ident (Bare "p") :| []) (Arrow (Qualid (Bare - "Type")) (Arrow (Qualid (Bare "Type")) (Qualid (Bare "Type"))))] Nothing [(Qualified - "Data.Bifoldable" "bifold",Forall (Typed Ungeneralizable Implicit (Ident (Bare - "m") :| []) (Qualid (Bare "Type")) :| []) (Forall (Generalized Implicit (App (Qualid - (Qualified "GHC.Base" "Monoid")) (PosArg (Qualid (Bare "m")) :| [])) :| []) (Arrow - (App (App (Qualid (Bare "p")) (PosArg (Qualid (Bare "m")) :| [])) (PosArg (Qualid - (Bare "m")) :| [])) (Qualid (Bare "m"))))),(Qualified "Data.Bifoldable" "bifoldMap",Forall - (Typed Ungeneralizable Implicit (Ident (Bare "m") :| []) (Qualid (Bare "Type")) - :| []) (Forall (Typed Ungeneralizable Implicit (Ident (Bare "a") :| []) (Qualid - (Bare "Type")) :| []) (Forall (Typed Ungeneralizable Implicit (Ident (Bare "b") - :| []) (Qualid (Bare "Type")) :| []) (Forall (Generalized Implicit (App (Qualid - (Qualified "GHC.Base" "Monoid")) (PosArg (Qualid (Bare "m")) :| [])) :| []) (Arrow - (Arrow (Qualid (Bare "a")) (Qualid (Bare "m"))) (Arrow (Arrow (Qualid (Bare "b")) - (Qualid (Bare "m"))) (Arrow (App (App (Qualid (Bare "p")) (PosArg (Qualid (Bare - "a")) :| [])) (PosArg (Qualid (Bare "b")) :| [])) (Qualid (Bare "m"))))))))),(Qualified - "Data.Bifoldable" "bifoldl",Forall (Typed Ungeneralizable Implicit (Ident (Bare - "c") :| []) (Qualid (Bare "Type")) :| []) (Forall (Typed Ungeneralizable Implicit - (Ident (Bare "a") :| []) (Qualid (Bare "Type")) :| []) (Forall (Typed Ungeneralizable - Implicit (Ident (Bare "b") :| []) (Qualid (Bare "Type")) :| []) (Arrow (Arrow - (Qualid (Bare "c")) (Arrow (Qualid (Bare "a")) (Qualid (Bare "c")))) (Arrow (Arrow - (Qualid (Bare "c")) (Arrow (Qualid (Bare "b")) (Qualid (Bare "c")))) (Arrow (Qualid - (Bare "c")) (Arrow (App (App (Qualid (Bare "p")) (PosArg (Qualid (Bare "a")) :| - [])) (PosArg (Qualid (Bare "b")) :| [])) (Qualid (Bare "c"))))))))),(Qualified - "Data.Bifoldable" "bifoldr",Forall (Typed Ungeneralizable Implicit (Ident (Bare - "a") :| []) (Qualid (Bare "Type")) :| []) (Forall (Typed Ungeneralizable Implicit - (Ident (Bare "c") :| []) (Qualid (Bare "Type")) :| []) (Forall (Typed Ungeneralizable - Implicit (Ident (Bare "b") :| []) (Qualid (Bare "Type")) :| []) (Arrow (Arrow - (Qualid (Bare "a")) (Arrow (Qualid (Bare "c")) (Qualid (Bare "c")))) (Arrow (Arrow - (Qualid (Bare "b")) (Arrow (Qualid (Bare "c")) (Qualid (Bare "c")))) (Arrow (Qualid - (Bare "c")) (Arrow (App (App (Qualid (Bare "p")) (PosArg (Qualid (Bare "a")) :| - [])) (PosArg (Qualid (Bare "b")) :| [])) (Qualid (Bare "c")))))))))] diff --git a/base/Data/Bifoldable.v b/base/Data/Bifoldable.v index e5fd5161d..5bffe8eec 100644 --- a/base/Data/Bifoldable.v +++ b/base/Data/Bifoldable.v @@ -38,28 +38,28 @@ Record Bifoldable__Dict (p : Type -> Type -> Type) := Bifoldable__Dict_Build { forall {c : Type}, forall {b : Type}, (a -> c -> c) -> (b -> c -> c) -> c -> p a b -> c }. -Definition Bifoldable (p : Type -> Type -> Type) := +#[global] Definition Bifoldable (p : Type -> Type -> Type) := forall r__, (Bifoldable__Dict p -> r__) -> r__. Existing Class Bifoldable. -Definition bifold `{g__0__ : Bifoldable p} +#[global] Definition bifold `{g__0__ : Bifoldable p} : forall {m : Type}, forall `{GHC.Base.Monoid m}, p m m -> m := g__0__ _ (bifold__ p). -Definition bifoldMap `{g__0__ : Bifoldable p} +#[global] Definition bifoldMap `{g__0__ : Bifoldable p} : forall {m : Type}, forall {a : Type}, forall {b : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> (b -> m) -> p a b -> m := g__0__ _ (bifoldMap__ p). -Definition bifoldl `{g__0__ : Bifoldable p} +#[global] Definition bifoldl `{g__0__ : Bifoldable p} : forall {c : Type}, forall {a : Type}, forall {b : Type}, (c -> a -> c) -> (c -> b -> c) -> c -> p a b -> c := g__0__ _ (bifoldl__ p). -Definition bifoldr `{g__0__ : Bifoldable p} +#[global] Definition bifoldr `{g__0__ : Bifoldable p} : forall {a : Type}, forall {c : Type}, forall {b : Type}, (a -> c -> c) -> (b -> c -> c) -> c -> p a b -> c := @@ -67,7 +67,7 @@ Definition bifoldr `{g__0__ : Bifoldable p} (* Converted value declarations: *) -Local Definition Bifoldable__pair_type_bifoldMap +#[local] Definition Bifoldable__pair_type_bifoldMap : forall {m : Type}, forall {a : Type}, forall {b : Type}, @@ -79,13 +79,13 @@ Local Definition Bifoldable__pair_type_bifoldMap | f, g, pair a b => GHC.Base.mappend (f a) (g b) end. -Local Definition Bifoldable__pair_type_bifold +#[local] Definition Bifoldable__pair_type_bifold : forall {m : Type}, forall `{GHC.Base.Monoid m}, GHC.Tuple.pair_type m m -> m := fun {m : Type} `{GHC.Base.Monoid m} => Bifoldable__pair_type_bifoldMap GHC.Base.id GHC.Base.id. -Local Definition Bifoldable__pair_type_bifoldl +#[local] Definition Bifoldable__pair_type_bifoldl : forall {c : Type}, forall {a : Type}, forall {b : Type}, @@ -99,7 +99,7 @@ Local Definition Bifoldable__pair_type_bifoldl (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ GHC.Base.flip g)) t)) z. -Local Definition Bifoldable__pair_type_bifoldr +#[local] Definition Bifoldable__pair_type_bifoldr : forall {a : Type}, forall {c : Type}, forall {b : Type}, @@ -110,6 +110,7 @@ Local Definition Bifoldable__pair_type_bifoldr (Coq.Program.Basics.compose Data.SemigroupInternal.Mk_Endo f) (Coq.Program.Basics.compose Data.SemigroupInternal.Mk_Endo g) t) z. +#[global] Program Instance Bifoldable__pair_type : Bifoldable GHC.Tuple.pair_type := fun _ k__ => k__ {| bifold__ := fun {m : Type} `{GHC.Base.Monoid m} => @@ -121,7 +122,7 @@ Program Instance Bifoldable__pair_type : Bifoldable GHC.Tuple.pair_type := bifoldr__ := fun {a : Type} {c : Type} {b : Type} => Bifoldable__pair_type_bifoldr |}. -Local Definition Bifoldable__Const_bifoldMap +#[local] Definition Bifoldable__Const_bifoldMap : forall {m : Type}, forall {a : Type}, forall {b : Type}, @@ -133,13 +134,13 @@ Local Definition Bifoldable__Const_bifoldMap | f, _, Data.Functor.Const.Mk_Const a => f a end. -Local Definition Bifoldable__Const_bifold +#[local] Definition Bifoldable__Const_bifold : forall {m : Type}, forall `{GHC.Base.Monoid m}, Data.Functor.Const.Const m m -> m := fun {m : Type} `{GHC.Base.Monoid m} => Bifoldable__Const_bifoldMap GHC.Base.id GHC.Base.id. -Local Definition Bifoldable__Const_bifoldl +#[local] Definition Bifoldable__Const_bifoldl : forall {c : Type}, forall {a : Type}, forall {b : Type}, @@ -155,7 +156,7 @@ Local Definition Bifoldable__Const_bifoldl GHC.Base.∘ GHC.Base.flip g)) t)) z. -Local Definition Bifoldable__Const_bifoldr +#[local] Definition Bifoldable__Const_bifoldr : forall {a : Type}, forall {c : Type}, forall {b : Type}, @@ -166,6 +167,7 @@ Local Definition Bifoldable__Const_bifoldr (Coq.Program.Basics.compose Data.SemigroupInternal.Mk_Endo f) (Coq.Program.Basics.compose Data.SemigroupInternal.Mk_Endo g) t) z. +#[global] Program Instance Bifoldable__Const : Bifoldable Data.Functor.Const.Const := fun _ k__ => k__ {| bifold__ := fun {m : Type} `{GHC.Base.Monoid m} => @@ -179,7 +181,7 @@ Program Instance Bifoldable__Const : Bifoldable Data.Functor.Const.Const := (* Skipping instance `Data.Bifoldable.Bifoldable__K1' of class `Data.Bifoldable.Bifoldable' *) -Local Definition Bifoldable__triple_type_bifoldMap {inst_x : Type} +#[local] Definition Bifoldable__triple_type_bifoldMap {inst_x : Type} : forall {m : Type}, forall {a : Type}, forall {b : Type}, @@ -191,13 +193,13 @@ Local Definition Bifoldable__triple_type_bifoldMap {inst_x : Type} | f, g, pair (pair _ a) b => GHC.Base.mappend (f a) (g b) end. -Local Definition Bifoldable__triple_type_bifold {inst_x : Type} +#[local] Definition Bifoldable__triple_type_bifold {inst_x : Type} : forall {m : Type}, forall `{GHC.Base.Monoid m}, GHC.Tuple.triple_type inst_x m m -> m := fun {m : Type} `{GHC.Base.Monoid m} => Bifoldable__triple_type_bifoldMap GHC.Base.id GHC.Base.id. -Local Definition Bifoldable__triple_type_bifoldl {inst_x : Type} +#[local] Definition Bifoldable__triple_type_bifoldl {inst_x : Type} : forall {c : Type}, forall {a : Type}, forall {b : Type}, @@ -211,7 +213,7 @@ Local Definition Bifoldable__triple_type_bifoldl {inst_x : Type} (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ GHC.Base.flip g)) t)) z. -Local Definition Bifoldable__triple_type_bifoldr {inst_x : Type} +#[local] Definition Bifoldable__triple_type_bifoldr {inst_x : Type} : forall {a : Type}, forall {c : Type}, forall {b : Type}, @@ -222,6 +224,7 @@ Local Definition Bifoldable__triple_type_bifoldr {inst_x : Type} (Coq.Program.Basics.compose Data.SemigroupInternal.Mk_Endo f) (Coq.Program.Basics.compose Data.SemigroupInternal.Mk_Endo g) t) z. +#[global] Program Instance Bifoldable__triple_type {x : Type} : Bifoldable (GHC.Tuple.triple_type x) := fun _ k__ => @@ -234,7 +237,8 @@ Program Instance Bifoldable__triple_type {x : Type} bifoldr__ := fun {a : Type} {c : Type} {b : Type} => Bifoldable__triple_type_bifoldr |}. -Local Definition Bifoldable__quad_type_bifoldMap {inst_x : Type} {inst_y : Type} +#[local] Definition Bifoldable__quad_type_bifoldMap {inst_x : Type} {inst_y + : Type} : forall {m : Type}, forall {a : Type}, forall {b : Type}, @@ -246,13 +250,14 @@ Local Definition Bifoldable__quad_type_bifoldMap {inst_x : Type} {inst_y : Type} | f, g, pair (pair (pair _ _) a) b => GHC.Base.mappend (f a) (g b) end. -Local Definition Bifoldable__quad_type_bifold {inst_x : Type} {inst_y : Type} +#[local] Definition Bifoldable__quad_type_bifold {inst_x : Type} {inst_y : Type} : forall {m : Type}, forall `{GHC.Base.Monoid m}, GHC.Tuple.quad_type inst_x inst_y m m -> m := fun {m : Type} `{GHC.Base.Monoid m} => Bifoldable__quad_type_bifoldMap GHC.Base.id GHC.Base.id. -Local Definition Bifoldable__quad_type_bifoldl {inst_x : Type} {inst_y : Type} +#[local] Definition Bifoldable__quad_type_bifoldl {inst_x : Type} {inst_y + : Type} : forall {c : Type}, forall {a : Type}, forall {b : Type}, @@ -267,7 +272,8 @@ Local Definition Bifoldable__quad_type_bifoldl {inst_x : Type} {inst_y : Type} (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ GHC.Base.flip g)) t)) z. -Local Definition Bifoldable__quad_type_bifoldr {inst_x : Type} {inst_y : Type} +#[local] Definition Bifoldable__quad_type_bifoldr {inst_x : Type} {inst_y + : Type} : forall {a : Type}, forall {c : Type}, forall {b : Type}, @@ -279,6 +285,7 @@ Local Definition Bifoldable__quad_type_bifoldr {inst_x : Type} {inst_y : Type} (Coq.Program.Basics.compose Data.SemigroupInternal.Mk_Endo f) (Coq.Program.Basics.compose Data.SemigroupInternal.Mk_Endo g) t) z. +#[global] Program Instance Bifoldable__quad_type {x : Type} {y : Type} : Bifoldable (GHC.Tuple.quad_type x y) := fun _ k__ => @@ -291,7 +298,7 @@ Program Instance Bifoldable__quad_type {x : Type} {y : Type} bifoldr__ := fun {a : Type} {c : Type} {b : Type} => Bifoldable__quad_type_bifoldr |}. -Local Definition Bifoldable__quint_type_bifoldMap {inst_x : Type} {inst_y +#[local] Definition Bifoldable__quint_type_bifoldMap {inst_x : Type} {inst_y : Type} {inst_z : Type} : forall {m : Type}, forall {a : Type}, @@ -304,16 +311,16 @@ Local Definition Bifoldable__quint_type_bifoldMap {inst_x : Type} {inst_y | f, g, pair (pair (pair (pair _ _) _) a) b => GHC.Base.mappend (f a) (g b) end. -Local Definition Bifoldable__quint_type_bifold {inst_x : Type} {inst_y : Type} - {inst_z : Type} +#[local] Definition Bifoldable__quint_type_bifold {inst_x : Type} {inst_y + : Type} {inst_z : Type} : forall {m : Type}, forall `{GHC.Base.Monoid m}, GHC.Tuple.quint_type inst_x inst_y inst_z m m -> m := fun {m : Type} `{GHC.Base.Monoid m} => Bifoldable__quint_type_bifoldMap GHC.Base.id GHC.Base.id. -Local Definition Bifoldable__quint_type_bifoldl {inst_x : Type} {inst_y : Type} - {inst_z : Type} +#[local] Definition Bifoldable__quint_type_bifoldl {inst_x : Type} {inst_y + : Type} {inst_z : Type} : forall {c : Type}, forall {a : Type}, forall {b : Type}, @@ -328,8 +335,8 @@ Local Definition Bifoldable__quint_type_bifoldl {inst_x : Type} {inst_y : Type} (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ GHC.Base.flip g)) t)) z. -Local Definition Bifoldable__quint_type_bifoldr {inst_x : Type} {inst_y : Type} - {inst_z : Type} +#[local] Definition Bifoldable__quint_type_bifoldr {inst_x : Type} {inst_y + : Type} {inst_z : Type} : forall {a : Type}, forall {c : Type}, forall {b : Type}, @@ -341,6 +348,7 @@ Local Definition Bifoldable__quint_type_bifoldr {inst_x : Type} {inst_y : Type} (Coq.Program.Basics.compose Data.SemigroupInternal.Mk_Endo f) (Coq.Program.Basics.compose Data.SemigroupInternal.Mk_Endo g) t) z. +#[global] Program Instance Bifoldable__quint_type {x : Type} {y : Type} {z : Type} : Bifoldable (GHC.Tuple.quint_type x y z) := fun _ k__ => @@ -353,8 +361,8 @@ Program Instance Bifoldable__quint_type {x : Type} {y : Type} {z : Type} bifoldr__ := fun {a : Type} {c : Type} {b : Type} => Bifoldable__quint_type_bifoldr |}. -Local Definition Bifoldable__sext_type_bifoldMap {inst_x : Type} {inst_y : Type} - {inst_z : Type} {inst_w : Type} +#[local] Definition Bifoldable__sext_type_bifoldMap {inst_x : Type} {inst_y + : Type} {inst_z : Type} {inst_w : Type} : forall {m : Type}, forall {a : Type}, forall {b : Type}, @@ -368,7 +376,7 @@ Local Definition Bifoldable__sext_type_bifoldMap {inst_x : Type} {inst_y : Type} GHC.Base.mappend (f a) (g b) end. -Local Definition Bifoldable__sext_type_bifold {inst_x : Type} {inst_y : Type} +#[local] Definition Bifoldable__sext_type_bifold {inst_x : Type} {inst_y : Type} {inst_z : Type} {inst_w : Type} : forall {m : Type}, forall `{GHC.Base.Monoid m}, @@ -376,8 +384,8 @@ Local Definition Bifoldable__sext_type_bifold {inst_x : Type} {inst_y : Type} fun {m : Type} `{GHC.Base.Monoid m} => Bifoldable__sext_type_bifoldMap GHC.Base.id GHC.Base.id. -Local Definition Bifoldable__sext_type_bifoldl {inst_x : Type} {inst_y : Type} - {inst_z : Type} {inst_w : Type} +#[local] Definition Bifoldable__sext_type_bifoldl {inst_x : Type} {inst_y + : Type} {inst_z : Type} {inst_w : Type} : forall {c : Type}, forall {a : Type}, forall {b : Type}, @@ -393,8 +401,8 @@ Local Definition Bifoldable__sext_type_bifoldl {inst_x : Type} {inst_y : Type} (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ GHC.Base.flip g)) t)) z. -Local Definition Bifoldable__sext_type_bifoldr {inst_x : Type} {inst_y : Type} - {inst_z : Type} {inst_w : Type} +#[local] Definition Bifoldable__sext_type_bifoldr {inst_x : Type} {inst_y + : Type} {inst_z : Type} {inst_w : Type} : forall {a : Type}, forall {c : Type}, forall {b : Type}, @@ -407,6 +415,7 @@ Local Definition Bifoldable__sext_type_bifoldr {inst_x : Type} {inst_y : Type} (Coq.Program.Basics.compose Data.SemigroupInternal.Mk_Endo f) (Coq.Program.Basics.compose Data.SemigroupInternal.Mk_Endo g) t) z. +#[global] Program Instance Bifoldable__sext_type {x : Type} {y : Type} {z : Type} {w : Type} : Bifoldable (GHC.Tuple.sext_type x y z w) := @@ -420,8 +429,8 @@ Program Instance Bifoldable__sext_type {x : Type} {y : Type} {z : Type} {w bifoldr__ := fun {a : Type} {c : Type} {b : Type} => Bifoldable__sext_type_bifoldr |}. -Local Definition Bifoldable__sept_type_bifoldMap {inst_x : Type} {inst_y : Type} - {inst_z : Type} {inst_w : Type} {inst_v : Type} +#[local] Definition Bifoldable__sept_type_bifoldMap {inst_x : Type} {inst_y + : Type} {inst_z : Type} {inst_w : Type} {inst_v : Type} : forall {m : Type}, forall {a : Type}, forall {b : Type}, @@ -435,7 +444,7 @@ Local Definition Bifoldable__sept_type_bifoldMap {inst_x : Type} {inst_y : Type} GHC.Base.mappend (f a) (g b) end. -Local Definition Bifoldable__sept_type_bifold {inst_x : Type} {inst_y : Type} +#[local] Definition Bifoldable__sept_type_bifold {inst_x : Type} {inst_y : Type} {inst_z : Type} {inst_w : Type} {inst_v : Type} : forall {m : Type}, forall `{GHC.Base.Monoid m}, @@ -443,8 +452,8 @@ Local Definition Bifoldable__sept_type_bifold {inst_x : Type} {inst_y : Type} fun {m : Type} `{GHC.Base.Monoid m} => Bifoldable__sept_type_bifoldMap GHC.Base.id GHC.Base.id. -Local Definition Bifoldable__sept_type_bifoldl {inst_x : Type} {inst_y : Type} - {inst_z : Type} {inst_w : Type} {inst_v : Type} +#[local] Definition Bifoldable__sept_type_bifoldl {inst_x : Type} {inst_y + : Type} {inst_z : Type} {inst_w : Type} {inst_v : Type} : forall {c : Type}, forall {a : Type}, forall {b : Type}, @@ -460,8 +469,8 @@ Local Definition Bifoldable__sept_type_bifoldl {inst_x : Type} {inst_y : Type} (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ GHC.Base.flip g)) t)) z. -Local Definition Bifoldable__sept_type_bifoldr {inst_x : Type} {inst_y : Type} - {inst_z : Type} {inst_w : Type} {inst_v : Type} +#[local] Definition Bifoldable__sept_type_bifoldr {inst_x : Type} {inst_y + : Type} {inst_z : Type} {inst_w : Type} {inst_v : Type} : forall {a : Type}, forall {c : Type}, forall {b : Type}, @@ -474,6 +483,7 @@ Local Definition Bifoldable__sept_type_bifoldr {inst_x : Type} {inst_y : Type} (Coq.Program.Basics.compose Data.SemigroupInternal.Mk_Endo f) (Coq.Program.Basics.compose Data.SemigroupInternal.Mk_Endo g) t) z. +#[global] Program Instance Bifoldable__sept_type {x : Type} {y : Type} {z : Type} {w : Type} {v : Type} : Bifoldable (GHC.Tuple.sept_type x y z w v) := @@ -487,7 +497,7 @@ Program Instance Bifoldable__sept_type {x : Type} {y : Type} {z : Type} {w bifoldr__ := fun {a : Type} {c : Type} {b : Type} => Bifoldable__sept_type_bifoldr |}. -Local Definition Bifoldable__Either_bifoldMap +#[local] Definition Bifoldable__Either_bifoldMap : forall {m : Type}, forall {a : Type}, forall {b : Type}, @@ -500,13 +510,13 @@ Local Definition Bifoldable__Either_bifoldMap | _, g, Data.Either.Right b => g b end. -Local Definition Bifoldable__Either_bifold +#[local] Definition Bifoldable__Either_bifold : forall {m : Type}, forall `{GHC.Base.Monoid m}, Data.Either.Either m m -> m := fun {m : Type} `{GHC.Base.Monoid m} => Bifoldable__Either_bifoldMap GHC.Base.id GHC.Base.id. -Local Definition Bifoldable__Either_bifoldl +#[local] Definition Bifoldable__Either_bifoldl : forall {c : Type}, forall {a : Type}, forall {b : Type}, @@ -522,7 +532,7 @@ Local Definition Bifoldable__Either_bifoldl GHC.Base.∘ GHC.Base.flip g)) t)) z. -Local Definition Bifoldable__Either_bifoldr +#[local] Definition Bifoldable__Either_bifoldr : forall {a : Type}, forall {c : Type}, forall {b : Type}, @@ -533,6 +543,7 @@ Local Definition Bifoldable__Either_bifoldr (Coq.Program.Basics.compose Data.SemigroupInternal.Mk_Endo f) (Coq.Program.Basics.compose Data.SemigroupInternal.Mk_Endo g) t) z. +#[global] Program Instance Bifoldable__Either : Bifoldable Data.Either.Either := fun _ k__ => k__ {| bifold__ := fun {m : Type} `{GHC.Base.Monoid m} => @@ -544,8 +555,8 @@ Program Instance Bifoldable__Either : Bifoldable Data.Either.Either := bifoldr__ := fun {a : Type} {c : Type} {b : Type} => Bifoldable__Either_bifoldr |}. -Definition bifoldr' {t : Type -> Type -> Type} {a : Type} {c : Type} {b : Type} - `{Bifoldable t} +#[global] Definition bifoldr' {t : Type -> Type -> Type} {a : Type} {c : Type} + {b : Type} `{Bifoldable t} : (a -> c -> c) -> (b -> c -> c) -> c -> t a b -> c := fun f g z0 xs => let g' := fun k x z => k (g x z) in @@ -553,16 +564,16 @@ Definition bifoldr' {t : Type -> Type -> Type} {a : Type} {c : Type} {b : Type} (* Skipping definition `Data.Bifoldable.bifoldr1' *) -Definition bifoldrM {t : Type -> Type -> Type} {m : Type -> Type} {a : Type} {c - : Type} {b : Type} `{Bifoldable t} `{GHC.Base.Monad m} +#[global] Definition bifoldrM {t : Type -> Type -> Type} {m : Type -> Type} {a + : Type} {c : Type} {b : Type} `{Bifoldable t} `{GHC.Base.Monad m} : (a -> c -> m c) -> (b -> c -> m c) -> c -> t a b -> m c := fun f g z0 xs => let g' := fun k x z => g x z GHC.Base.>>= k in let f' := fun k x z => f x z GHC.Base.>>= k in bifoldl f' g' GHC.Base.return_ xs z0. -Definition bifoldl' {t : Type -> Type -> Type} {a : Type} {b : Type} {c : Type} - `{Bifoldable t} +#[global] Definition bifoldl' {t : Type -> Type -> Type} {a : Type} {b : Type} + {c : Type} `{Bifoldable t} : (a -> b -> a) -> (a -> c -> a) -> a -> t b c -> a := fun f g z0 xs => let g' := fun x k z => k (g z x) in @@ -570,43 +581,47 @@ Definition bifoldl' {t : Type -> Type -> Type} {a : Type} {b : Type} {c : Type} (* Skipping definition `Data.Bifoldable.bifoldl1' *) -Definition bifoldlM {t : Type -> Type -> Type} {m : Type -> Type} {a : Type} {b - : Type} {c : Type} `{Bifoldable t} `{GHC.Base.Monad m} +#[global] Definition bifoldlM {t : Type -> Type -> Type} {m : Type -> Type} {a + : Type} {b : Type} {c : Type} `{Bifoldable t} `{GHC.Base.Monad m} : (a -> b -> m a) -> (a -> c -> m a) -> a -> t b c -> m a := fun f g z0 xs => let g' := fun x k z => g z x GHC.Base.>>= k in let f' := fun x k z => f z x GHC.Base.>>= k in bifoldr f' g' GHC.Base.return_ xs z0. -Definition bitraverse_ {t : Type -> Type -> Type} {f : Type -> Type} {a : Type} - {c : Type} {b : Type} {d : Type} `{Bifoldable t} `{GHC.Base.Applicative f} +#[global] Definition bitraverse_ {t : Type -> Type -> Type} {f : Type -> Type} + {a : Type} {c : Type} {b : Type} {d : Type} `{Bifoldable t} + `{GHC.Base.Applicative f} : (a -> f c) -> (b -> f d) -> t a b -> f unit := fun f g => bifoldr (_GHC.Base.*>_ GHC.Base.∘ f) (_GHC.Base.*>_ GHC.Base.∘ g) (GHC.Base.pure tt). -Definition bifor_ {t : Type -> Type -> Type} {f : Type -> Type} {a : Type} {b - : Type} {c : Type} {d : Type} `{Bifoldable t} `{GHC.Base.Applicative f} +#[global] Definition bifor_ {t : Type -> Type -> Type} {f : Type -> Type} {a + : Type} {b : Type} {c : Type} {d : Type} `{Bifoldable t} `{GHC.Base.Applicative + f} : t a b -> (a -> f c) -> (b -> f d) -> f unit := fun t f g => bitraverse_ f g t. -Definition bimapM_ {t : Type -> Type -> Type} {f : Type -> Type} {a : Type} {c - : Type} {b : Type} {d : Type} `{Bifoldable t} `{GHC.Base.Applicative f} +#[global] Definition bimapM_ {t : Type -> Type -> Type} {f : Type -> Type} {a + : Type} {c : Type} {b : Type} {d : Type} `{Bifoldable t} `{GHC.Base.Applicative + f} : (a -> f c) -> (b -> f d) -> t a b -> f unit := bitraverse_. -Definition biforM_ {t : Type -> Type -> Type} {f : Type -> Type} {a : Type} {b - : Type} {c : Type} {d : Type} `{Bifoldable t} `{GHC.Base.Applicative f} +#[global] Definition biforM_ {t : Type -> Type -> Type} {f : Type -> Type} {a + : Type} {b : Type} {c : Type} {d : Type} `{Bifoldable t} `{GHC.Base.Applicative + f} : t a b -> (a -> f c) -> (b -> f d) -> f unit := bifor_. -Definition bisequence_ {t : Type -> Type -> Type} {f : Type -> Type} {a : Type} - {b : Type} `{Bifoldable t} `{GHC.Base.Applicative f} +#[global] Definition bisequence_ {t : Type -> Type -> Type} {f : Type -> Type} + {a : Type} {b : Type} `{Bifoldable t} `{GHC.Base.Applicative f} : t (f a) (f b) -> f unit := bifoldr _GHC.Base.*>_ _GHC.Base.*>_ (GHC.Base.pure tt). -Definition bisequenceA_ {t : Type -> Type -> Type} {f : Type -> Type} {a : Type} - {b : Type} `{Bifoldable t} `{GHC.Base.Applicative f} +#[global] Definition bisequenceA_ {t : Type -> Type -> Type} {f : Type -> Type} + {a : Type} {b : Type} `{Bifoldable t} `{GHC.Base.Applicative f} : t (f a) (f b) -> f unit := bisequence_. @@ -614,16 +629,17 @@ Definition bisequenceA_ {t : Type -> Type -> Type} {f : Type -> Type} {a : Type} (* Skipping definition `Data.Bifoldable.bimsum' *) -Definition biList {t : Type -> Type -> Type} {a : Type} `{Bifoldable t} +#[global] Definition biList {t : Type -> Type -> Type} {a : Type} `{Bifoldable + t} : t a a -> list a := bifoldr cons cons nil. -Definition binull {t : Type -> Type -> Type} {a : Type} {b : Type} `{Bifoldable - t} +#[global] Definition binull {t : Type -> Type -> Type} {a : Type} {b : Type} + `{Bifoldable t} : t a b -> bool := bifoldr (fun arg_0__ arg_1__ => false) (fun arg_2__ arg_3__ => false) true. -Definition bilength {t : Type -> Type -> Type} {a : Type} {b : Type} +#[global] Definition bilength {t : Type -> Type -> Type} {a : Type} {b : Type} `{Bifoldable t} : t a b -> GHC.Num.Int := bifoldl' (fun arg_0__ arg_1__ => @@ -634,8 +650,8 @@ Definition bilength {t : Type -> Type -> Type} {a : Type} {b : Type} | c, _ => c GHC.Num.+ #1 end) #0. -Definition biany {t : Type -> Type -> Type} {a : Type} {b : Type} `{Bifoldable - t} +#[global] Definition biany {t : Type -> Type -> Type} {a : Type} {b : Type} + `{Bifoldable t} : (a -> bool) -> (b -> bool) -> t a b -> bool := fun p q => Coq.Program.Basics.compose Data.SemigroupInternal.getAny (bifoldMap @@ -643,14 +659,15 @@ Definition biany {t : Type -> Type -> Type} {a : Type} {b : Type} `{Bifoldable GHC.Base.∘ q)). -Definition bielem {t : Type -> Type -> Type} {a : Type} `{Bifoldable t} - `{GHC.Base.Eq_ a} +#[global] Definition bielem {t : Type -> Type -> Type} {a : Type} `{Bifoldable + t} `{GHC.Base.Eq_ a} : a -> t a a -> bool := fun x => biany (fun arg_0__ => arg_0__ GHC.Base.== x) (fun arg_1__ => arg_1__ GHC.Base.== x). -Definition biconcat {t : Type -> Type -> Type} {a : Type} `{Bifoldable t} +#[global] Definition biconcat {t : Type -> Type -> Type} {a : Type} `{Bifoldable + t} : t (list a) (list a) -> list a := bifold. @@ -658,35 +675,35 @@ Definition biconcat {t : Type -> Type -> Type} {a : Type} `{Bifoldable t} (* Skipping definition `Data.Bifoldable.biminimum' *) -Definition bisum {t : Type -> Type -> Type} {a : Type} `{Bifoldable t} +#[global] Definition bisum {t : Type -> Type -> Type} {a : Type} `{Bifoldable t} `{GHC.Num.Num a} : t a a -> a := Coq.Program.Basics.compose Data.SemigroupInternal.getSum (bifoldMap Data.SemigroupInternal.Mk_Sum Data.SemigroupInternal.Mk_Sum). -Definition biproduct {t : Type -> Type -> Type} {a : Type} `{Bifoldable t} - `{GHC.Num.Num a} +#[global] Definition biproduct {t : Type -> Type -> Type} {a : Type} + `{Bifoldable t} `{GHC.Num.Num a} : t a a -> a := Coq.Program.Basics.compose Data.SemigroupInternal.getProduct (bifoldMap Data.SemigroupInternal.Mk_Product Data.SemigroupInternal.Mk_Product). -Definition biconcatMap {t : Type -> Type -> Type} {a : Type} {c : Type} {b - : Type} `{Bifoldable t} +#[global] Definition biconcatMap {t : Type -> Type -> Type} {a : Type} {c + : Type} {b : Type} `{Bifoldable t} : (a -> list c) -> (b -> list c) -> t a b -> list c := bifoldMap. -Definition biand {t : Type -> Type -> Type} `{Bifoldable t} +#[global] Definition biand {t : Type -> Type -> Type} `{Bifoldable t} : t bool bool -> bool := Coq.Program.Basics.compose Data.SemigroupInternal.getAll (bifoldMap Data.SemigroupInternal.Mk_All Data.SemigroupInternal.Mk_All). -Definition bior {t : Type -> Type -> Type} `{Bifoldable t} +#[global] Definition bior {t : Type -> Type -> Type} `{Bifoldable t} : t bool bool -> bool := Coq.Program.Basics.compose Data.SemigroupInternal.getAny (bifoldMap Data.SemigroupInternal.Mk_Any Data.SemigroupInternal.Mk_Any). -Definition biall {t : Type -> Type -> Type} {a : Type} {b : Type} `{Bifoldable - t} +#[global] Definition biall {t : Type -> Type -> Type} {a : Type} {b : Type} + `{Bifoldable t} : (a -> bool) -> (b -> bool) -> t a b -> bool := fun p q => Coq.Program.Basics.compose Data.SemigroupInternal.getAll (bifoldMap @@ -698,12 +715,13 @@ Definition biall {t : Type -> Type -> Type} {a : Type} {b : Type} `{Bifoldable (* Skipping definition `Data.Bifoldable.biminimumBy' *) -Definition binotElem {t : Type -> Type -> Type} {a : Type} `{Bifoldable t} - `{GHC.Base.Eq_ a} +#[global] Definition binotElem {t : Type -> Type -> Type} {a : Type} + `{Bifoldable t} `{GHC.Base.Eq_ a} : a -> t a a -> bool := fun x => negb GHC.Base.∘ bielem x. -Definition bifind {t : Type -> Type -> Type} {a : Type} `{Bifoldable t} +#[global] Definition bifind {t : Type -> Type -> Type} {a : Type} `{Bifoldable + t} : (a -> bool) -> t a a -> option a := fun p => let finder := diff --git a/base/Data/Bifunctor.h2ci b/base/Data/Bifunctor.h2ci index 14928b768..4aae1cf3e 100644 --- a/base/Data/Bifunctor.h2ci +++ b/base/Data/Bifunctor.h2ci @@ -1,16 +1,3 @@ -superclassCount: - Data.Bifunctor.Bifunctor: '0' -defaultMethods: - Data.Bifunctor.Bifunctor: fromList [(Qualified "Data.Bifunctor" "bimap",Fun (ExplicitBinder - (Ident (Bare "f")) :| [ExplicitBinder (Ident (Bare "g"))]) (App (Qualid (Qualified - "GHC.Base" "op_z2218U__")) (PosArg (App (Qualid (Qualified "Data.Bifunctor" "first")) - (PosArg (Qualid (Bare "f")) :| [])) :| [PosArg (App (Qualid (Qualified "Data.Bifunctor" - "second")) (PosArg (Qualid (Bare "g")) :| []))]))),(Qualified "Data.Bifunctor" - "first",Fun (ExplicitBinder (Ident (Bare "f")) :| []) (App (App (Qualid (Qualified - "Data.Bifunctor" "bimap")) (PosArg (Qualid (Bare "f")) :| [])) (PosArg (Qualid - (Qualified "GHC.Base" "id")) :| []))),(Qualified "Data.Bifunctor" "second",App - (Qualid (Qualified "Data.Bifunctor" "bimap")) (PosArg (Qualid (Qualified "GHC.Base" - "id")) :| []))] classTypes: Data.Bifunctor.Bifunctor: fromList [] classDefns: @@ -41,3 +28,16 @@ classDefns: (App (App (Qualid (Bare "p")) (PosArg (Qualid (Bare "a")) :| [])) (PosArg (Qualid (Bare "b")) :| [])) (App (App (Qualid (Bare "p")) (PosArg (Qualid (Bare "a")) :| [])) (PosArg (Qualid (Bare "c")) :| [])))))))] +superclassCount: + Data.Bifunctor.Bifunctor: '0' +defaultMethods: + Data.Bifunctor.Bifunctor: fromList [(Qualified "Data.Bifunctor" "bimap",Fun (ExplicitBinder + (Ident (Bare "f")) :| [ExplicitBinder (Ident (Bare "g"))]) (App (Qualid (Qualified + "GHC.Base" "op_z2218U__")) (PosArg (App (Qualid (Qualified "Data.Bifunctor" "first")) + (PosArg (Qualid (Bare "f")) :| [])) :| [PosArg (App (Qualid (Qualified "Data.Bifunctor" + "second")) (PosArg (Qualid (Bare "g")) :| []))]))),(Qualified "Data.Bifunctor" + "first",Fun (ExplicitBinder (Ident (Bare "f")) :| []) (App (App (Qualid (Qualified + "Data.Bifunctor" "bimap")) (PosArg (Qualid (Bare "f")) :| [])) (PosArg (Qualid + (Qualified "GHC.Base" "id")) :| []))),(Qualified "Data.Bifunctor" "second",App + (Qualid (Qualified "Data.Bifunctor" "bimap")) (PosArg (Qualid (Qualified "GHC.Base" + "id")) :| []))] diff --git a/base/Data/Bifunctor.v b/base/Data/Bifunctor.v index d2788f503..129e23b3e 100644 --- a/base/Data/Bifunctor.v +++ b/base/Data/Bifunctor.v @@ -28,29 +28,29 @@ Record Bifunctor__Dict (p : Type -> Type -> Type) := Bifunctor__Dict_Build { second__ : forall {b : Type}, forall {c : Type}, forall {a : Type}, (b -> c) -> p a b -> p a c }. -Definition Bifunctor (p : Type -> Type -> Type) := +#[global] Definition Bifunctor (p : Type -> Type -> Type) := forall r__, (Bifunctor__Dict p -> r__) -> r__. Existing Class Bifunctor. -Definition bimap `{g__0__ : Bifunctor p} +#[global] Definition bimap `{g__0__ : Bifunctor p} : forall {a : Type}, forall {b : Type}, forall {c : Type}, forall {d : Type}, (a -> b) -> (c -> d) -> p a c -> p b d := g__0__ _ (bimap__ p). -Definition first `{g__0__ : Bifunctor p} +#[global] Definition first `{g__0__ : Bifunctor p} : forall {a : Type}, forall {b : Type}, forall {c : Type}, (a -> b) -> p a c -> p b c := g__0__ _ (first__ p). -Definition second `{g__0__ : Bifunctor p} +#[global] Definition second `{g__0__ : Bifunctor p} : forall {b : Type}, forall {c : Type}, forall {a : Type}, (b -> c) -> p a b -> p a c := g__0__ _ (second__ p). (* Converted value declarations: *) -Local Definition Bifunctor__pair_type_bimap +#[local] Definition Bifunctor__pair_type_bimap : forall {a : Type}, forall {b : Type}, forall {c : Type}, @@ -62,7 +62,7 @@ Local Definition Bifunctor__pair_type_bimap | f, g, pair a b => pair (f a) (g b) end. -Local Definition Bifunctor__pair_type_first +#[local] Definition Bifunctor__pair_type_first : forall {a : Type}, forall {b : Type}, forall {c : Type}, @@ -70,13 +70,14 @@ Local Definition Bifunctor__pair_type_first fun {a : Type} {b : Type} {c : Type} => fun f => Bifunctor__pair_type_bimap f GHC.Base.id. -Local Definition Bifunctor__pair_type_second +#[local] Definition Bifunctor__pair_type_second : forall {b : Type}, forall {c : Type}, forall {a : Type}, (b -> c) -> GHC.Tuple.pair_type a b -> GHC.Tuple.pair_type a c := fun {b : Type} {c : Type} {a : Type} => Bifunctor__pair_type_bimap GHC.Base.id. +#[global] Program Instance Bifunctor__pair_type : Bifunctor GHC.Tuple.pair_type := fun _ k__ => k__ {| bimap__ := fun {a : Type} {b : Type} {c : Type} {d : Type} => @@ -85,7 +86,7 @@ Program Instance Bifunctor__pair_type : Bifunctor GHC.Tuple.pair_type := second__ := fun {b : Type} {c : Type} {a : Type} => Bifunctor__pair_type_second |}. -Local Definition Bifunctor__triple_type_bimap {inst_x1 : Type} +#[local] Definition Bifunctor__triple_type_bimap {inst_x1 : Type} : forall {a : Type}, forall {b : Type}, forall {c : Type}, @@ -99,7 +100,7 @@ Local Definition Bifunctor__triple_type_bimap {inst_x1 : Type} | f, g, pair (pair x1 a) b => pair (pair x1 (f a)) (g b) end. -Local Definition Bifunctor__triple_type_first {inst_x1 : Type} +#[local] Definition Bifunctor__triple_type_first {inst_x1 : Type} : forall {a : Type}, forall {b : Type}, forall {c : Type}, @@ -108,7 +109,7 @@ Local Definition Bifunctor__triple_type_first {inst_x1 : Type} fun {a : Type} {b : Type} {c : Type} => fun f => Bifunctor__triple_type_bimap f GHC.Base.id. -Local Definition Bifunctor__triple_type_second {inst_x1 : Type} +#[local] Definition Bifunctor__triple_type_second {inst_x1 : Type} : forall {b : Type}, forall {c : Type}, forall {a : Type}, @@ -117,6 +118,7 @@ Local Definition Bifunctor__triple_type_second {inst_x1 : Type} fun {b : Type} {c : Type} {a : Type} => Bifunctor__triple_type_bimap GHC.Base.id. +#[global] Program Instance Bifunctor__triple_type {x1 : Type} : Bifunctor (GHC.Tuple.triple_type x1) := fun _ k__ => @@ -127,7 +129,7 @@ Program Instance Bifunctor__triple_type {x1 : Type} second__ := fun {b : Type} {c : Type} {a : Type} => Bifunctor__triple_type_second |}. -Local Definition Bifunctor__quad_type_bimap {inst_x1 : Type} {inst_x2 : Type} +#[local] Definition Bifunctor__quad_type_bimap {inst_x1 : Type} {inst_x2 : Type} : forall {a : Type}, forall {b : Type}, forall {c : Type}, @@ -142,7 +144,7 @@ Local Definition Bifunctor__quad_type_bimap {inst_x1 : Type} {inst_x2 : Type} | f, g, pair (pair (pair x1 x2) a) b => pair (pair (pair x1 x2) (f a)) (g b) end. -Local Definition Bifunctor__quad_type_first {inst_x1 : Type} {inst_x2 : Type} +#[local] Definition Bifunctor__quad_type_first {inst_x1 : Type} {inst_x2 : Type} : forall {a : Type}, forall {b : Type}, forall {c : Type}, @@ -152,7 +154,8 @@ Local Definition Bifunctor__quad_type_first {inst_x1 : Type} {inst_x2 : Type} fun {a : Type} {b : Type} {c : Type} => fun f => Bifunctor__quad_type_bimap f GHC.Base.id. -Local Definition Bifunctor__quad_type_second {inst_x1 : Type} {inst_x2 : Type} +#[local] Definition Bifunctor__quad_type_second {inst_x1 : Type} {inst_x2 + : Type} : forall {b : Type}, forall {c : Type}, forall {a : Type}, @@ -161,6 +164,7 @@ Local Definition Bifunctor__quad_type_second {inst_x1 : Type} {inst_x2 : Type} GHC.Tuple.quad_type inst_x1 inst_x2 a c := fun {b : Type} {c : Type} {a : Type} => Bifunctor__quad_type_bimap GHC.Base.id. +#[global] Program Instance Bifunctor__quad_type {x1 : Type} {x2 : Type} : Bifunctor (GHC.Tuple.quad_type x1 x2) := fun _ k__ => @@ -170,8 +174,8 @@ Program Instance Bifunctor__quad_type {x1 : Type} {x2 : Type} second__ := fun {b : Type} {c : Type} {a : Type} => Bifunctor__quad_type_second |}. -Local Definition Bifunctor__quint_type_bimap {inst_x1 : Type} {inst_x2 : Type} - {inst_x3 : Type} +#[local] Definition Bifunctor__quint_type_bimap {inst_x1 : Type} {inst_x2 + : Type} {inst_x3 : Type} : forall {a : Type}, forall {b : Type}, forall {c : Type}, @@ -187,8 +191,8 @@ Local Definition Bifunctor__quint_type_bimap {inst_x1 : Type} {inst_x2 : Type} pair (pair (pair (pair x1 x2) x3) (f a)) (g b) end. -Local Definition Bifunctor__quint_type_first {inst_x1 : Type} {inst_x2 : Type} - {inst_x3 : Type} +#[local] Definition Bifunctor__quint_type_first {inst_x1 : Type} {inst_x2 + : Type} {inst_x3 : Type} : forall {a : Type}, forall {b : Type}, forall {c : Type}, @@ -198,8 +202,8 @@ Local Definition Bifunctor__quint_type_first {inst_x1 : Type} {inst_x2 : Type} fun {a : Type} {b : Type} {c : Type} => fun f => Bifunctor__quint_type_bimap f GHC.Base.id. -Local Definition Bifunctor__quint_type_second {inst_x1 : Type} {inst_x2 : Type} - {inst_x3 : Type} +#[local] Definition Bifunctor__quint_type_second {inst_x1 : Type} {inst_x2 + : Type} {inst_x3 : Type} : forall {b : Type}, forall {c : Type}, forall {a : Type}, @@ -208,6 +212,7 @@ Local Definition Bifunctor__quint_type_second {inst_x1 : Type} {inst_x2 : Type} GHC.Tuple.quint_type inst_x1 inst_x2 inst_x3 a c := fun {b : Type} {c : Type} {a : Type} => Bifunctor__quint_type_bimap GHC.Base.id. +#[global] Program Instance Bifunctor__quint_type {x1 : Type} {x2 : Type} {x3 : Type} : Bifunctor (GHC.Tuple.quint_type x1 x2 x3) := fun _ k__ => @@ -217,7 +222,7 @@ Program Instance Bifunctor__quint_type {x1 : Type} {x2 : Type} {x3 : Type} second__ := fun {b : Type} {c : Type} {a : Type} => Bifunctor__quint_type_second |}. -Local Definition Bifunctor__sext_type_bimap {inst_x1 : Type} {inst_x2 : Type} +#[local] Definition Bifunctor__sext_type_bimap {inst_x1 : Type} {inst_x2 : Type} {inst_x3 : Type} {inst_x4 : Type} : forall {a : Type}, forall {b : Type}, @@ -234,7 +239,7 @@ Local Definition Bifunctor__sext_type_bimap {inst_x1 : Type} {inst_x2 : Type} pair (pair (pair (pair (pair x1 x2) x3) x4) (f a)) (g b) end. -Local Definition Bifunctor__sext_type_first {inst_x1 : Type} {inst_x2 : Type} +#[local] Definition Bifunctor__sext_type_first {inst_x1 : Type} {inst_x2 : Type} {inst_x3 : Type} {inst_x4 : Type} : forall {a : Type}, forall {b : Type}, @@ -245,8 +250,8 @@ Local Definition Bifunctor__sext_type_first {inst_x1 : Type} {inst_x2 : Type} fun {a : Type} {b : Type} {c : Type} => fun f => Bifunctor__sext_type_bimap f GHC.Base.id. -Local Definition Bifunctor__sext_type_second {inst_x1 : Type} {inst_x2 : Type} - {inst_x3 : Type} {inst_x4 : Type} +#[local] Definition Bifunctor__sext_type_second {inst_x1 : Type} {inst_x2 + : Type} {inst_x3 : Type} {inst_x4 : Type} : forall {b : Type}, forall {c : Type}, forall {a : Type}, @@ -255,6 +260,7 @@ Local Definition Bifunctor__sext_type_second {inst_x1 : Type} {inst_x2 : Type} GHC.Tuple.sext_type inst_x1 inst_x2 inst_x3 inst_x4 a c := fun {b : Type} {c : Type} {a : Type} => Bifunctor__sext_type_bimap GHC.Base.id. +#[global] Program Instance Bifunctor__sext_type {x1 : Type} {x2 : Type} {x3 : Type} {x4 : Type} : Bifunctor (GHC.Tuple.sext_type x1 x2 x3 x4) := @@ -265,7 +271,7 @@ Program Instance Bifunctor__sext_type {x1 : Type} {x2 : Type} {x3 : Type} {x4 second__ := fun {b : Type} {c : Type} {a : Type} => Bifunctor__sext_type_second |}. -Local Definition Bifunctor__sept_type_bimap {inst_x1 : Type} {inst_x2 : Type} +#[local] Definition Bifunctor__sept_type_bimap {inst_x1 : Type} {inst_x2 : Type} {inst_x3 : Type} {inst_x4 : Type} {inst_x5 : Type} : forall {a : Type}, forall {b : Type}, @@ -282,7 +288,7 @@ Local Definition Bifunctor__sept_type_bimap {inst_x1 : Type} {inst_x2 : Type} pair (pair (pair (pair (pair (pair x1 x2) x3) x4) x5) (f a)) (g b) end. -Local Definition Bifunctor__sept_type_first {inst_x1 : Type} {inst_x2 : Type} +#[local] Definition Bifunctor__sept_type_first {inst_x1 : Type} {inst_x2 : Type} {inst_x3 : Type} {inst_x4 : Type} {inst_x5 : Type} : forall {a : Type}, forall {b : Type}, @@ -293,8 +299,8 @@ Local Definition Bifunctor__sept_type_first {inst_x1 : Type} {inst_x2 : Type} fun {a : Type} {b : Type} {c : Type} => fun f => Bifunctor__sept_type_bimap f GHC.Base.id. -Local Definition Bifunctor__sept_type_second {inst_x1 : Type} {inst_x2 : Type} - {inst_x3 : Type} {inst_x4 : Type} {inst_x5 : Type} +#[local] Definition Bifunctor__sept_type_second {inst_x1 : Type} {inst_x2 + : Type} {inst_x3 : Type} {inst_x4 : Type} {inst_x5 : Type} : forall {b : Type}, forall {c : Type}, forall {a : Type}, @@ -303,6 +309,7 @@ Local Definition Bifunctor__sept_type_second {inst_x1 : Type} {inst_x2 : Type} GHC.Tuple.sept_type inst_x1 inst_x2 inst_x3 inst_x4 inst_x5 a c := fun {b : Type} {c : Type} {a : Type} => Bifunctor__sept_type_bimap GHC.Base.id. +#[global] Program Instance Bifunctor__sept_type {x1 : Type} {x2 : Type} {x3 : Type} {x4 : Type} {x5 : Type} : Bifunctor (GHC.Tuple.sept_type x1 x2 x3 x4 x5) := @@ -313,7 +320,7 @@ Program Instance Bifunctor__sept_type {x1 : Type} {x2 : Type} {x3 : Type} {x4 second__ := fun {b : Type} {c : Type} {a : Type} => Bifunctor__sept_type_second |}. -Local Definition Bifunctor__Either_bimap +#[local] Definition Bifunctor__Either_bimap : forall {a : Type}, forall {b : Type}, forall {c : Type}, @@ -326,7 +333,7 @@ Local Definition Bifunctor__Either_bimap | _, g, Data.Either.Right b => Data.Either.Right (g b) end. -Local Definition Bifunctor__Either_first +#[local] Definition Bifunctor__Either_first : forall {a : Type}, forall {b : Type}, forall {c : Type}, @@ -334,13 +341,14 @@ Local Definition Bifunctor__Either_first fun {a : Type} {b : Type} {c : Type} => fun f => Bifunctor__Either_bimap f GHC.Base.id. -Local Definition Bifunctor__Either_second +#[local] Definition Bifunctor__Either_second : forall {b : Type}, forall {c : Type}, forall {a : Type}, (b -> c) -> Data.Either.Either a b -> Data.Either.Either a c := fun {b : Type} {c : Type} {a : Type} => Bifunctor__Either_bimap GHC.Base.id. +#[global] Program Instance Bifunctor__Either : Bifunctor Data.Either.Either := fun _ k__ => k__ {| bimap__ := fun {a : Type} {b : Type} {c : Type} {d : Type} => @@ -348,7 +356,7 @@ Program Instance Bifunctor__Either : Bifunctor Data.Either.Either := first__ := fun {a : Type} {b : Type} {c : Type} => Bifunctor__Either_first ; second__ := fun {b : Type} {c : Type} {a : Type} => Bifunctor__Either_second |}. -Local Definition Bifunctor__Const_bimap +#[local] Definition Bifunctor__Const_bimap : forall {a : Type}, forall {b : Type}, forall {c : Type}, @@ -361,7 +369,7 @@ Local Definition Bifunctor__Const_bimap | f, _, Data.Functor.Const.Mk_Const a => Data.Functor.Const.Mk_Const (f a) end. -Local Definition Bifunctor__Const_first +#[local] Definition Bifunctor__Const_first : forall {a : Type}, forall {b : Type}, forall {c : Type}, @@ -369,13 +377,14 @@ Local Definition Bifunctor__Const_first fun {a : Type} {b : Type} {c : Type} => fun f => Bifunctor__Const_bimap f GHC.Base.id. -Local Definition Bifunctor__Const_second +#[local] Definition Bifunctor__Const_second : forall {b : Type}, forall {c : Type}, forall {a : Type}, (b -> c) -> Data.Functor.Const.Const a b -> Data.Functor.Const.Const a c := fun {b : Type} {c : Type} {a : Type} => Bifunctor__Const_bimap GHC.Base.id. +#[global] Program Instance Bifunctor__Const : Bifunctor Data.Functor.Const.Const := fun _ k__ => k__ {| bimap__ := fun {a : Type} {b : Type} {c : Type} {d : Type} => diff --git a/base/Data/Bitraversable.h2ci b/base/Data/Bitraversable.h2ci index 2b700c4a9..6fea0603c 100644 --- a/base/Data/Bitraversable.h2ci +++ b/base/Data/Bitraversable.h2ci @@ -1,11 +1,3 @@ -superclassCount: - Data.Bitraversable.Bitraversable: '2' -defaultMethods: - Data.Bitraversable.Bitraversable: fromList [(Qualified "Data.Bitraversable" "bitraverse",Fun - (ExplicitBinder (Ident (Bare "f")) :| [ExplicitBinder (Ident (Bare "g"))]) (App - (Qualid (Qualified "GHC.Base" "op_z2218U__")) (PosArg (Qualid (Qualified "Data.Bitraversable" - "bisequenceA")) :| [PosArg (App (App (Qualid (Qualified "Data.Bifunctor" "bimap")) - (PosArg (Qualid (Bare "f")) :| [])) (PosArg (Qualid (Bare "g")) :| []))])))] classTypes: Data.Bitraversable.Bitraversable: fromList [] classDefns: @@ -29,3 +21,11 @@ classDefns: :| [])) (PosArg (Qualid (Bare "b")) :| [])) (App (Qualid (Bare "f")) (PosArg (App (App (Qualid (Bare "t")) (PosArg (Qualid (Bare "c")) :| [])) (PosArg (Qualid (Bare "d")) :| [])) :| [])))))))))))] +superclassCount: + Data.Bitraversable.Bitraversable: '2' +defaultMethods: + Data.Bitraversable.Bitraversable: fromList [(Qualified "Data.Bitraversable" "bitraverse",Fun + (ExplicitBinder (Ident (Bare "f")) :| [ExplicitBinder (Ident (Bare "g"))]) (App + (Qualid (Qualified "GHC.Base" "op_z2218U__")) (PosArg (Qualid (Qualified "Data.Bitraversable" + "bisequenceA")) :| [PosArg (App (App (Qualid (Qualified "Data.Bifunctor" "bimap")) + (PosArg (Qualid (Bare "f")) :| [])) (PosArg (Qualid (Bare "g")) :| []))])))] diff --git a/base/Data/Bitraversable.v b/base/Data/Bitraversable.v index 350e136e8..3d3bddf28 100644 --- a/base/Data/Bitraversable.v +++ b/base/Data/Bitraversable.v @@ -37,12 +37,12 @@ Record Bitraversable__Dict (t : Type -> Type -> Type) := forall `{GHC.Base.Applicative f}, (a -> f c) -> (b -> f d) -> t a b -> f (t c d) }. -Definition Bitraversable (t : Type -> Type -> Type) `{Data.Bifunctor.Bifunctor - t} `{Data.Bifoldable.Bifoldable t} := +#[global] Definition Bitraversable (t : Type -> Type -> Type) + `{Data.Bifunctor.Bifunctor t} `{Data.Bifoldable.Bifoldable t} := forall r__, (Bitraversable__Dict t -> r__) -> r__. Existing Class Bitraversable. -Definition bitraverse `{g__0__ : Bitraversable t} +#[global] Definition bitraverse `{g__0__ : Bitraversable t} : forall {f : Type -> Type}, forall {a : Type}, forall {c : Type}, @@ -54,7 +54,7 @@ Definition bitraverse `{g__0__ : Bitraversable t} (* Converted value declarations: *) -Local Definition Bitraversable__pair_type_bitraverse +#[local] Definition Bitraversable__pair_type_bitraverse : forall {f : Type -> Type}, forall {a : Type}, forall {c : Type}, @@ -74,6 +74,7 @@ Local Definition Bitraversable__pair_type_bitraverse | f, g, pair a b => GHC.Base.liftA2 GHC.Tuple.pair2 (f a) (g b) end. +#[global] Program Instance Bitraversable__pair_type : Bitraversable GHC.Tuple.pair_type := fun _ k__ => k__ {| bitraverse__ := fun {f : Type -> Type} @@ -84,7 +85,7 @@ Program Instance Bitraversable__pair_type : Bitraversable GHC.Tuple.pair_type := `{GHC.Base.Applicative f} => Bitraversable__pair_type_bitraverse |}. -Local Definition Bitraversable__triple_type_bitraverse {inst_x : Type} +#[local] Definition Bitraversable__triple_type_bitraverse {inst_x : Type} : forall {f : Type -> Type}, forall {a : Type}, forall {c : Type}, @@ -105,6 +106,7 @@ Local Definition Bitraversable__triple_type_bitraverse {inst_x : Type} | f, g, pair (pair x a) b => GHC.Base.liftA2 (GHC.Tuple.pair3 x) (f a) (g b) end. +#[global] Program Instance Bitraversable__triple_type {x : Type} : Bitraversable (GHC.Tuple.triple_type x) := fun _ k__ => @@ -116,7 +118,7 @@ Program Instance Bitraversable__triple_type {x : Type} `{GHC.Base.Applicative f} => Bitraversable__triple_type_bitraverse |}. -Local Definition Bitraversable__quad_type_bitraverse {inst_x : Type} {inst_y +#[local] Definition Bitraversable__quad_type_bitraverse {inst_x : Type} {inst_y : Type} : forall {f : Type -> Type}, forall {a : Type}, @@ -140,6 +142,7 @@ Local Definition Bitraversable__quad_type_bitraverse {inst_x : Type} {inst_y GHC.Base.liftA2 (GHC.Tuple.pair4 x y) (f a) (g b) end. +#[global] Program Instance Bitraversable__quad_type {x : Type} {y : Type} : Bitraversable (GHC.Tuple.quad_type x y) := fun _ k__ => @@ -151,7 +154,7 @@ Program Instance Bitraversable__quad_type {x : Type} {y : Type} `{GHC.Base.Applicative f} => Bitraversable__quad_type_bitraverse |}. -Local Definition Bitraversable__quint_type_bitraverse {inst_x : Type} {inst_y +#[local] Definition Bitraversable__quint_type_bitraverse {inst_x : Type} {inst_y : Type} {inst_z : Type} : forall {f : Type -> Type}, forall {a : Type}, @@ -175,6 +178,7 @@ Local Definition Bitraversable__quint_type_bitraverse {inst_x : Type} {inst_y GHC.Base.liftA2 (GHC.Tuple.pair5 x y z) (f a) (g b) end. +#[global] Program Instance Bitraversable__quint_type {x : Type} {y : Type} {z : Type} : Bitraversable (GHC.Tuple.quint_type x y z) := fun _ k__ => @@ -186,7 +190,7 @@ Program Instance Bitraversable__quint_type {x : Type} {y : Type} {z : Type} `{GHC.Base.Applicative f} => Bitraversable__quint_type_bitraverse |}. -Local Definition Bitraversable__sext_type_bitraverse {inst_x : Type} {inst_y +#[local] Definition Bitraversable__sext_type_bitraverse {inst_x : Type} {inst_y : Type} {inst_z : Type} {inst_w : Type} : forall {f : Type -> Type}, forall {a : Type}, @@ -210,6 +214,7 @@ Local Definition Bitraversable__sext_type_bitraverse {inst_x : Type} {inst_y GHC.Base.liftA2 (GHC.Tuple.pair6 x y z w) (f a) (g b) end. +#[global] Program Instance Bitraversable__sext_type {x : Type} {y : Type} {z : Type} {w : Type} : Bitraversable (GHC.Tuple.sext_type x y z w) := @@ -222,7 +227,7 @@ Program Instance Bitraversable__sext_type {x : Type} {y : Type} {z : Type} {w `{GHC.Base.Applicative f} => Bitraversable__sext_type_bitraverse |}. -Local Definition Bitraversable__sept_type_bitraverse {inst_x : Type} {inst_y +#[local] Definition Bitraversable__sept_type_bitraverse {inst_x : Type} {inst_y : Type} {inst_z : Type} {inst_w : Type} {inst_v : Type} : forall {f : Type -> Type}, forall {a : Type}, @@ -246,6 +251,7 @@ Local Definition Bitraversable__sept_type_bitraverse {inst_x : Type} {inst_y GHC.Base.liftA2 (GHC.Tuple.pair7 x y z w v) (f a) (g b) end. +#[global] Program Instance Bitraversable__sept_type {x : Type} {y : Type} {z : Type} {w : Type} {v : Type} : Bitraversable (GHC.Tuple.sept_type x y z w v) := @@ -258,7 +264,7 @@ Program Instance Bitraversable__sept_type {x : Type} {y : Type} {z : Type} {w `{GHC.Base.Applicative f} => Bitraversable__sept_type_bitraverse |}. -Local Definition Bitraversable__Either_bitraverse +#[local] Definition Bitraversable__Either_bitraverse : forall {f : Type -> Type}, forall {a : Type}, forall {c : Type}, @@ -279,6 +285,7 @@ Local Definition Bitraversable__Either_bitraverse | _, g, Data.Either.Right b => Data.Either.Right Data.Functor.<$> g b end. +#[global] Program Instance Bitraversable__Either : Bitraversable Data.Either.Either := fun _ k__ => k__ {| bitraverse__ := fun {f : Type -> Type} @@ -289,7 +296,7 @@ Program Instance Bitraversable__Either : Bitraversable Data.Either.Either := `{GHC.Base.Applicative f} => Bitraversable__Either_bitraverse |}. -Local Definition Bitraversable__Const_bitraverse +#[local] Definition Bitraversable__Const_bitraverse : forall {f : Type -> Type}, forall {a : Type}, forall {c : Type}, @@ -311,6 +318,7 @@ Local Definition Bitraversable__Const_bitraverse Data.Functor.Const.Mk_Const Data.Functor.<$> f a end. +#[global] Program Instance Bitraversable__Const : Bitraversable Data.Functor.Const.Const := fun _ k__ => @@ -325,33 +333,36 @@ Program Instance Bitraversable__Const (* Skipping instance `Data.Bitraversable.Bitraversable__K1' of class `Data.Bitraversable.Bitraversable' *) -Definition bisequence {t : Type -> Type -> Type} {f : Type -> Type} {a : Type} - {b : Type} `{Bitraversable t} `{GHC.Base.Applicative f} +#[global] Definition bisequence {t : Type -> Type -> Type} {f : Type -> Type} {a + : Type} {b : Type} `{Bitraversable t} `{GHC.Base.Applicative f} : t (f a) (f b) -> f (t a b) := bitraverse GHC.Base.id GHC.Base.id. -Definition bisequenceA {t : Type -> Type -> Type} {f : Type -> Type} {a : Type} - {b : Type} `{Bitraversable t} `{GHC.Base.Applicative f} +#[global] Definition bisequenceA {t : Type -> Type -> Type} {f : Type -> Type} + {a : Type} {b : Type} `{Bitraversable t} `{GHC.Base.Applicative f} : t (f a) (f b) -> f (t a b) := bisequence. -Definition bimapM {t : Type -> Type -> Type} {f : Type -> Type} {a : Type} {c - : Type} {b : Type} {d : Type} `{Bitraversable t} `{GHC.Base.Applicative f} +#[global] Definition bimapM {t : Type -> Type -> Type} {f : Type -> Type} {a + : Type} {c : Type} {b : Type} {d : Type} `{Bitraversable t} + `{GHC.Base.Applicative f} : (a -> f c) -> (b -> f d) -> t a b -> f (t c d) := bitraverse. -Definition bifor {t : Type -> Type -> Type} {f : Type -> Type} {a : Type} {b - : Type} {c : Type} {d : Type} `{Bitraversable t} `{GHC.Base.Applicative f} +#[global] Definition bifor {t : Type -> Type -> Type} {f : Type -> Type} {a + : Type} {b : Type} {c : Type} {d : Type} `{Bitraversable t} + `{GHC.Base.Applicative f} : t a b -> (a -> f c) -> (b -> f d) -> f (t c d) := fun t f g => bitraverse f g t. -Definition biforM {t : Type -> Type -> Type} {f : Type -> Type} {a : Type} {b - : Type} {c : Type} {d : Type} `{Bitraversable t} `{GHC.Base.Applicative f} +#[global] Definition biforM {t : Type -> Type -> Type} {f : Type -> Type} {a + : Type} {b : Type} {c : Type} {d : Type} `{Bitraversable t} + `{GHC.Base.Applicative f} : t a b -> (a -> f c) -> (b -> f d) -> f (t c d) := bifor. -Definition bimapAccumL {t : Type -> Type -> Type} {a : Type} {b : Type} {c - : Type} {d : Type} {e : Type} `{Bitraversable t} +#[global] Definition bimapAccumL {t : Type -> Type -> Type} {a : Type} {b + : Type} {c : Type} {d : Type} {e : Type} `{Bitraversable t} : (a -> b -> (a * c)%type) -> (a -> d -> (a * e)%type) -> a -> t b d -> (a * t c e)%type := fun f g s t => @@ -360,8 +371,8 @@ Definition bimapAccumL {t : Type -> Type -> Type} {a : Type} {b : Type} {c GHC.Base.flip f) (Data.Functor.Utils.Mk_StateL GHC.Base.∘ GHC.Base.flip g) t) s. -Definition bimapAccumR {t : Type -> Type -> Type} {a : Type} {b : Type} {c - : Type} {d : Type} {e : Type} `{Bitraversable t} +#[global] Definition bimapAccumR {t : Type -> Type -> Type} {a : Type} {b + : Type} {c : Type} {d : Type} {e : Type} `{Bitraversable t} : (a -> b -> (a * c)%type) -> (a -> d -> (a * e)%type) -> a -> t b d -> (a * t c e)%type := fun f g s t => @@ -370,8 +381,8 @@ Definition bimapAccumR {t : Type -> Type -> Type} {a : Type} {b : Type} {c GHC.Base.flip f) (Data.Functor.Utils.Mk_StateR GHC.Base.∘ GHC.Base.flip g) t) s. -Definition bimapDefault {t : Type -> Type -> Type} {a : Type} {b : Type} {c - : Type} {d : Type} `{Bitraversable t} +#[global] Definition bimapDefault {t : Type -> Type -> Type} {a : Type} {b + : Type} {c : Type} {d : Type} `{Bitraversable t} : (a -> b) -> (c -> d) -> t a c -> t b d := GHC.Prim.coerce (bitraverse : (a -> Data.Functor.Identity.Identity b) -> (c -> Data.Functor.Identity.Identity d) -> diff --git a/base/Data/Bool.v b/base/Data/Bool.v index 6d5f66c4b..8cf9046b8 100644 --- a/base/Data/Bool.v +++ b/base/Data/Bool.v @@ -19,7 +19,7 @@ Require Coq.Program.Wf. (* Converted value declarations: *) -Definition bool {a : Type} : a -> a -> bool -> a := +#[global] Definition bool {a : Type} : a -> a -> bool -> a := fun arg_0__ arg_1__ arg_2__ => match arg_0__, arg_1__, arg_2__ with | f, _, false => f diff --git a/base/Data/Either.h2ci b/base/Data/Either.h2ci index 4cb5841d4..44982b6d6 100644 --- a/base/Data/Either.h2ci +++ b/base/Data/Either.h2ci @@ -1,8 +1,8 @@ -constructors: - Data.Either.Either: ! '[Qualified "Data.Either" "Left",Qualified "Data.Either" "Right"]' constructorFields: Data.Either.Left: NonRecordFields 1 Data.Either.Right: NonRecordFields 1 constructorTypes: Data.Either.Left: Qualified "Data.Either" "Either" Data.Either.Right: Qualified "Data.Either" "Either" +constructors: + Data.Either.Either: '[Qualified "Data.Either" "Left",Qualified "Data.Either" "Right"]' diff --git a/base/Data/Either.v b/base/Data/Either.v index fa5c931ee..6ed35ff16 100644 --- a/base/Data/Either.v +++ b/base/Data/Either.v @@ -28,90 +28,7 @@ Arguments Right {_} {_} _. (* Converted value declarations: *) -Local Definition Eq___Either_op_zeze__ {inst_a : Type} {inst_b : Type} - `{GHC.Base.Eq_ inst_a} `{GHC.Base.Eq_ inst_b} - : Either inst_a inst_b -> Either inst_a inst_b -> bool := - fun arg_0__ arg_1__ => - match arg_0__, arg_1__ with - | Left a1, Left b1 => ((a1 GHC.Base.== b1)) - | Right a1, Right b1 => ((a1 GHC.Base.== b1)) - | _, _ => false - end. - -Local Definition Eq___Either_op_zsze__ {inst_a : Type} {inst_b : Type} - `{GHC.Base.Eq_ inst_a} `{GHC.Base.Eq_ inst_b} - : Either inst_a inst_b -> Either inst_a inst_b -> bool := - fun x y => negb (Eq___Either_op_zeze__ x y). - -Program Instance Eq___Either {a : Type} {b : Type} `{GHC.Base.Eq_ a} - `{GHC.Base.Eq_ b} - : GHC.Base.Eq_ (Either a b) := - fun _ k__ => - k__ {| GHC.Base.op_zeze____ := Eq___Either_op_zeze__ ; - GHC.Base.op_zsze____ := Eq___Either_op_zsze__ |}. - -Local Definition Ord__Either_op_zl__ {inst_a : Type} {inst_b : Type} - `{GHC.Base.Ord inst_a} `{GHC.Base.Ord inst_b} - : Either inst_a inst_b -> Either inst_a inst_b -> bool := - fun a b => - match a with - | Left a1 => match b with | Left b1 => (a1 GHC.Base.< b1) | _ => true end - | Right a1 => match b with | Right b1 => (a1 GHC.Base.< b1) | _ => false end - end. - -Local Definition Ord__Either_op_zlze__ {inst_a : Type} {inst_b : Type} - `{GHC.Base.Ord inst_a} `{GHC.Base.Ord inst_b} - : Either inst_a inst_b -> Either inst_a inst_b -> bool := - fun a b => negb (Ord__Either_op_zl__ b a). - -Local Definition Ord__Either_op_zg__ {inst_a : Type} {inst_b : Type} - `{GHC.Base.Ord inst_a} `{GHC.Base.Ord inst_b} - : Either inst_a inst_b -> Either inst_a inst_b -> bool := - fun a b => Ord__Either_op_zl__ b a. - -Local Definition Ord__Either_op_zgze__ {inst_a : Type} {inst_b : Type} - `{GHC.Base.Ord inst_a} `{GHC.Base.Ord inst_b} - : Either inst_a inst_b -> Either inst_a inst_b -> bool := - fun a b => negb (Ord__Either_op_zl__ a b). - -Local Definition Ord__Either_compare {inst_a : Type} {inst_b : Type} - `{GHC.Base.Ord inst_a} `{GHC.Base.Ord inst_b} - : Either inst_a inst_b -> Either inst_a inst_b -> comparison := - fun a b => - match a with - | Left a1 => match b with | Left b1 => (GHC.Base.compare a1 b1) | _ => Lt end - | Right a1 => match b with | Right b1 => (GHC.Base.compare a1 b1) | _ => Gt end - end. - -Local Definition Ord__Either_max {inst_a : Type} {inst_b : Type} `{GHC.Base.Ord - inst_a} `{GHC.Base.Ord inst_b} - : Either inst_a inst_b -> Either inst_a inst_b -> Either inst_a inst_b := - fun x y => if Ord__Either_op_zlze__ x y : bool then y else x. - -Local Definition Ord__Either_min {inst_a : Type} {inst_b : Type} `{GHC.Base.Ord - inst_a} `{GHC.Base.Ord inst_b} - : Either inst_a inst_b -> Either inst_a inst_b -> Either inst_a inst_b := - fun x y => if Ord__Either_op_zlze__ x y : bool then x else y. - -Program Instance Ord__Either {a : Type} {b : Type} `{GHC.Base.Ord a} - `{GHC.Base.Ord b} - : GHC.Base.Ord (Either a b) := - fun _ k__ => - k__ {| GHC.Base.op_zl____ := Ord__Either_op_zl__ ; - GHC.Base.op_zlze____ := Ord__Either_op_zlze__ ; - GHC.Base.op_zg____ := Ord__Either_op_zg__ ; - GHC.Base.op_zgze____ := Ord__Either_op_zgze__ ; - GHC.Base.compare__ := Ord__Either_compare ; - GHC.Base.max__ := Ord__Either_max ; - GHC.Base.min__ := Ord__Either_min |}. - -(* Skipping all instances of class `GHC.Read.Read', including - `Data.Either.Read__Either' *) - -(* Skipping all instances of class `GHC.Show.Show', including - `Data.Either.Show__Either' *) - -Local Definition Functor__Either_fmap {inst_a : Type} +#[local] Definition Functor__Either_fmap {inst_a : Type} : forall {a : Type}, forall {b : Type}, (a -> b) -> Either inst_a a -> Either inst_a b := fun {a : Type} {b : Type} => @@ -121,18 +38,20 @@ Local Definition Functor__Either_fmap {inst_a : Type} | f, Right y => Right (f y) end. -Local Definition Functor__Either_op_zlzd__ {inst_a : Type} +#[local] Definition Functor__Either_op_zlzd__ {inst_a : Type} : forall {a : Type}, forall {b : Type}, a -> Either inst_a b -> Either inst_a a := fun {a : Type} {b : Type} => Functor__Either_fmap GHC.Base.∘ GHC.Base.const. +#[global] Program Instance Functor__Either {a : Type} : GHC.Base.Functor (Either a) := fun _ k__ => k__ {| GHC.Base.fmap__ := fun {a : Type} {b : Type} => Functor__Either_fmap ; GHC.Base.op_zlzd____ := fun {a : Type} {b : Type} => Functor__Either_op_zlzd__ |}. -Local Definition Semigroup__Either_op_zlzlzgzg__ {inst_a : Type} {inst_b : Type} +#[local] Definition Semigroup__Either_op_zlzlzgzg__ {inst_a : Type} {inst_b + : Type} : Either inst_a inst_b -> Either inst_a inst_b -> Either inst_a inst_b := fun arg_0__ arg_1__ => match arg_0__, arg_1__ with @@ -140,12 +59,13 @@ Local Definition Semigroup__Either_op_zlzlzgzg__ {inst_a : Type} {inst_b : Type} | a, _ => a end. +#[global] Program Instance Semigroup__Either {a : Type} {b : Type} : GHC.Base.Semigroup (Either a b) := fun _ k__ => k__ {| GHC.Base.op_zlzlzgzg____ := Semigroup__Either_op_zlzlzgzg__ |}. -Local Definition Applicative__Either_op_zlztzg__ {inst_e : Type} +#[local] Definition Applicative__Either_op_zlztzg__ {inst_e : Type} : forall {a : Type}, forall {b : Type}, Either inst_e (a -> b) -> Either inst_e a -> Either inst_e b := @@ -156,7 +76,7 @@ Local Definition Applicative__Either_op_zlztzg__ {inst_e : Type} | Right f, r => GHC.Base.fmap f r end. -Local Definition Applicative__Either_liftA2 {inst_e : Type} +#[local] Definition Applicative__Either_liftA2 {inst_e : Type} : forall {a : Type}, forall {b : Type}, forall {c : Type}, @@ -164,16 +84,17 @@ Local Definition Applicative__Either_liftA2 {inst_e : Type} fun {a : Type} {b : Type} {c : Type} => fun f x => Applicative__Either_op_zlztzg__ (GHC.Base.fmap f x). -Local Definition Applicative__Either_op_ztzg__ {inst_e : Type} +#[local] Definition Applicative__Either_op_ztzg__ {inst_e : Type} : forall {a : Type}, forall {b : Type}, Either inst_e a -> Either inst_e b -> Either inst_e b := fun {a : Type} {b : Type} => fun a1 a2 => Applicative__Either_op_zlztzg__ (GHC.Base.id GHC.Base.<$ a1) a2. -Local Definition Applicative__Either_pure {inst_e : Type} +#[local] Definition Applicative__Either_pure {inst_e : Type} : forall {a : Type}, a -> Either inst_e a := fun {a : Type} => Right. +#[global] Program Instance Applicative__Either {e : Type} : GHC.Base.Applicative (Either e) := fun _ k__ => @@ -185,7 +106,7 @@ Program Instance Applicative__Either {e : Type} Applicative__Either_op_ztzg__ ; GHC.Base.pure__ := fun {a : Type} => Applicative__Either_pure |}. -Local Definition Monad__Either_op_zgzgze__ {inst_e : Type} +#[local] Definition Monad__Either_op_zgzgze__ {inst_e : Type} : forall {a : Type}, forall {b : Type}, Either inst_e a -> (a -> Either inst_e b) -> Either inst_e b := @@ -196,16 +117,17 @@ Local Definition Monad__Either_op_zgzgze__ {inst_e : Type} | Right r, k => k r end. -Local Definition Monad__Either_op_zgzg__ {inst_e : Type} +#[local] Definition Monad__Either_op_zgzg__ {inst_e : Type} : forall {a : Type}, forall {b : Type}, Either inst_e a -> Either inst_e b -> Either inst_e b := fun {a : Type} {b : Type} => fun m k => Monad__Either_op_zgzgze__ m (fun arg_0__ => k). -Local Definition Monad__Either_return_ {inst_e : Type} +#[local] Definition Monad__Either_return_ {inst_e : Type} : forall {a : Type}, a -> Either inst_e a := fun {a : Type} => GHC.Base.pure. +#[global] Program Instance Monad__Either {e : Type} : GHC.Base.Monad (Either e) := fun _ k__ => k__ {| GHC.Base.op_zgzg____ := fun {a : Type} {b : Type} => @@ -214,7 +136,7 @@ Program Instance Monad__Either {e : Type} : GHC.Base.Monad (Either e) := Monad__Either_op_zgzgze__ ; GHC.Base.return___ := fun {a : Type} => Monad__Either_return_ |}. -Definition either {a : Type} {c : Type} {b : Type} +#[global] Definition either {a : Type} {c : Type} {b : Type} : (a -> c) -> (b -> c) -> Either a b -> c := fun arg_0__ arg_1__ arg_2__ => match arg_0__, arg_1__, arg_2__ with @@ -222,7 +144,8 @@ Definition either {a : Type} {c : Type} {b : Type} | _, g, Right y => g y end. -Definition lefts {a : Type} {b : Type} : list (Either a b) -> list a := +#[global] Definition lefts {a : Type} {b : Type} + : list (Either a b) -> list a := fun x => let cont_0__ arg_1__ := match arg_1__ with @@ -231,7 +154,8 @@ Definition lefts {a : Type} {b : Type} : list (Either a b) -> list a := end in Coq.Lists.List.flat_map cont_0__ x. -Definition rights {a : Type} {b : Type} : list (Either a b) -> list b := +#[global] Definition rights {a : Type} {b : Type} + : list (Either a b) -> list b := fun x => let cont_0__ arg_1__ := match arg_1__ with @@ -240,7 +164,7 @@ Definition rights {a : Type} {b : Type} : list (Either a b) -> list b := end in Coq.Lists.List.flat_map cont_0__ x. -Definition partitionEithers {a : Type} {b : Type} +#[global] Definition partitionEithers {a : Type} {b : Type} : list (Either a b) -> (list a * list b)%type := let right_ := fun arg_0__ arg_1__ => @@ -254,20 +178,20 @@ Definition partitionEithers {a : Type} {b : Type} end in GHC.Base.foldr (either left_ right_) (pair nil nil). -Definition isLeft {a : Type} {b : Type} : Either a b -> bool := +#[global] Definition isLeft {a : Type} {b : Type} : Either a b -> bool := fun arg_0__ => match arg_0__ with | Left _ => true | Right _ => false end. -Definition isRight {a : Type} {b : Type} : Either a b -> bool := +#[global] Definition isRight {a : Type} {b : Type} : Either a b -> bool := fun arg_0__ => match arg_0__ with | Left _ => false | Right _ => true end. -Definition fromLeft {a : Type} {b : Type} : a -> Either a b -> a := +#[global] Definition fromLeft {a : Type} {b : Type} : a -> Either a b -> a := fun arg_0__ arg_1__ => match arg_0__, arg_1__ with | _, Left a => a | a, _ => a end. -Definition fromRight {b : Type} {a : Type} : b -> Either a b -> b := +#[global] Definition fromRight {b : Type} {a : Type} : b -> Either a b -> b := fun arg_0__ arg_1__ => match arg_0__, arg_1__ with | _, Right b => b @@ -275,14 +199,11 @@ Definition fromRight {b : Type} {a : Type} : b -> Either a b -> b := end. (* External variables: - Gt Lt Type bool comparison cons false list negb nil op_zt__ pair true - Coq.Lists.List.flat_map GHC.Base.Applicative GHC.Base.Eq_ GHC.Base.Functor - GHC.Base.Monad GHC.Base.Ord GHC.Base.Semigroup GHC.Base.compare - GHC.Base.compare__ GHC.Base.const GHC.Base.fmap GHC.Base.fmap__ GHC.Base.foldr - GHC.Base.id GHC.Base.liftA2__ GHC.Base.max__ GHC.Base.min__ GHC.Base.op_z2218U__ - GHC.Base.op_zeze__ GHC.Base.op_zeze____ GHC.Base.op_zg____ GHC.Base.op_zgze____ - GHC.Base.op_zgzg____ GHC.Base.op_zgzgze____ GHC.Base.op_zl__ GHC.Base.op_zl____ - GHC.Base.op_zlzd__ GHC.Base.op_zlzd____ GHC.Base.op_zlze____ - GHC.Base.op_zlzlzgzg____ GHC.Base.op_zlztzg____ GHC.Base.op_zsze____ - GHC.Base.op_ztzg____ GHC.Base.pure GHC.Base.pure__ GHC.Base.return___ + Type bool cons false list nil op_zt__ pair true Coq.Lists.List.flat_map + GHC.Base.Applicative GHC.Base.Functor GHC.Base.Monad GHC.Base.Semigroup + GHC.Base.const GHC.Base.fmap GHC.Base.fmap__ GHC.Base.foldr GHC.Base.id + GHC.Base.liftA2__ GHC.Base.op_z2218U__ GHC.Base.op_zgzg____ + GHC.Base.op_zgzgze____ GHC.Base.op_zlzd__ GHC.Base.op_zlzd____ + GHC.Base.op_zlzlzgzg____ GHC.Base.op_zlztzg____ GHC.Base.op_ztzg____ + GHC.Base.pure GHC.Base.pure__ GHC.Base.return___ *) diff --git a/base/Data/Foldable.h2ci b/base/Data/Foldable.h2ci index 8b97213bb..2d1e8f7a5 100644 --- a/base/Data/Foldable.h2ci +++ b/base/Data/Foldable.h2ci @@ -1,7 +1,66 @@ +classTypes: + Data.Foldable.Foldable: fromList [] +classDefns: + Data.Foldable.Foldable: ClassDefinition (Qualified "Data.Foldable" "Foldable") [Typed + Ungeneralizable Explicit (Ident (Bare "t") :| []) (Arrow (Qualid (Bare "Type")) + (Qualid (Bare "Type")))] Nothing [(Qualified "Data.Foldable" "fold",Forall (Typed + Ungeneralizable Implicit (Ident (Bare "m") :| []) (Qualid (Bare "Type")) :| []) + (Forall (Generalized Implicit (App (Qualid (Qualified "GHC.Base" "Monoid")) (PosArg + (Qualid (Bare "m")) :| [])) :| []) (Arrow (App (Qualid (Bare "t")) (PosArg (Qualid + (Bare "m")) :| [])) (Qualid (Bare "m"))))),(Qualified "Data.Foldable" "foldMap",Forall + (Typed Ungeneralizable Implicit (Ident (Bare "m") :| []) (Qualid (Bare "Type")) + :| []) (Forall (Typed Ungeneralizable Implicit (Ident (Bare "a") :| []) (Qualid + (Bare "Type")) :| []) (Forall (Generalized Implicit (App (Qualid (Qualified "GHC.Base" + "Monoid")) (PosArg (Qualid (Bare "m")) :| [])) :| []) (Arrow (Arrow (Qualid (Bare + "a")) (Qualid (Bare "m"))) (Arrow (App (Qualid (Bare "t")) (PosArg (Qualid (Bare + "a")) :| [])) (Qualid (Bare "m"))))))),(Qualified "Data.Foldable" "foldMap'",Forall + (Typed Ungeneralizable Implicit (Ident (Bare "m") :| []) (Qualid (Bare "Type")) + :| []) (Forall (Typed Ungeneralizable Implicit (Ident (Bare "a") :| []) (Qualid + (Bare "Type")) :| []) (Forall (Generalized Implicit (App (Qualid (Qualified "GHC.Base" + "Monoid")) (PosArg (Qualid (Bare "m")) :| [])) :| []) (Arrow (Arrow (Qualid (Bare + "a")) (Qualid (Bare "m"))) (Arrow (App (Qualid (Bare "t")) (PosArg (Qualid (Bare + "a")) :| [])) (Qualid (Bare "m"))))))),(Qualified "Data.Foldable" "foldl",Forall + (Typed Ungeneralizable Implicit (Ident (Bare "b") :| []) (Qualid (Bare "Type")) + :| []) (Forall (Typed Ungeneralizable Implicit (Ident (Bare "a") :| []) (Qualid + (Bare "Type")) :| []) (Arrow (Arrow (Qualid (Bare "b")) (Arrow (Qualid (Bare "a")) + (Qualid (Bare "b")))) (Arrow (Qualid (Bare "b")) (Arrow (App (Qualid (Bare "t")) + (PosArg (Qualid (Bare "a")) :| [])) (Qualid (Bare "b"))))))),(Qualified "Data.Foldable" + "foldl'",Forall (Typed Ungeneralizable Implicit (Ident (Bare "b") :| []) (Qualid + (Bare "Type")) :| []) (Forall (Typed Ungeneralizable Implicit (Ident (Bare "a") + :| []) (Qualid (Bare "Type")) :| []) (Arrow (Arrow (Qualid (Bare "b")) (Arrow + (Qualid (Bare "a")) (Qualid (Bare "b")))) (Arrow (Qualid (Bare "b")) (Arrow (App + (Qualid (Bare "t")) (PosArg (Qualid (Bare "a")) :| [])) (Qualid (Bare "b"))))))),(Qualified + "Data.Foldable" "foldr",Forall (Typed Ungeneralizable Implicit (Ident (Bare "a") + :| []) (Qualid (Bare "Type")) :| []) (Forall (Typed Ungeneralizable Implicit (Ident + (Bare "b") :| []) (Qualid (Bare "Type")) :| []) (Arrow (Arrow (Qualid (Bare "a")) + (Arrow (Qualid (Bare "b")) (Qualid (Bare "b")))) (Arrow (Qualid (Bare "b")) (Arrow + (App (Qualid (Bare "t")) (PosArg (Qualid (Bare "a")) :| [])) (Qualid (Bare "b"))))))),(Qualified + "Data.Foldable" "foldr'",Forall (Typed Ungeneralizable Implicit (Ident (Bare "a") + :| []) (Qualid (Bare "Type")) :| []) (Forall (Typed Ungeneralizable Implicit (Ident + (Bare "b") :| []) (Qualid (Bare "Type")) :| []) (Arrow (Arrow (Qualid (Bare "a")) + (Arrow (Qualid (Bare "b")) (Qualid (Bare "b")))) (Arrow (Qualid (Bare "b")) (Arrow + (App (Qualid (Bare "t")) (PosArg (Qualid (Bare "a")) :| [])) (Qualid (Bare "b"))))))),(Qualified + "Data.Foldable" "length",Forall (Typed Ungeneralizable Implicit (Ident (Bare "a") + :| []) (Qualid (Bare "Type")) :| []) (Arrow (App (Qualid (Bare "t")) (PosArg (Qualid + (Bare "a")) :| [])) (Qualid (Qualified "GHC.Num" "Int")))),(Qualified "Data.Foldable" + "null",Forall (Typed Ungeneralizable Implicit (Ident (Bare "a") :| []) (Qualid + (Bare "Type")) :| []) (Arrow (App (Qualid (Bare "t")) (PosArg (Qualid (Bare "a")) + :| [])) (Qualid (Bare "bool")))),(Qualified "Data.Foldable" "product",Forall (Typed + Ungeneralizable Implicit (Ident (Bare "a") :| []) (Qualid (Bare "Type")) :| []) + (Forall (Generalized Implicit (App (Qualid (Qualified "GHC.Num" "Num")) (PosArg + (Qualid (Bare "a")) :| [])) :| []) (Arrow (App (Qualid (Bare "t")) (PosArg (Qualid + (Bare "a")) :| [])) (Qualid (Bare "a"))))),(Qualified "Data.Foldable" "sum",Forall + (Typed Ungeneralizable Implicit (Ident (Bare "a") :| []) (Qualid (Bare "Type")) + :| []) (Forall (Generalized Implicit (App (Qualid (Qualified "GHC.Num" "Num")) + (PosArg (Qualid (Bare "a")) :| [])) :| []) (Arrow (App (Qualid (Bare "t")) (PosArg + (Qualid (Bare "a")) :| [])) (Qualid (Bare "a"))))),(Qualified "Data.Foldable" + "toList",Forall (Typed Ungeneralizable Implicit (Ident (Bare "a") :| []) (Qualid + (Bare "Type")) :| []) (Arrow (App (Qualid (Bare "t")) (PosArg (Qualid (Bare "a")) + :| [])) (App (Qualid (Bare "list")) (PosArg (Qualid (Bare "a")) :| []))))] superclassCount: Data.Foldable.Foldable: '0' defaultMethods: - Data.Foldable.Foldable: ! 'fromList [(Qualified "Data.Foldable" "elem",App (Qualid + Data.Foldable.Foldable: 'fromList [(Qualified "Data.Foldable" "elem",App (Qualid (Qualified "GHC.Base" "op_z2218U__")) (PosArg (Qualid (Qualified "Data.Foldable" "any")) :| [PosArg (Qualid (Qualified "GHC.Base" "op_zeze__"))])),(Qualified "Data.Foldable" "fold",App (Qualid (Qualified "Data.Foldable" "foldMap")) (PosArg (Qualid (Qualified @@ -9,64 +68,70 @@ defaultMethods: (Ident (Bare "f")) :| []) (App (App (Qualid (Qualified "Data.Foldable" "foldr")) (PosArg (Parens (App (Qualid (Qualified "GHC.Base" "op_z2218U__")) (PosArg (Qualid (Qualified "GHC.Base" "mappend")) :| [PosArg (Qualid (Bare "f"))]))) :| [])) (PosArg - (Qualid (Qualified "GHC.Base" "mempty")) :| []))),(Qualified "Data.Foldable" "foldl",Fun - (ExplicitBinder (Ident (Bare "f")) :| [ExplicitBinder (Ident (Bare "z")),ExplicitBinder - (Ident (Bare "t"))]) (App (App (Qualid (Qualified "Data.SemigroupInternal" "appEndo")) - (PosArg (Parens (App (Qualid (Qualified "Data.SemigroupInternal" "getDual")) (PosArg - (Parens (App (App (Qualid (Qualified "Data.Foldable" "foldMap")) (PosArg (Parens - (App (Qualid (Qualified "GHC.Base" "op_z2218U__")) (PosArg (Qualid (Qualified - "Data.SemigroupInternal" "Mk_Dual")) :| [PosArg (App (Qualid (Qualified "GHC.Base" - "op_z2218U__")) (PosArg (Qualid (Qualified "Data.SemigroupInternal" "Mk_Endo")) - :| [PosArg (App (Qualid (Qualified "GHC.Base" "flip")) (PosArg (Qualid (Bare "f")) - :| []))]))]))) :| [])) (PosArg (Qualid (Bare "t")) :| []))) :| []))) :| [])) (PosArg - (Qualid (Bare "z")) :| []))),(Qualified "Data.Foldable" "foldl''",Fun (ExplicitBinder + (Qualid (Qualified "GHC.Base" "mempty")) :| []))),(Qualified "Data.Foldable" "foldMap''",Fun + (ExplicitBinder (Ident (Bare "f")) :| []) (App (App (Qualid (Qualified "Data.Foldable" + "foldl''")) (PosArg (Parens (Fun (ExplicitBinder (Ident (Bare "acc")) :| [ExplicitBinder + (Ident (Bare "a"))]) (App (Qualid (Qualified "GHC.Base" "op_zlzlzgzg__")) (PosArg + (Qualid (Bare "acc")) :| [PosArg (App (Qualid (Bare "f")) (PosArg (Qualid (Bare + "a")) :| []))])))) :| [])) (PosArg (Qualid (Qualified "GHC.Base" "mempty")) :| + []))),(Qualified "Data.Foldable" "foldl",Fun (ExplicitBinder (Ident (Bare "f")) + :| [ExplicitBinder (Ident (Bare "z")),ExplicitBinder (Ident (Bare "t"))]) (App + (App (Qualid (Qualified "Data.SemigroupInternal" "appEndo")) (PosArg (Parens (App + (Qualid (Qualified "Data.SemigroupInternal" "getDual")) (PosArg (Parens (App (App + (Qualid (Qualified "Data.Foldable" "foldMap")) (PosArg (Parens (App (Qualid (Qualified + "GHC.Base" "op_z2218U__")) (PosArg (Qualid (Qualified "Data.SemigroupInternal" + "Mk_Dual")) :| [PosArg (App (Qualid (Qualified "GHC.Base" "op_z2218U__")) (PosArg + (Qualid (Qualified "Data.SemigroupInternal" "Mk_Endo")) :| [PosArg (App (Qualid + (Qualified "GHC.Base" "flip")) (PosArg (Qualid (Bare "f")) :| []))]))]))) :| [])) + (PosArg (Qualid (Bare "t")) :| []))) :| []))) :| [])) (PosArg (Qualid (Bare "z")) + :| []))),(Qualified "Data.Foldable" "foldl''",Fun (ExplicitBinder (Ident (Bare + "f")) :| [ExplicitBinder (Ident (Bare "z0")),ExplicitBinder (Ident (Bare "xs"))]) + (Let (Bare "f''") [] Nothing (Fun (ExplicitBinder (Ident (Bare "x")) :| [ExplicitBinder + (Ident (Bare "k")),ExplicitBinder (Ident (Bare "z"))]) (App (Qualid (Bare "k")) + (PosArg (App (Qualid (Bare "f")) (PosArg (Qualid (Bare "z")) :| [PosArg (Qualid + (Bare "x"))])) :| []))) (App (App (App (App (Qualid (Qualified "Data.Foldable" + "foldr")) (PosArg (Qualid (Bare "f''")) :| [])) (PosArg (Qualid (Qualified "GHC.Base" + "id")) :| [])) (PosArg (Qualid (Bare "xs")) :| [])) (PosArg (Qualid (Bare "z0")) + :| [])))),(Qualified "Data.Foldable" "foldl1",Fun (ExplicitBinder (Ident (Bare + "f")) :| [ExplicitBinder (Ident (Bare "xs"))]) (Let (Bare "mf") [] Nothing (Fun + (ExplicitBinder (Ident (Bare "m")) :| [ExplicitBinder (Ident (Bare "y"))]) (App + (Qualid (Bare "Some")) (PosArg (Parens (Match (MatchItem (Qualid (Bare "m")) Nothing + Nothing :| []) Nothing [Equation (MultPattern (ArgsPat (Bare "None") [] :| []) + :| []) (Qualid (Bare "y")),Equation (MultPattern (ArgsPat (Bare "Some") [QualidPat + (Bare "x")] :| []) :| []) (App (App (Qualid (Bare "f")) (PosArg (Qualid (Bare + "x")) :| [])) (PosArg (Qualid (Bare "y")) :| []))])) :| []))) (App (App (Qualid + (Qualified "Data.Maybe" "fromMaybe")) (PosArg (Parens (App (Qualid (Qualified + "GHC.Err" "errorWithoutStackTrace")) (PosArg (HsString "foldl1: empty structure") + :| []))) :| [])) (PosArg (Parens (App (App (App (Qualid (Qualified "Data.Foldable" + "foldl")) (PosArg (Qualid (Bare "mf")) :| [])) (PosArg (Qualid (Bare "None")) + :| [])) (PosArg (Qualid (Bare "xs")) :| []))) :| [])))),(Qualified "Data.Foldable" + "foldr",Fun (ExplicitBinder (Ident (Bare "f")) :| [ExplicitBinder (Ident (Bare + "z")),ExplicitBinder (Ident (Bare "t"))]) (App (App (Qualid (Qualified "Data.SemigroupInternal" + "appEndo")) (PosArg (Parens (App (App (Qualid (Qualified "Data.Foldable" "foldMap")) + (PosArg (Parens (App (Qualid (Qualified "Coq.Program.Basics" "compose")) (PosArg + (Qualid (Qualified "Data.SemigroupInternal" "Mk_Endo")) :| [PosArg (Qualid (Bare + "f"))]))) :| [])) (PosArg (Qualid (Bare "t")) :| []))) :| [])) (PosArg (Qualid + (Bare "z")) :| []))),(Qualified "Data.Foldable" "foldr''",Fun (ExplicitBinder (Ident (Bare "f")) :| [ExplicitBinder (Ident (Bare "z0")),ExplicitBinder (Ident (Bare "xs"))]) (Let (Bare "f''") [] Nothing (Fun (ExplicitBinder (Ident (Bare - "x")) :| [ExplicitBinder (Ident (Bare "k")),ExplicitBinder (Ident (Bare "z"))]) + "k")) :| [ExplicitBinder (Ident (Bare "x")),ExplicitBinder (Ident (Bare "z"))]) (App (Qualid (Bare "k")) (PosArg (App (Qualid (Bare "f")) (PosArg (Qualid (Bare - "z")) :| [PosArg (Qualid (Bare "x"))])) :| []))) (App (App (App (App (Qualid (Qualified - "Data.Foldable" "foldr")) (PosArg (Qualid (Bare "f''")) :| [])) (PosArg (Qualid + "x")) :| [PosArg (Qualid (Bare "z"))])) :| []))) (App (App (App (App (Qualid (Qualified + "Data.Foldable" "foldl")) (PosArg (Qualid (Bare "f''")) :| [])) (PosArg (Qualid (Qualified "GHC.Base" "id")) :| [])) (PosArg (Qualid (Bare "xs")) :| [])) (PosArg - (Qualid (Bare "z0")) :| [])))),(Qualified "Data.Foldable" "foldl1",Fun (ExplicitBinder + (Qualid (Bare "z0")) :| [])))),(Qualified "Data.Foldable" "foldr1",Fun (ExplicitBinder (Ident (Bare "f")) :| [ExplicitBinder (Ident (Bare "xs"))]) (Let (Bare "mf") [] - Nothing (Fun (ExplicitBinder (Ident (Bare "m")) :| [ExplicitBinder (Ident (Bare - "y"))]) (App (Qualid (Bare "Some")) (PosArg (Parens (Match (MatchItem (Qualid + Nothing (Fun (ExplicitBinder (Ident (Bare "x")) :| [ExplicitBinder (Ident (Bare + "m"))]) (App (Qualid (Bare "Some")) (PosArg (Parens (Match (MatchItem (Qualid (Bare "m")) Nothing Nothing :| []) Nothing [Equation (MultPattern (ArgsPat (Bare - "None") [] :| []) :| []) (Qualid (Bare "y")),Equation (MultPattern (ArgsPat (Bare - "Some") [QualidPat (Bare "x")] :| []) :| []) (App (App (Qualid (Bare "f")) (PosArg + "None") [] :| []) :| []) (Qualid (Bare "x")),Equation (MultPattern (ArgsPat (Bare + "Some") [QualidPat (Bare "y")] :| []) :| []) (App (App (Qualid (Bare "f")) (PosArg (Qualid (Bare "x")) :| [])) (PosArg (Qualid (Bare "y")) :| []))])) :| []))) (App (App (Qualid (Qualified "Data.Maybe" "fromMaybe")) (PosArg (Parens (App (Qualid - (Qualified "GHC.Err" "errorWithoutStackTrace")) (PosArg (HsString "foldl1: empty + (Qualified "GHC.Err" "errorWithoutStackTrace")) (PosArg (HsString "foldr1: empty structure") :| []))) :| [])) (PosArg (Parens (App (App (App (Qualid (Qualified - "Data.Foldable" "foldl")) (PosArg (Qualid (Bare "mf")) :| [])) (PosArg (Qualid + "Data.Foldable" "foldr")) (PosArg (Qualid (Bare "mf")) :| [])) (PosArg (Qualid (Bare "None")) :| [])) (PosArg (Qualid (Bare "xs")) :| []))) :| [])))),(Qualified - "Data.Foldable" "foldr",Fun (ExplicitBinder (Ident (Bare "f")) :| [ExplicitBinder - (Ident (Bare "z")),ExplicitBinder (Ident (Bare "t"))]) (App (App (Qualid (Qualified - "Data.SemigroupInternal" "appEndo")) (PosArg (Parens (App (App (Qualid (Qualified - "Data.Foldable" "foldMap")) (PosArg (Parens (App (Qualid (Qualified "Coq.Program.Basics" - "compose")) (PosArg (Qualid (Qualified "Data.SemigroupInternal" "Mk_Endo")) :| - [PosArg (Qualid (Bare "f"))]))) :| [])) (PosArg (Qualid (Bare "t")) :| []))) :| - [])) (PosArg (Qualid (Bare "z")) :| []))),(Qualified "Data.Foldable" "foldr''",Fun - (ExplicitBinder (Ident (Bare "f")) :| [ExplicitBinder (Ident (Bare "z0")),ExplicitBinder - (Ident (Bare "xs"))]) (Let (Bare "f''") [] Nothing (Fun (ExplicitBinder (Ident - (Bare "k")) :| [ExplicitBinder (Ident (Bare "x")),ExplicitBinder (Ident (Bare - "z"))]) (App (Qualid (Bare "k")) (PosArg (App (Qualid (Bare "f")) (PosArg (Qualid - (Bare "x")) :| [PosArg (Qualid (Bare "z"))])) :| []))) (App (App (App (App (Qualid - (Qualified "Data.Foldable" "foldl")) (PosArg (Qualid (Bare "f''")) :| [])) (PosArg - (Qualid (Qualified "GHC.Base" "id")) :| [])) (PosArg (Qualid (Bare "xs")) :| [])) - (PosArg (Qualid (Bare "z0")) :| [])))),(Qualified "Data.Foldable" "foldr1",Fun - (ExplicitBinder (Ident (Bare "f")) :| [ExplicitBinder (Ident (Bare "xs"))]) (Let - (Bare "mf") [] Nothing (Fun (ExplicitBinder (Ident (Bare "x")) :| [ExplicitBinder - (Ident (Bare "m"))]) (App (Qualid (Bare "Some")) (PosArg (Parens (Match (MatchItem - (Qualid (Bare "m")) Nothing Nothing :| []) Nothing [Equation (MultPattern (ArgsPat - (Bare "None") [] :| []) :| []) (Qualid (Bare "x")),Equation (MultPattern (ArgsPat - (Bare "Some") [QualidPat (Bare "y")] :| []) :| []) (App (App (Qualid (Bare "f")) - (PosArg (Qualid (Bare "x")) :| [])) (PosArg (Qualid (Bare "y")) :| []))])) :| - []))) (App (App (Qualid (Qualified "Data.Maybe" "fromMaybe")) (PosArg (Parens - (App (Qualid (Qualified "GHC.Err" "errorWithoutStackTrace")) (PosArg (HsString - "foldr1: empty structure") :| []))) :| [])) (PosArg (Parens (App (App (App (Qualid - (Qualified "Data.Foldable" "foldr")) (PosArg (Qualid (Bare "mf")) :| [])) (PosArg - (Qualid (Bare "None")) :| [])) (PosArg (Qualid (Bare "xs")) :| []))) :| [])))),(Qualified "Data.Foldable" "length",App (App (Qualid (Qualified "Data.Foldable" "foldl''")) (PosArg (Parens (Fun (ExplicitBinder (Ident (Bare "arg_0__")) :| [ExplicitBinder (Ident (Bare "arg_1__"))]) (Match (MatchItem (Qualid (Bare "arg_0__")) Nothing @@ -107,56 +172,3 @@ defaultMethods: (Bare "c")) :| [ExplicitBinder (Ident (Bare "n"))]) (App (App (App (Qualid (Qualified "Data.Foldable" "foldr")) (PosArg (Qualid (Bare "c")) :| [])) (PosArg (Qualid (Bare "n")) :| [])) (PosArg (Qualid (Bare "t")) :| []))))) :| [])))]' -classTypes: - Data.Foldable.Foldable: fromList [] -classDefns: - Data.Foldable.Foldable: ClassDefinition (Qualified "Data.Foldable" "Foldable") [Typed - Ungeneralizable Explicit (Ident (Bare "t") :| []) (Arrow (Qualid (Bare "Type")) - (Qualid (Bare "Type")))] Nothing [(Qualified "Data.Foldable" "fold",Forall (Typed - Ungeneralizable Implicit (Ident (Bare "m") :| []) (Qualid (Bare "Type")) :| []) - (Forall (Generalized Implicit (App (Qualid (Qualified "GHC.Base" "Monoid")) (PosArg - (Qualid (Bare "m")) :| [])) :| []) (Arrow (App (Qualid (Bare "t")) (PosArg (Qualid - (Bare "m")) :| [])) (Qualid (Bare "m"))))),(Qualified "Data.Foldable" "foldMap",Forall - (Typed Ungeneralizable Implicit (Ident (Bare "m") :| []) (Qualid (Bare "Type")) - :| []) (Forall (Typed Ungeneralizable Implicit (Ident (Bare "a") :| []) (Qualid - (Bare "Type")) :| []) (Forall (Generalized Implicit (App (Qualid (Qualified "GHC.Base" - "Monoid")) (PosArg (Qualid (Bare "m")) :| [])) :| []) (Arrow (Arrow (Qualid (Bare - "a")) (Qualid (Bare "m"))) (Arrow (App (Qualid (Bare "t")) (PosArg (Qualid (Bare - "a")) :| [])) (Qualid (Bare "m"))))))),(Qualified "Data.Foldable" "foldl",Forall - (Typed Ungeneralizable Implicit (Ident (Bare "b") :| []) (Qualid (Bare "Type")) - :| []) (Forall (Typed Ungeneralizable Implicit (Ident (Bare "a") :| []) (Qualid - (Bare "Type")) :| []) (Arrow (Arrow (Qualid (Bare "b")) (Arrow (Qualid (Bare "a")) - (Qualid (Bare "b")))) (Arrow (Qualid (Bare "b")) (Arrow (App (Qualid (Bare "t")) - (PosArg (Qualid (Bare "a")) :| [])) (Qualid (Bare "b"))))))),(Qualified "Data.Foldable" - "foldl'",Forall (Typed Ungeneralizable Implicit (Ident (Bare "b") :| []) (Qualid - (Bare "Type")) :| []) (Forall (Typed Ungeneralizable Implicit (Ident (Bare "a") - :| []) (Qualid (Bare "Type")) :| []) (Arrow (Arrow (Qualid (Bare "b")) (Arrow - (Qualid (Bare "a")) (Qualid (Bare "b")))) (Arrow (Qualid (Bare "b")) (Arrow (App - (Qualid (Bare "t")) (PosArg (Qualid (Bare "a")) :| [])) (Qualid (Bare "b"))))))),(Qualified - "Data.Foldable" "foldr",Forall (Typed Ungeneralizable Implicit (Ident (Bare "a") - :| []) (Qualid (Bare "Type")) :| []) (Forall (Typed Ungeneralizable Implicit (Ident - (Bare "b") :| []) (Qualid (Bare "Type")) :| []) (Arrow (Arrow (Qualid (Bare "a")) - (Arrow (Qualid (Bare "b")) (Qualid (Bare "b")))) (Arrow (Qualid (Bare "b")) (Arrow - (App (Qualid (Bare "t")) (PosArg (Qualid (Bare "a")) :| [])) (Qualid (Bare "b"))))))),(Qualified - "Data.Foldable" "foldr'",Forall (Typed Ungeneralizable Implicit (Ident (Bare "a") - :| []) (Qualid (Bare "Type")) :| []) (Forall (Typed Ungeneralizable Implicit (Ident - (Bare "b") :| []) (Qualid (Bare "Type")) :| []) (Arrow (Arrow (Qualid (Bare "a")) - (Arrow (Qualid (Bare "b")) (Qualid (Bare "b")))) (Arrow (Qualid (Bare "b")) (Arrow - (App (Qualid (Bare "t")) (PosArg (Qualid (Bare "a")) :| [])) (Qualid (Bare "b"))))))),(Qualified - "Data.Foldable" "length",Forall (Typed Ungeneralizable Implicit (Ident (Bare "a") - :| []) (Qualid (Bare "Type")) :| []) (Arrow (App (Qualid (Bare "t")) (PosArg (Qualid - (Bare "a")) :| [])) (Qualid (Qualified "GHC.Num" "Int")))),(Qualified "Data.Foldable" - "null",Forall (Typed Ungeneralizable Implicit (Ident (Bare "a") :| []) (Qualid - (Bare "Type")) :| []) (Arrow (App (Qualid (Bare "t")) (PosArg (Qualid (Bare "a")) - :| [])) (Qualid (Bare "bool")))),(Qualified "Data.Foldable" "product",Forall (Typed - Ungeneralizable Implicit (Ident (Bare "a") :| []) (Qualid (Bare "Type")) :| []) - (Forall (Generalized Implicit (App (Qualid (Qualified "GHC.Num" "Num")) (PosArg - (Qualid (Bare "a")) :| [])) :| []) (Arrow (App (Qualid (Bare "t")) (PosArg (Qualid - (Bare "a")) :| [])) (Qualid (Bare "a"))))),(Qualified "Data.Foldable" "sum",Forall - (Typed Ungeneralizable Implicit (Ident (Bare "a") :| []) (Qualid (Bare "Type")) - :| []) (Forall (Generalized Implicit (App (Qualid (Qualified "GHC.Num" "Num")) - (PosArg (Qualid (Bare "a")) :| [])) :| []) (Arrow (App (Qualid (Bare "t")) (PosArg - (Qualid (Bare "a")) :| [])) (Qualid (Bare "a"))))),(Qualified "Data.Foldable" - "toList",Forall (Typed Ungeneralizable Implicit (Ident (Bare "a") :| []) (Qualid - (Bare "Type")) :| []) (Arrow (App (Qualid (Bare "t")) (PosArg (Qualid (Bare "a")) - :| [])) (App (Qualid (Bare "list")) (PosArg (Qualid (Bare "a")) :| []))))] diff --git a/base/Data/Foldable.v b/base/Data/Foldable.v index 6f58ad699..770b227ff 100644 --- a/base/Data/Foldable.v +++ b/base/Data/Foldable.v @@ -19,6 +19,7 @@ Require Coq.Program.Basics. Require Data.Either. Require Data.Maybe. Require Data.Monoid. +Require Data.Ord. Require Data.Proxy. Require Data.SemigroupInternal. Require GHC.Base. @@ -35,6 +36,8 @@ Record Foldable__Dict (t : Type -> Type) := Foldable__Dict_Build { fold__ : forall {m : Type}, forall `{GHC.Base.Monoid m}, t m -> m ; foldMap__ : forall {m : Type}, forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> t a -> m ; + foldMap'__ : forall {m : Type}, + forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> t a -> m ; foldl__ : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> t a -> b ; foldl'__ : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> t a -> b ; @@ -47,51 +50,58 @@ Record Foldable__Dict (t : Type -> Type) := Foldable__Dict_Build { sum__ : forall {a : Type}, forall `{GHC.Num.Num a}, t a -> a ; toList__ : forall {a : Type}, t a -> list a }. -Definition Foldable (t : Type -> Type) := +#[global] Definition Foldable (t : Type -> Type) := forall r__, (Foldable__Dict t -> r__) -> r__. Existing Class Foldable. -Definition fold `{g__0__ : Foldable t} +#[global] Definition fold `{g__0__ : Foldable t} : forall {m : Type}, forall `{GHC.Base.Monoid m}, t m -> m := g__0__ _ (fold__ t). -Definition foldMap `{g__0__ : Foldable t} +#[global] Definition foldMap `{g__0__ : Foldable t} : forall {m : Type}, forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> t a -> m := g__0__ _ (foldMap__ t). -Definition foldl `{g__0__ : Foldable t} +#[global] Definition foldMap' `{g__0__ : Foldable t} + : forall {m : Type}, + forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> t a -> m := + g__0__ _ (foldMap'__ t). + +#[global] Definition foldl `{g__0__ : Foldable t} : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> t a -> b := g__0__ _ (foldl__ t). -Definition foldl' `{g__0__ : Foldable t} +#[global] Definition foldl' `{g__0__ : Foldable t} : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> t a -> b := g__0__ _ (foldl'__ t). -Definition foldr `{g__0__ : Foldable t} +#[global] Definition foldr `{g__0__ : Foldable t} : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> t a -> b := g__0__ _ (foldr__ t). -Definition foldr' `{g__0__ : Foldable t} +#[global] Definition foldr' `{g__0__ : Foldable t} : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> t a -> b := g__0__ _ (foldr'__ t). -Definition length `{g__0__ : Foldable t} +#[global] Definition length `{g__0__ : Foldable t} : forall {a : Type}, t a -> GHC.Num.Int := g__0__ _ (length__ t). -Definition null `{g__0__ : Foldable t} : forall {a : Type}, t a -> bool := +#[global] Definition null `{g__0__ : Foldable t} + : forall {a : Type}, t a -> bool := g__0__ _ (null__ t). -Definition product `{g__0__ : Foldable t} +#[global] Definition product `{g__0__ : Foldable t} : forall {a : Type}, forall `{GHC.Num.Num a}, t a -> a := g__0__ _ (product__ t). -Definition sum `{g__0__ : Foldable t} +#[global] Definition sum `{g__0__ : Foldable t} : forall {a : Type}, forall `{GHC.Num.Num a}, t a -> a := g__0__ _ (sum__ t). -Definition toList `{g__0__ : Foldable t} : forall {a : Type}, t a -> list a := +#[global] Definition toList `{g__0__ : Foldable t} + : forall {a : Type}, t a -> list a := g__0__ _ (toList__ t). (* Midamble *) @@ -159,35 +169,734 @@ Definition default_foldable_foldMap {f : Type -> Type} in default_foldable (fun {m}{a} `{GHC.Base.Monoid m} => foldMap) foldr. -Definition default_foldable_foldr (f : Type -> Type) - (foldr : forall {a} {b}, (a -> b -> b) -> b -> f a -> b) := - let foldMap : forall {m} {a} `{GHC.Base.Monoid m}, (a -> m) -> f a -> m := - fun m a (S : GHC.Base.Semigroup m) (H : GHC.Base.Monoid m) => - fun f => foldr - (Coq.Program.Basics.compose GHC.Base.mappend - f) GHC.Base.mempty - in - default_foldable foldMap (fun {a} {b} => foldr). +Definition default_foldable_foldr (f : Type -> Type) + (foldr : forall {a} {b}, (a -> b -> b) -> b -> f a -> b) := + let foldMap : forall {m} {a} `{GHC.Base.Monoid m}, (a -> m) -> f a -> m := + fun m a (S : GHC.Base.Semigroup m) (H : GHC.Base.Monoid m) => + fun f => foldr + (Coq.Program.Basics.compose GHC.Base.mappend + f) GHC.Base.mempty + in + default_foldable foldMap (fun {a} {b} => foldr). + +(* Converted value declarations: *) + +#[local] Definition Foldable__Down_foldMap + : forall {m : Type}, + forall {a : Type}, + forall `{GHC.Base.Monoid m}, (a -> m) -> Data.Ord.Down a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | f, Data.Ord.Mk_Down a1 => f a1 + end. + +#[local] Definition Foldable__Down_fold + : forall {m : Type}, forall `{GHC.Base.Monoid m}, Data.Ord.Down m -> m := + fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Down_foldMap GHC.Base.id. + +#[local] Definition Foldable__Down_foldr + : forall {a : Type}, + forall {b : Type}, (a -> b -> b) -> b -> Data.Ord.Down a -> b := + fun {a : Type} {b : Type} => + fun arg_0__ arg_1__ arg_2__ => + match arg_0__, arg_1__, arg_2__ with + | f, z, Data.Ord.Mk_Down a1 => f a1 z + end. + +#[local] Definition Foldable__Down_foldl' + : forall {b : Type}, + forall {a : Type}, (b -> a -> b) -> b -> Data.Ord.Down a -> b := + fun {b : Type} {a : Type} => + fun f z0 xs => + let f' := fun x k z => k (f z x) in Foldable__Down_foldr f' GHC.Base.id xs z0. + +#[local] Definition Foldable__Down_foldMap' + : forall {m : Type}, + forall {a : Type}, + forall `{GHC.Base.Monoid m}, (a -> m) -> Data.Ord.Down a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun f => + Foldable__Down_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. + +#[local] Definition Foldable__Down_foldl + : forall {b : Type}, + forall {a : Type}, (b -> a -> b) -> b -> Data.Ord.Down a -> b := + fun {b : Type} {a : Type} => + fun f z t => + Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual + (Foldable__Down_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ + (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ + GHC.Base.flip f)) t)) z. + +#[local] Definition Foldable__Down_foldr' + : forall {a : Type}, + forall {b : Type}, (a -> b -> b) -> b -> Data.Ord.Down a -> b := + fun {a : Type} {b : Type} => + fun f z0 xs => + let f' := fun k x z => k (f x z) in Foldable__Down_foldl f' GHC.Base.id xs z0. + +#[local] Definition Foldable__Down_length + : forall {a : Type}, Data.Ord.Down a -> GHC.Num.Int := + fun {a : Type} => + Foldable__Down_foldl' (fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | c, _ => c GHC.Num.+ #1 + end) #0. + +#[local] Definition Foldable__Down_null + : forall {a : Type}, Data.Ord.Down a -> bool := + fun {a : Type} => fun '(Data.Ord.Mk_Down _) => false. + +#[local] Definition Foldable__Down_product + : forall {a : Type}, forall `{GHC.Num.Num a}, Data.Ord.Down a -> a := + fun {a : Type} `{GHC.Num.Num a} => + Coq.Program.Basics.compose Data.SemigroupInternal.getProduct + (Foldable__Down_foldMap Data.SemigroupInternal.Mk_Product). + +#[local] Definition Foldable__Down_sum + : forall {a : Type}, forall `{GHC.Num.Num a}, Data.Ord.Down a -> a := + fun {a : Type} `{GHC.Num.Num a} => + Coq.Program.Basics.compose Data.SemigroupInternal.getSum (Foldable__Down_foldMap + Data.SemigroupInternal.Mk_Sum). + +#[local] Definition Foldable__Down_toList + : forall {a : Type}, Data.Ord.Down a -> list a := + fun {a : Type} => + fun t => GHC.Base.build' (fun _ => (fun c n => Foldable__Down_foldr c n t)). + +#[global] +Program Instance Foldable__Down : Foldable Data.Ord.Down := + fun _ k__ => + k__ {| fold__ := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Down_fold ; + foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__Down_foldMap ; + foldMap'__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__Down_foldMap' ; + foldl__ := fun {b : Type} {a : Type} => Foldable__Down_foldl ; + foldl'__ := fun {b : Type} {a : Type} => Foldable__Down_foldl' ; + foldr__ := fun {a : Type} {b : Type} => Foldable__Down_foldr ; + foldr'__ := fun {a : Type} {b : Type} => Foldable__Down_foldr' ; + length__ := fun {a : Type} => Foldable__Down_length ; + null__ := fun {a : Type} => Foldable__Down_null ; + product__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__Down_product ; + sum__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__Down_sum ; + toList__ := fun {a : Type} => Foldable__Down_toList |}. + +#[local] Definition Foldable__UWord_foldMap + : forall {m : Type}, + forall {a : Type}, + forall `{GHC.Base.Monoid m}, (a -> m) -> GHC.Generics.UWord a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | f, GHC.Generics.UWord a1 => GHC.Base.mempty + end. + +#[local] Definition Foldable__UWord_fold + : forall {m : Type}, forall `{GHC.Base.Monoid m}, GHC.Generics.UWord m -> m := + fun {m : Type} `{GHC.Base.Monoid m} => Foldable__UWord_foldMap GHC.Base.id. + +#[local] Definition Foldable__UWord_foldr + : forall {a : Type}, + forall {b : Type}, (a -> b -> b) -> b -> GHC.Generics.UWord a -> b := + fun {a : Type} {b : Type} => + fun arg_0__ arg_1__ arg_2__ => + match arg_0__, arg_1__, arg_2__ with + | f, z, GHC.Generics.UWord a1 => z + end. + +#[local] Definition Foldable__UWord_foldl' + : forall {b : Type}, + forall {a : Type}, (b -> a -> b) -> b -> GHC.Generics.UWord a -> b := + fun {b : Type} {a : Type} => + fun f z0 xs => + let f' := fun x k z => k (f z x) in Foldable__UWord_foldr f' GHC.Base.id xs z0. + +#[local] Definition Foldable__UWord_foldMap' + : forall {m : Type}, + forall {a : Type}, + forall `{GHC.Base.Monoid m}, (a -> m) -> GHC.Generics.UWord a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun f => + Foldable__UWord_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. + +#[local] Definition Foldable__UWord_foldl + : forall {b : Type}, + forall {a : Type}, (b -> a -> b) -> b -> GHC.Generics.UWord a -> b := + fun {b : Type} {a : Type} => + fun f z t => + Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual + (Foldable__UWord_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ + (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ + GHC.Base.flip f)) t)) z. + +#[local] Definition Foldable__UWord_foldr' + : forall {a : Type}, + forall {b : Type}, (a -> b -> b) -> b -> GHC.Generics.UWord a -> b := + fun {a : Type} {b : Type} => + fun f z0 xs => + let f' := fun k x z => k (f x z) in Foldable__UWord_foldl f' GHC.Base.id xs z0. + +#[local] Definition Foldable__UWord_length + : forall {a : Type}, GHC.Generics.UWord a -> GHC.Num.Int := + fun {a : Type} => + Foldable__UWord_foldl' (fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | c, _ => c GHC.Num.+ #1 + end) #0. + +#[local] Definition Foldable__UWord_null + : forall {a : Type}, GHC.Generics.UWord a -> bool := + fun {a : Type} => fun '(GHC.Generics.UWord a1) => true. + +#[local] Definition Foldable__UWord_product + : forall {a : Type}, forall `{GHC.Num.Num a}, GHC.Generics.UWord a -> a := + fun {a : Type} `{GHC.Num.Num a} => + Coq.Program.Basics.compose Data.SemigroupInternal.getProduct + (Foldable__UWord_foldMap Data.SemigroupInternal.Mk_Product). + +#[local] Definition Foldable__UWord_sum + : forall {a : Type}, forall `{GHC.Num.Num a}, GHC.Generics.UWord a -> a := + fun {a : Type} `{GHC.Num.Num a} => + Coq.Program.Basics.compose Data.SemigroupInternal.getSum + (Foldable__UWord_foldMap Data.SemigroupInternal.Mk_Sum). + +#[local] Definition Foldable__UWord_toList + : forall {a : Type}, GHC.Generics.UWord a -> list a := + fun {a : Type} => + fun t => GHC.Base.build' (fun _ => (fun c n => Foldable__UWord_foldr c n t)). + +#[global] +Program Instance Foldable__UWord : Foldable GHC.Generics.UWord := + fun _ k__ => + k__ {| fold__ := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__UWord_fold ; + foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__UWord_foldMap ; + foldMap'__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__UWord_foldMap' ; + foldl__ := fun {b : Type} {a : Type} => Foldable__UWord_foldl ; + foldl'__ := fun {b : Type} {a : Type} => Foldable__UWord_foldl' ; + foldr__ := fun {a : Type} {b : Type} => Foldable__UWord_foldr ; + foldr'__ := fun {a : Type} {b : Type} => Foldable__UWord_foldr' ; + length__ := fun {a : Type} => Foldable__UWord_length ; + null__ := fun {a : Type} => Foldable__UWord_null ; + product__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__UWord_product ; + sum__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__UWord_sum ; + toList__ := fun {a : Type} => Foldable__UWord_toList |}. + +#[local] Definition Foldable__UInt_foldMap + : forall {m : Type}, + forall {a : Type}, + forall `{GHC.Base.Monoid m}, (a -> m) -> GHC.Generics.UInt a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | f, GHC.Generics.UInt a1 => GHC.Base.mempty + end. + +#[local] Definition Foldable__UInt_fold + : forall {m : Type}, forall `{GHC.Base.Monoid m}, GHC.Generics.UInt m -> m := + fun {m : Type} `{GHC.Base.Monoid m} => Foldable__UInt_foldMap GHC.Base.id. + +#[local] Definition Foldable__UInt_foldr + : forall {a : Type}, + forall {b : Type}, (a -> b -> b) -> b -> GHC.Generics.UInt a -> b := + fun {a : Type} {b : Type} => + fun arg_0__ arg_1__ arg_2__ => + match arg_0__, arg_1__, arg_2__ with + | f, z, GHC.Generics.UInt a1 => z + end. + +#[local] Definition Foldable__UInt_foldl' + : forall {b : Type}, + forall {a : Type}, (b -> a -> b) -> b -> GHC.Generics.UInt a -> b := + fun {b : Type} {a : Type} => + fun f z0 xs => + let f' := fun x k z => k (f z x) in Foldable__UInt_foldr f' GHC.Base.id xs z0. + +#[local] Definition Foldable__UInt_foldMap' + : forall {m : Type}, + forall {a : Type}, + forall `{GHC.Base.Monoid m}, (a -> m) -> GHC.Generics.UInt a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun f => + Foldable__UInt_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. + +#[local] Definition Foldable__UInt_foldl + : forall {b : Type}, + forall {a : Type}, (b -> a -> b) -> b -> GHC.Generics.UInt a -> b := + fun {b : Type} {a : Type} => + fun f z t => + Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual + (Foldable__UInt_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ + (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ + GHC.Base.flip f)) t)) z. + +#[local] Definition Foldable__UInt_foldr' + : forall {a : Type}, + forall {b : Type}, (a -> b -> b) -> b -> GHC.Generics.UInt a -> b := + fun {a : Type} {b : Type} => + fun f z0 xs => + let f' := fun k x z => k (f x z) in Foldable__UInt_foldl f' GHC.Base.id xs z0. + +#[local] Definition Foldable__UInt_length + : forall {a : Type}, GHC.Generics.UInt a -> GHC.Num.Int := + fun {a : Type} => + Foldable__UInt_foldl' (fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | c, _ => c GHC.Num.+ #1 + end) #0. + +#[local] Definition Foldable__UInt_null + : forall {a : Type}, GHC.Generics.UInt a -> bool := + fun {a : Type} => fun '(GHC.Generics.UInt a1) => true. + +#[local] Definition Foldable__UInt_product + : forall {a : Type}, forall `{GHC.Num.Num a}, GHC.Generics.UInt a -> a := + fun {a : Type} `{GHC.Num.Num a} => + Coq.Program.Basics.compose Data.SemigroupInternal.getProduct + (Foldable__UInt_foldMap Data.SemigroupInternal.Mk_Product). + +#[local] Definition Foldable__UInt_sum + : forall {a : Type}, forall `{GHC.Num.Num a}, GHC.Generics.UInt a -> a := + fun {a : Type} `{GHC.Num.Num a} => + Coq.Program.Basics.compose Data.SemigroupInternal.getSum (Foldable__UInt_foldMap + Data.SemigroupInternal.Mk_Sum). + +#[local] Definition Foldable__UInt_toList + : forall {a : Type}, GHC.Generics.UInt a -> list a := + fun {a : Type} => + fun t => GHC.Base.build' (fun _ => (fun c n => Foldable__UInt_foldr c n t)). + +#[global] +Program Instance Foldable__UInt : Foldable GHC.Generics.UInt := + fun _ k__ => + k__ {| fold__ := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__UInt_fold ; + foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__UInt_foldMap ; + foldMap'__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__UInt_foldMap' ; + foldl__ := fun {b : Type} {a : Type} => Foldable__UInt_foldl ; + foldl'__ := fun {b : Type} {a : Type} => Foldable__UInt_foldl' ; + foldr__ := fun {a : Type} {b : Type} => Foldable__UInt_foldr ; + foldr'__ := fun {a : Type} {b : Type} => Foldable__UInt_foldr' ; + length__ := fun {a : Type} => Foldable__UInt_length ; + null__ := fun {a : Type} => Foldable__UInt_null ; + product__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__UInt_product ; + sum__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__UInt_sum ; + toList__ := fun {a : Type} => Foldable__UInt_toList |}. + +#[local] Definition Foldable__UFloat_foldMap + : forall {m : Type}, + forall {a : Type}, + forall `{GHC.Base.Monoid m}, (a -> m) -> GHC.Generics.UFloat a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | f, GHC.Generics.UFloat a1 => GHC.Base.mempty + end. + +#[local] Definition Foldable__UFloat_fold + : forall {m : Type}, forall `{GHC.Base.Monoid m}, GHC.Generics.UFloat m -> m := + fun {m : Type} `{GHC.Base.Monoid m} => Foldable__UFloat_foldMap GHC.Base.id. + +#[local] Definition Foldable__UFloat_foldr + : forall {a : Type}, + forall {b : Type}, (a -> b -> b) -> b -> GHC.Generics.UFloat a -> b := + fun {a : Type} {b : Type} => + fun arg_0__ arg_1__ arg_2__ => + match arg_0__, arg_1__, arg_2__ with + | f, z, GHC.Generics.UFloat a1 => z + end. + +#[local] Definition Foldable__UFloat_foldl' + : forall {b : Type}, + forall {a : Type}, (b -> a -> b) -> b -> GHC.Generics.UFloat a -> b := + fun {b : Type} {a : Type} => + fun f z0 xs => + let f' := fun x k z => k (f z x) in Foldable__UFloat_foldr f' GHC.Base.id xs z0. + +#[local] Definition Foldable__UFloat_foldMap' + : forall {m : Type}, + forall {a : Type}, + forall `{GHC.Base.Monoid m}, (a -> m) -> GHC.Generics.UFloat a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun f => + Foldable__UFloat_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. + +#[local] Definition Foldable__UFloat_foldl + : forall {b : Type}, + forall {a : Type}, (b -> a -> b) -> b -> GHC.Generics.UFloat a -> b := + fun {b : Type} {a : Type} => + fun f z t => + Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual + (Foldable__UFloat_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ + (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ + GHC.Base.flip f)) t)) z. + +#[local] Definition Foldable__UFloat_foldr' + : forall {a : Type}, + forall {b : Type}, (a -> b -> b) -> b -> GHC.Generics.UFloat a -> b := + fun {a : Type} {b : Type} => + fun f z0 xs => + let f' := fun k x z => k (f x z) in Foldable__UFloat_foldl f' GHC.Base.id xs z0. + +#[local] Definition Foldable__UFloat_length + : forall {a : Type}, GHC.Generics.UFloat a -> GHC.Num.Int := + fun {a : Type} => + Foldable__UFloat_foldl' (fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | c, _ => c GHC.Num.+ #1 + end) #0. + +#[local] Definition Foldable__UFloat_null + : forall {a : Type}, GHC.Generics.UFloat a -> bool := + fun {a : Type} => fun '(GHC.Generics.UFloat a1) => true. + +#[local] Definition Foldable__UFloat_product + : forall {a : Type}, forall `{GHC.Num.Num a}, GHC.Generics.UFloat a -> a := + fun {a : Type} `{GHC.Num.Num a} => + Coq.Program.Basics.compose Data.SemigroupInternal.getProduct + (Foldable__UFloat_foldMap Data.SemigroupInternal.Mk_Product). + +#[local] Definition Foldable__UFloat_sum + : forall {a : Type}, forall `{GHC.Num.Num a}, GHC.Generics.UFloat a -> a := + fun {a : Type} `{GHC.Num.Num a} => + Coq.Program.Basics.compose Data.SemigroupInternal.getSum + (Foldable__UFloat_foldMap Data.SemigroupInternal.Mk_Sum). + +#[local] Definition Foldable__UFloat_toList + : forall {a : Type}, GHC.Generics.UFloat a -> list a := + fun {a : Type} => + fun t => GHC.Base.build' (fun _ => (fun c n => Foldable__UFloat_foldr c n t)). + +#[global] +Program Instance Foldable__UFloat : Foldable GHC.Generics.UFloat := + fun _ k__ => + k__ {| fold__ := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__UFloat_fold ; + foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__UFloat_foldMap ; + foldMap'__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__UFloat_foldMap' ; + foldl__ := fun {b : Type} {a : Type} => Foldable__UFloat_foldl ; + foldl'__ := fun {b : Type} {a : Type} => Foldable__UFloat_foldl' ; + foldr__ := fun {a : Type} {b : Type} => Foldable__UFloat_foldr ; + foldr'__ := fun {a : Type} {b : Type} => Foldable__UFloat_foldr' ; + length__ := fun {a : Type} => Foldable__UFloat_length ; + null__ := fun {a : Type} => Foldable__UFloat_null ; + product__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__UFloat_product ; + sum__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__UFloat_sum ; + toList__ := fun {a : Type} => Foldable__UFloat_toList |}. + +#[local] Definition Foldable__UDouble_foldMap + : forall {m : Type}, + forall {a : Type}, + forall `{GHC.Base.Monoid m}, (a -> m) -> GHC.Generics.UDouble a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | f, GHC.Generics.UDouble a1 => GHC.Base.mempty + end. + +#[local] Definition Foldable__UDouble_fold + : forall {m : Type}, + forall `{GHC.Base.Monoid m}, GHC.Generics.UDouble m -> m := + fun {m : Type} `{GHC.Base.Monoid m} => Foldable__UDouble_foldMap GHC.Base.id. + +#[local] Definition Foldable__UDouble_foldr + : forall {a : Type}, + forall {b : Type}, (a -> b -> b) -> b -> GHC.Generics.UDouble a -> b := + fun {a : Type} {b : Type} => + fun arg_0__ arg_1__ arg_2__ => + match arg_0__, arg_1__, arg_2__ with + | f, z, GHC.Generics.UDouble a1 => z + end. + +#[local] Definition Foldable__UDouble_foldl' + : forall {b : Type}, + forall {a : Type}, (b -> a -> b) -> b -> GHC.Generics.UDouble a -> b := + fun {b : Type} {a : Type} => + fun f z0 xs => + let f' := fun x k z => k (f z x) in + Foldable__UDouble_foldr f' GHC.Base.id xs z0. + +#[local] Definition Foldable__UDouble_foldMap' + : forall {m : Type}, + forall {a : Type}, + forall `{GHC.Base.Monoid m}, (a -> m) -> GHC.Generics.UDouble a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun f => + Foldable__UDouble_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. + +#[local] Definition Foldable__UDouble_foldl + : forall {b : Type}, + forall {a : Type}, (b -> a -> b) -> b -> GHC.Generics.UDouble a -> b := + fun {b : Type} {a : Type} => + fun f z t => + Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual + (Foldable__UDouble_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ + (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ + GHC.Base.flip f)) t)) z. + +#[local] Definition Foldable__UDouble_foldr' + : forall {a : Type}, + forall {b : Type}, (a -> b -> b) -> b -> GHC.Generics.UDouble a -> b := + fun {a : Type} {b : Type} => + fun f z0 xs => + let f' := fun k x z => k (f x z) in + Foldable__UDouble_foldl f' GHC.Base.id xs z0. + +#[local] Definition Foldable__UDouble_length + : forall {a : Type}, GHC.Generics.UDouble a -> GHC.Num.Int := + fun {a : Type} => + Foldable__UDouble_foldl' (fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | c, _ => c GHC.Num.+ #1 + end) #0. + +#[local] Definition Foldable__UDouble_null + : forall {a : Type}, GHC.Generics.UDouble a -> bool := + fun {a : Type} => fun '(GHC.Generics.UDouble a1) => true. + +#[local] Definition Foldable__UDouble_product + : forall {a : Type}, forall `{GHC.Num.Num a}, GHC.Generics.UDouble a -> a := + fun {a : Type} `{GHC.Num.Num a} => + Coq.Program.Basics.compose Data.SemigroupInternal.getProduct + (Foldable__UDouble_foldMap Data.SemigroupInternal.Mk_Product). + +#[local] Definition Foldable__UDouble_sum + : forall {a : Type}, forall `{GHC.Num.Num a}, GHC.Generics.UDouble a -> a := + fun {a : Type} `{GHC.Num.Num a} => + Coq.Program.Basics.compose Data.SemigroupInternal.getSum + (Foldable__UDouble_foldMap Data.SemigroupInternal.Mk_Sum). + +#[local] Definition Foldable__UDouble_toList + : forall {a : Type}, GHC.Generics.UDouble a -> list a := + fun {a : Type} => + fun t => GHC.Base.build' (fun _ => (fun c n => Foldable__UDouble_foldr c n t)). + +#[global] +Program Instance Foldable__UDouble : Foldable GHC.Generics.UDouble := + fun _ k__ => + k__ {| fold__ := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__UDouble_fold ; + foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__UDouble_foldMap ; + foldMap'__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__UDouble_foldMap' ; + foldl__ := fun {b : Type} {a : Type} => Foldable__UDouble_foldl ; + foldl'__ := fun {b : Type} {a : Type} => Foldable__UDouble_foldl' ; + foldr__ := fun {a : Type} {b : Type} => Foldable__UDouble_foldr ; + foldr'__ := fun {a : Type} {b : Type} => Foldable__UDouble_foldr' ; + length__ := fun {a : Type} => Foldable__UDouble_length ; + null__ := fun {a : Type} => Foldable__UDouble_null ; + product__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__UDouble_product ; + sum__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__UDouble_sum ; + toList__ := fun {a : Type} => Foldable__UDouble_toList |}. + +#[local] Definition Foldable__UChar_foldMap + : forall {m : Type}, + forall {a : Type}, + forall `{GHC.Base.Monoid m}, (a -> m) -> GHC.Generics.UChar a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | f, GHC.Generics.UChar a1 => GHC.Base.mempty + end. + +#[local] Definition Foldable__UChar_fold + : forall {m : Type}, forall `{GHC.Base.Monoid m}, GHC.Generics.UChar m -> m := + fun {m : Type} `{GHC.Base.Monoid m} => Foldable__UChar_foldMap GHC.Base.id. + +#[local] Definition Foldable__UChar_foldr + : forall {a : Type}, + forall {b : Type}, (a -> b -> b) -> b -> GHC.Generics.UChar a -> b := + fun {a : Type} {b : Type} => + fun arg_0__ arg_1__ arg_2__ => + match arg_0__, arg_1__, arg_2__ with + | f, z, GHC.Generics.UChar a1 => z + end. + +#[local] Definition Foldable__UChar_foldl' + : forall {b : Type}, + forall {a : Type}, (b -> a -> b) -> b -> GHC.Generics.UChar a -> b := + fun {b : Type} {a : Type} => + fun f z0 xs => + let f' := fun x k z => k (f z x) in Foldable__UChar_foldr f' GHC.Base.id xs z0. + +#[local] Definition Foldable__UChar_foldMap' + : forall {m : Type}, + forall {a : Type}, + forall `{GHC.Base.Monoid m}, (a -> m) -> GHC.Generics.UChar a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun f => + Foldable__UChar_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. + +#[local] Definition Foldable__UChar_foldl + : forall {b : Type}, + forall {a : Type}, (b -> a -> b) -> b -> GHC.Generics.UChar a -> b := + fun {b : Type} {a : Type} => + fun f z t => + Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual + (Foldable__UChar_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ + (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ + GHC.Base.flip f)) t)) z. + +#[local] Definition Foldable__UChar_foldr' + : forall {a : Type}, + forall {b : Type}, (a -> b -> b) -> b -> GHC.Generics.UChar a -> b := + fun {a : Type} {b : Type} => + fun f z0 xs => + let f' := fun k x z => k (f x z) in Foldable__UChar_foldl f' GHC.Base.id xs z0. + +#[local] Definition Foldable__UChar_length + : forall {a : Type}, GHC.Generics.UChar a -> GHC.Num.Int := + fun {a : Type} => + Foldable__UChar_foldl' (fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | c, _ => c GHC.Num.+ #1 + end) #0. + +#[local] Definition Foldable__UChar_null + : forall {a : Type}, GHC.Generics.UChar a -> bool := + fun {a : Type} => fun '(GHC.Generics.UChar a1) => true. + +#[local] Definition Foldable__UChar_product + : forall {a : Type}, forall `{GHC.Num.Num a}, GHC.Generics.UChar a -> a := + fun {a : Type} `{GHC.Num.Num a} => + Coq.Program.Basics.compose Data.SemigroupInternal.getProduct + (Foldable__UChar_foldMap Data.SemigroupInternal.Mk_Product). + +#[local] Definition Foldable__UChar_sum + : forall {a : Type}, forall `{GHC.Num.Num a}, GHC.Generics.UChar a -> a := + fun {a : Type} `{GHC.Num.Num a} => + Coq.Program.Basics.compose Data.SemigroupInternal.getSum + (Foldable__UChar_foldMap Data.SemigroupInternal.Mk_Sum). + +#[local] Definition Foldable__UChar_toList + : forall {a : Type}, GHC.Generics.UChar a -> list a := + fun {a : Type} => + fun t => GHC.Base.build' (fun _ => (fun c n => Foldable__UChar_foldr c n t)). + +#[global] +Program Instance Foldable__UChar : Foldable GHC.Generics.UChar := + fun _ k__ => + k__ {| fold__ := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__UChar_fold ; + foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__UChar_foldMap ; + foldMap'__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__UChar_foldMap' ; + foldl__ := fun {b : Type} {a : Type} => Foldable__UChar_foldl ; + foldl'__ := fun {b : Type} {a : Type} => Foldable__UChar_foldl' ; + foldr__ := fun {a : Type} {b : Type} => Foldable__UChar_foldr ; + foldr'__ := fun {a : Type} {b : Type} => Foldable__UChar_foldr' ; + length__ := fun {a : Type} => Foldable__UChar_length ; + null__ := fun {a : Type} => Foldable__UChar_null ; + product__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__UChar_product ; + sum__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__UChar_sum ; + toList__ := fun {a : Type} => Foldable__UChar_toList |}. + +#[local] Definition Foldable__UAddr_foldMap + : forall {m : Type}, + forall {a : Type}, + forall `{GHC.Base.Monoid m}, (a -> m) -> GHC.Generics.UAddr a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | f, GHC.Generics.UAddr a1 => GHC.Base.mempty + end. + +#[local] Definition Foldable__UAddr_fold + : forall {m : Type}, forall `{GHC.Base.Monoid m}, GHC.Generics.UAddr m -> m := + fun {m : Type} `{GHC.Base.Monoid m} => Foldable__UAddr_foldMap GHC.Base.id. + +#[local] Definition Foldable__UAddr_foldr + : forall {a : Type}, + forall {b : Type}, (a -> b -> b) -> b -> GHC.Generics.UAddr a -> b := + fun {a : Type} {b : Type} => + fun arg_0__ arg_1__ arg_2__ => + match arg_0__, arg_1__, arg_2__ with + | f, z, GHC.Generics.UAddr a1 => z + end. + +#[local] Definition Foldable__UAddr_foldl' + : forall {b : Type}, + forall {a : Type}, (b -> a -> b) -> b -> GHC.Generics.UAddr a -> b := + fun {b : Type} {a : Type} => + fun f z0 xs => + let f' := fun x k z => k (f z x) in Foldable__UAddr_foldr f' GHC.Base.id xs z0. + +#[local] Definition Foldable__UAddr_foldMap' + : forall {m : Type}, + forall {a : Type}, + forall `{GHC.Base.Monoid m}, (a -> m) -> GHC.Generics.UAddr a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun f => + Foldable__UAddr_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. + +#[local] Definition Foldable__UAddr_foldl + : forall {b : Type}, + forall {a : Type}, (b -> a -> b) -> b -> GHC.Generics.UAddr a -> b := + fun {b : Type} {a : Type} => + fun f z t => + Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual + (Foldable__UAddr_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ + (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ + GHC.Base.flip f)) t)) z. -(* Converted value declarations: *) +#[local] Definition Foldable__UAddr_foldr' + : forall {a : Type}, + forall {b : Type}, (a -> b -> b) -> b -> GHC.Generics.UAddr a -> b := + fun {a : Type} {b : Type} => + fun f z0 xs => + let f' := fun k x z => k (f x z) in Foldable__UAddr_foldl f' GHC.Base.id xs z0. -(* Skipping instance `Data.Foldable.Foldable__URec__Word' of class - `Data.Foldable.Foldable' *) +#[local] Definition Foldable__UAddr_length + : forall {a : Type}, GHC.Generics.UAddr a -> GHC.Num.Int := + fun {a : Type} => + Foldable__UAddr_foldl' (fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | c, _ => c GHC.Num.+ #1 + end) #0. -(* Skipping instance `Data.Foldable.Foldable__URec__Int' of class - `Data.Foldable.Foldable' *) +#[local] Definition Foldable__UAddr_null + : forall {a : Type}, GHC.Generics.UAddr a -> bool := + fun {a : Type} => fun '(GHC.Generics.UAddr a1) => true. -(* Skipping instance `Data.Foldable.Foldable__URec__Float' of class - `Data.Foldable.Foldable' *) +#[local] Definition Foldable__UAddr_product + : forall {a : Type}, forall `{GHC.Num.Num a}, GHC.Generics.UAddr a -> a := + fun {a : Type} `{GHC.Num.Num a} => + Coq.Program.Basics.compose Data.SemigroupInternal.getProduct + (Foldable__UAddr_foldMap Data.SemigroupInternal.Mk_Product). -(* Skipping instance `Data.Foldable.Foldable__URec__Double' of class - `Data.Foldable.Foldable' *) +#[local] Definition Foldable__UAddr_sum + : forall {a : Type}, forall `{GHC.Num.Num a}, GHC.Generics.UAddr a -> a := + fun {a : Type} `{GHC.Num.Num a} => + Coq.Program.Basics.compose Data.SemigroupInternal.getSum + (Foldable__UAddr_foldMap Data.SemigroupInternal.Mk_Sum). -(* Skipping instance `Data.Foldable.Foldable__URec__Char' of class - `Data.Foldable.Foldable' *) +#[local] Definition Foldable__UAddr_toList + : forall {a : Type}, GHC.Generics.UAddr a -> list a := + fun {a : Type} => + fun t => GHC.Base.build' (fun _ => (fun c n => Foldable__UAddr_foldr c n t)). -(* Skipping instance `Data.Foldable.Foldable__URec__Ptr__unit' of class - `Data.Foldable.Foldable' *) +#[global] +Program Instance Foldable__UAddr : Foldable GHC.Generics.UAddr := + fun _ k__ => + k__ {| fold__ := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__UAddr_fold ; + foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__UAddr_foldMap ; + foldMap'__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__UAddr_foldMap' ; + foldl__ := fun {b : Type} {a : Type} => Foldable__UAddr_foldl ; + foldl'__ := fun {b : Type} {a : Type} => Foldable__UAddr_foldl' ; + foldr__ := fun {a : Type} {b : Type} => Foldable__UAddr_foldr ; + foldr'__ := fun {a : Type} {b : Type} => Foldable__UAddr_foldr' ; + length__ := fun {a : Type} => Foldable__UAddr_length ; + null__ := fun {a : Type} => Foldable__UAddr_null ; + product__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__UAddr_product ; + sum__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__UAddr_sum ; + toList__ := fun {a : Type} => Foldable__UAddr_toList |}. (* Skipping instance `Data.Foldable.Foldable__op_ZCziZC__' of class `Data.Foldable.Foldable' *) @@ -213,26 +922,17 @@ Definition default_foldable_foldr (f : Type -> Type) (* Skipping instance `Data.Foldable.Foldable__V1' of class `Data.Foldable.Foldable' *) -Local Definition Foldable__option_foldMap +#[local] Definition Foldable__option_foldMap : forall {m : Type}, forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> option a -> m := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => Data.Maybe.maybe GHC.Base.mempty. -Local Definition Foldable__option_fold +#[local] Definition Foldable__option_fold : forall {m : Type}, forall `{GHC.Base.Monoid m}, option m -> m := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__option_foldMap GHC.Base.id. -Local Definition Foldable__option_foldl - : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> option a -> b := - fun {b : Type} {a : Type} => - fun arg_0__ arg_1__ arg_2__ => - match arg_0__, arg_1__, arg_2__ with - | _, z, None => z - | f, z, Some x => f z x - end. - -Local Definition Foldable__option_foldr +#[local] Definition Foldable__option_foldr : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> option a -> b := fun {a : Type} {b : Type} => fun arg_0__ arg_1__ arg_2__ => @@ -241,19 +941,35 @@ Local Definition Foldable__option_foldr | f, z, Some x => f x z end. -Local Definition Foldable__option_foldl' +#[local] Definition Foldable__option_foldl' : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> option a -> b := fun {b : Type} {a : Type} => fun f z0 xs => let f' := fun x k z => k (f z x) in Foldable__option_foldr f' GHC.Base.id xs z0. -Local Definition Foldable__option_foldr' +#[local] Definition Foldable__option_foldMap' + : forall {m : Type}, + forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> option a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun f => + Foldable__option_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. + +#[local] Definition Foldable__option_foldl + : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> option a -> b := + fun {b : Type} {a : Type} => + fun arg_0__ arg_1__ arg_2__ => + match arg_0__, arg_1__, arg_2__ with + | _, z, None => z + | f, z, Some x => f z x + end. + +#[local] Definition Foldable__option_foldr' : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> option a -> b := fun {a : Type} {b : Type} => fun f z0 xs => let f' := fun k x z => k (f x z) in Foldable__option_foldl f' GHC.Base.id xs z0. -Local Definition Foldable__option_length +#[local] Definition Foldable__option_length : forall {a : Type}, option a -> GHC.Num.Int := fun {a : Type} => Foldable__option_foldl' (fun arg_0__ arg_1__ => @@ -261,31 +977,35 @@ Local Definition Foldable__option_length | c, _ => c GHC.Num.+ #1 end) #0. -Local Definition Foldable__option_null : forall {a : Type}, option a -> bool := +#[local] Definition Foldable__option_null + : forall {a : Type}, option a -> bool := fun {a : Type} => Foldable__option_foldr (fun arg_0__ arg_1__ => false) true. -Local Definition Foldable__option_product +#[local] Definition Foldable__option_product : forall {a : Type}, forall `{GHC.Num.Num a}, option a -> a := fun {a : Type} `{GHC.Num.Num a} => Coq.Program.Basics.compose Data.SemigroupInternal.getProduct (Foldable__option_foldMap Data.SemigroupInternal.Mk_Product). -Local Definition Foldable__option_sum +#[local] Definition Foldable__option_sum : forall {a : Type}, forall `{GHC.Num.Num a}, option a -> a := fun {a : Type} `{GHC.Num.Num a} => Coq.Program.Basics.compose Data.SemigroupInternal.getSum (Foldable__option_foldMap Data.SemigroupInternal.Mk_Sum). -Local Definition Foldable__option_toList +#[local] Definition Foldable__option_toList : forall {a : Type}, option a -> list a := fun {a : Type} => fun t => GHC.Base.build' (fun _ => (fun c n => Foldable__option_foldr c n t)). +#[global] Program Instance Foldable__option : Foldable option := fun _ k__ => k__ {| fold__ := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__option_fold ; foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => Foldable__option_foldMap ; + foldMap'__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__option_foldMap' ; foldl__ := fun {b : Type} {a : Type} => Foldable__option_foldl ; foldl'__ := fun {b : Type} {a : Type} => Foldable__option_foldl' ; foldr__ := fun {a : Type} {b : Type} => Foldable__option_foldr ; @@ -296,57 +1016,68 @@ Program Instance Foldable__option : Foldable option := sum__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__option_sum ; toList__ := fun {a : Type} => Foldable__option_toList |}. -Local Definition Foldable__list_foldr +#[local] Definition Foldable__list_foldr : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> list a -> b := fun {a : Type} {b : Type} => GHC.Base.foldr. -Local Definition Foldable__list_foldMap +#[local] Definition Foldable__list_foldMap : forall {m : Type}, forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> list a -> m := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => fun f => Foldable__list_foldr (GHC.Base.mappend GHC.Base.∘ f) GHC.Base.mempty. -Local Definition Foldable__list_fold +#[local] Definition Foldable__list_fold : forall {m : Type}, forall `{GHC.Base.Monoid m}, list m -> m := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__list_foldMap GHC.Base.id. -Local Definition Foldable__list_foldl +#[local] Definition Foldable__list_foldl' : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> list a -> b := - fun {b : Type} {a : Type} => GHC.Base.foldl. + fun {b : Type} {a : Type} => GHC.Base.foldl'. + +#[local] Definition Foldable__list_foldMap' + : forall {m : Type}, + forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> list a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun f => + Foldable__list_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. -Local Definition Foldable__list_foldl' +#[local] Definition Foldable__list_foldl : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> list a -> b := - fun {b : Type} {a : Type} => GHC.Base.foldl'. + fun {b : Type} {a : Type} => GHC.Base.foldl. -Local Definition Foldable__list_foldr' +#[local] Definition Foldable__list_foldr' : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> list a -> b := fun {a : Type} {b : Type} => fun f z0 xs => let f' := fun k x z => k (f x z) in Foldable__list_foldl f' GHC.Base.id xs z0. -Local Definition Foldable__list_length +#[local] Definition Foldable__list_length : forall {a : Type}, list a -> GHC.Num.Int := fun {a : Type} => GHC.List.length. -Local Definition Foldable__list_null : forall {a : Type}, list a -> bool := +#[local] Definition Foldable__list_null : forall {a : Type}, list a -> bool := fun {a : Type} => GHC.List.null. -Local Definition Foldable__list_product +#[local] Definition Foldable__list_product : forall {a : Type}, forall `{GHC.Num.Num a}, list a -> a := fun {a : Type} `{GHC.Num.Num a} => GHC.List.product. -Local Definition Foldable__list_sum +#[local] Definition Foldable__list_sum : forall {a : Type}, forall `{GHC.Num.Num a}, list a -> a := fun {a : Type} `{GHC.Num.Num a} => GHC.List.sum. -Local Definition Foldable__list_toList : forall {a : Type}, list a -> list a := +#[local] Definition Foldable__list_toList + : forall {a : Type}, list a -> list a := fun {a : Type} => GHC.Base.id. +#[global] Program Instance Foldable__list : Foldable list := fun _ k__ => k__ {| fold__ := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__list_fold ; foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => Foldable__list_foldMap ; + foldMap'__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__list_foldMap' ; foldl__ := fun {b : Type} {a : Type} => Foldable__list_foldl ; foldl'__ := fun {b : Type} {a : Type} => Foldable__list_foldl' ; foldr__ := fun {a : Type} {b : Type} => Foldable__list_foldr ; @@ -357,12 +1088,12 @@ Program Instance Foldable__list : Foldable list := sum__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__list_sum ; toList__ := fun {a : Type} => Foldable__list_toList |}. -Local Definition Foldable__NonEmpty_fold +#[local] Definition Foldable__NonEmpty_fold : forall {m : Type}, forall `{GHC.Base.Monoid m}, GHC.Base.NonEmpty m -> m := fun {m : Type} `{GHC.Base.Monoid m} => fun '(GHC.Base.NEcons m ms) => GHC.Base.mappend m (fold ms). -Local Definition Foldable__NonEmpty_foldMap +#[local] Definition Foldable__NonEmpty_foldMap : forall {m : Type}, forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> GHC.Base.NonEmpty a -> m := @@ -372,16 +1103,7 @@ Local Definition Foldable__NonEmpty_foldMap | f, GHC.Base.NEcons a as_ => GHC.Base.mappend (f a) (foldMap f as_) end. -Local Definition Foldable__NonEmpty_foldl - : forall {b : Type}, - forall {a : Type}, (b -> a -> b) -> b -> GHC.Base.NonEmpty a -> b := - fun {b : Type} {a : Type} => - fun arg_0__ arg_1__ arg_2__ => - match arg_0__, arg_1__, arg_2__ with - | f, z, GHC.Base.NEcons a as_ => GHC.Base.foldl f (f z a) as_ - end. - -Local Definition Foldable__NonEmpty_foldr +#[local] Definition Foldable__NonEmpty_foldr : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> GHC.Base.NonEmpty a -> b := fun {a : Type} {b : Type} => @@ -390,7 +1112,7 @@ Local Definition Foldable__NonEmpty_foldr | f, z, GHC.Base.NEcons a as_ => f a (GHC.Base.foldr f z as_) end. -Local Definition Foldable__NonEmpty_foldl' +#[local] Definition Foldable__NonEmpty_foldl' : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> GHC.Base.NonEmpty a -> b := fun {b : Type} {a : Type} => @@ -398,7 +1120,24 @@ Local Definition Foldable__NonEmpty_foldl' let f' := fun x k z => k (f z x) in Foldable__NonEmpty_foldr f' GHC.Base.id xs z0. -Local Definition Foldable__NonEmpty_foldr' +#[local] Definition Foldable__NonEmpty_foldMap' + : forall {m : Type}, + forall {a : Type}, + forall `{GHC.Base.Monoid m}, (a -> m) -> GHC.Base.NonEmpty a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun f => + Foldable__NonEmpty_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. + +#[local] Definition Foldable__NonEmpty_foldl + : forall {b : Type}, + forall {a : Type}, (b -> a -> b) -> b -> GHC.Base.NonEmpty a -> b := + fun {b : Type} {a : Type} => + fun arg_0__ arg_1__ arg_2__ => + match arg_0__, arg_1__, arg_2__ with + | f, z, GHC.Base.NEcons a as_ => GHC.Base.foldl f (f z a) as_ + end. + +#[local] Definition Foldable__NonEmpty_foldr' : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> GHC.Base.NonEmpty a -> b := fun {a : Type} {b : Type} => @@ -406,37 +1145,43 @@ Local Definition Foldable__NonEmpty_foldr' let f' := fun k x z => k (f x z) in Foldable__NonEmpty_foldl f' GHC.Base.id xs z0. -Local Definition Foldable__NonEmpty_length +#[local] Definition Foldable__NonEmpty_length : forall {a : Type}, GHC.Base.NonEmpty a -> GHC.Num.Int := fun {a : Type} => - fun '(GHC.Base.NEcons _ as_) => #1 GHC.Num.+ GHC.List.length as_. + Foldable__NonEmpty_foldl' (fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | c, _ => c GHC.Num.+ #1 + end) #0. -Local Definition Foldable__NonEmpty_null +#[local] Definition Foldable__NonEmpty_null : forall {a : Type}, GHC.Base.NonEmpty a -> bool := fun {a : Type} => Foldable__NonEmpty_foldr (fun arg_0__ arg_1__ => false) true. -Local Definition Foldable__NonEmpty_product +#[local] Definition Foldable__NonEmpty_product : forall {a : Type}, forall `{GHC.Num.Num a}, GHC.Base.NonEmpty a -> a := fun {a : Type} `{GHC.Num.Num a} => Coq.Program.Basics.compose Data.SemigroupInternal.getProduct (Foldable__NonEmpty_foldMap Data.SemigroupInternal.Mk_Product). -Local Definition Foldable__NonEmpty_sum +#[local] Definition Foldable__NonEmpty_sum : forall {a : Type}, forall `{GHC.Num.Num a}, GHC.Base.NonEmpty a -> a := fun {a : Type} `{GHC.Num.Num a} => Coq.Program.Basics.compose Data.SemigroupInternal.getSum (Foldable__NonEmpty_foldMap Data.SemigroupInternal.Mk_Sum). -Local Definition Foldable__NonEmpty_toList +#[local] Definition Foldable__NonEmpty_toList : forall {a : Type}, GHC.Base.NonEmpty a -> list a := fun {a : Type} => fun '(GHC.Base.NEcons a as_) => cons a as_. +#[global] Program Instance Foldable__NonEmpty : Foldable GHC.Base.NonEmpty := fun _ k__ => k__ {| fold__ := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__NonEmpty_fold ; foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => Foldable__NonEmpty_foldMap ; + foldMap'__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__NonEmpty_foldMap' ; foldl__ := fun {b : Type} {a : Type} => Foldable__NonEmpty_foldl ; foldl'__ := fun {b : Type} {a : Type} => Foldable__NonEmpty_foldl' ; foldr__ := fun {a : Type} {b : Type} => Foldable__NonEmpty_foldr ; @@ -447,7 +1192,7 @@ Program Instance Foldable__NonEmpty : Foldable GHC.Base.NonEmpty := sum__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__NonEmpty_sum ; toList__ := fun {a : Type} => Foldable__NonEmpty_toList |}. -Local Definition Foldable__Either_foldMap {inst_a : Type} +#[local] Definition Foldable__Either_foldMap {inst_a : Type} : forall {m : Type}, forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> Data.Either.Either inst_a a -> m := @@ -458,22 +1203,12 @@ Local Definition Foldable__Either_foldMap {inst_a : Type} | f, Data.Either.Right y => f y end. -Local Definition Foldable__Either_fold {inst_a : Type} +#[local] Definition Foldable__Either_fold {inst_a : Type} : forall {m : Type}, forall `{GHC.Base.Monoid m}, Data.Either.Either inst_a m -> m := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Either_foldMap GHC.Base.id. -Local Definition Foldable__Either_foldl {inst_a : Type} - : forall {b : Type}, - forall {a : Type}, (b -> a -> b) -> b -> Data.Either.Either inst_a a -> b := - fun {b : Type} {a : Type} => - fun f z t => - Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual - (Foldable__Either_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ - (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ - GHC.Base.flip f)) t)) z. - -Local Definition Foldable__Either_foldr {inst_a : Type} +#[local] Definition Foldable__Either_foldr {inst_a : Type} : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> Data.Either.Either inst_a a -> b := fun {a : Type} {b : Type} => @@ -483,21 +1218,39 @@ Local Definition Foldable__Either_foldr {inst_a : Type} | f, z, Data.Either.Right y => f y z end. -Local Definition Foldable__Either_foldl' {inst_a : Type} +#[local] Definition Foldable__Either_foldl' {inst_a : Type} : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> Data.Either.Either inst_a a -> b := fun {b : Type} {a : Type} => fun f z0 xs => let f' := fun x k z => k (f z x) in Foldable__Either_foldr f' GHC.Base.id xs z0. -Local Definition Foldable__Either_foldr' {inst_a : Type} +#[local] Definition Foldable__Either_foldMap' {inst_a : Type} + : forall {m : Type}, + forall {a : Type}, + forall `{GHC.Base.Monoid m}, (a -> m) -> Data.Either.Either inst_a a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun f => + Foldable__Either_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. + +#[local] Definition Foldable__Either_foldl {inst_a : Type} + : forall {b : Type}, + forall {a : Type}, (b -> a -> b) -> b -> Data.Either.Either inst_a a -> b := + fun {b : Type} {a : Type} => + fun f z t => + Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual + (Foldable__Either_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ + (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ + GHC.Base.flip f)) t)) z. + +#[local] Definition Foldable__Either_foldr' {inst_a : Type} : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> Data.Either.Either inst_a a -> b := fun {a : Type} {b : Type} => fun f z0 xs => let f' := fun k x z => k (f x z) in Foldable__Either_foldl f' GHC.Base.id xs z0. -Local Definition Foldable__Either_length {inst_a : Type} +#[local] Definition Foldable__Either_length {inst_a : Type} : forall {a : Type}, Data.Either.Either inst_a a -> GHC.Num.Int := fun {a : Type} => fun arg_0__ => @@ -506,35 +1259,38 @@ Local Definition Foldable__Either_length {inst_a : Type} | Data.Either.Right _ => #1 end. -Local Definition Foldable__Either_null {inst_a : Type} +#[local] Definition Foldable__Either_null {inst_a : Type} : forall {a : Type}, Data.Either.Either inst_a a -> bool := fun {a : Type} => Data.Either.isLeft. -Local Definition Foldable__Either_product {inst_a : Type} +#[local] Definition Foldable__Either_product {inst_a : Type} : forall {a : Type}, forall `{GHC.Num.Num a}, Data.Either.Either inst_a a -> a := fun {a : Type} `{GHC.Num.Num a} => Coq.Program.Basics.compose Data.SemigroupInternal.getProduct (Foldable__Either_foldMap Data.SemigroupInternal.Mk_Product). -Local Definition Foldable__Either_sum {inst_a : Type} +#[local] Definition Foldable__Either_sum {inst_a : Type} : forall {a : Type}, forall `{GHC.Num.Num a}, Data.Either.Either inst_a a -> a := fun {a : Type} `{GHC.Num.Num a} => Coq.Program.Basics.compose Data.SemigroupInternal.getSum (Foldable__Either_foldMap Data.SemigroupInternal.Mk_Sum). -Local Definition Foldable__Either_toList {inst_a : Type} +#[local] Definition Foldable__Either_toList {inst_a : Type} : forall {a : Type}, Data.Either.Either inst_a a -> list a := fun {a : Type} => fun t => GHC.Base.build' (fun _ => (fun c n => Foldable__Either_foldr c n t)). +#[global] Program Instance Foldable__Either {a : Type} : Foldable (Data.Either.Either a) := fun _ k__ => k__ {| fold__ := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Either_fold ; foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => Foldable__Either_foldMap ; + foldMap'__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__Either_foldMap' ; foldl__ := fun {b : Type} {a : Type} => Foldable__Either_foldl ; foldl'__ := fun {b : Type} {a : Type} => Foldable__Either_foldl' ; foldr__ := fun {a : Type} {b : Type} => Foldable__Either_foldr ; @@ -545,29 +1301,19 @@ Program Instance Foldable__Either {a : Type} sum__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__Either_sum ; toList__ := fun {a : Type} => Foldable__Either_toList |}. -Local Definition Foldable__pair_type_foldMap {inst_a : Type} +#[local] Definition Foldable__pair_type_foldMap {inst_a : Type} : forall {m : Type}, forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> GHC.Tuple.pair_type inst_a a -> m := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => fun arg_0__ arg_1__ => match arg_0__, arg_1__ with | f, pair _ y => f y end. -Local Definition Foldable__pair_type_fold {inst_a : Type} +#[local] Definition Foldable__pair_type_fold {inst_a : Type} : forall {m : Type}, forall `{GHC.Base.Monoid m}, GHC.Tuple.pair_type inst_a m -> m := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__pair_type_foldMap GHC.Base.id. -Local Definition Foldable__pair_type_foldl {inst_a : Type} - : forall {b : Type}, - forall {a : Type}, (b -> a -> b) -> b -> GHC.Tuple.pair_type inst_a a -> b := - fun {b : Type} {a : Type} => - fun f z t => - Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual - (Foldable__pair_type_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ - (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ - GHC.Base.flip f)) t)) z. - -Local Definition Foldable__pair_type_foldr {inst_a : Type} +#[local] Definition Foldable__pair_type_foldr {inst_a : Type} : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> GHC.Tuple.pair_type inst_a a -> b := fun {a : Type} {b : Type} => @@ -576,7 +1322,7 @@ Local Definition Foldable__pair_type_foldr {inst_a : Type} | f, z, pair _ y => f y z end. -Local Definition Foldable__pair_type_foldl' {inst_a : Type} +#[local] Definition Foldable__pair_type_foldl' {inst_a : Type} : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> GHC.Tuple.pair_type inst_a a -> b := fun {b : Type} {a : Type} => @@ -584,7 +1330,25 @@ Local Definition Foldable__pair_type_foldl' {inst_a : Type} let f' := fun x k z => k (f z x) in Foldable__pair_type_foldr f' GHC.Base.id xs z0. -Local Definition Foldable__pair_type_foldr' {inst_a : Type} +#[local] Definition Foldable__pair_type_foldMap' {inst_a : Type} + : forall {m : Type}, + forall {a : Type}, + forall `{GHC.Base.Monoid m}, (a -> m) -> GHC.Tuple.pair_type inst_a a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun f => + Foldable__pair_type_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. + +#[local] Definition Foldable__pair_type_foldl {inst_a : Type} + : forall {b : Type}, + forall {a : Type}, (b -> a -> b) -> b -> GHC.Tuple.pair_type inst_a a -> b := + fun {b : Type} {a : Type} => + fun f z t => + Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual + (Foldable__pair_type_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ + (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ + GHC.Base.flip f)) t)) z. + +#[local] Definition Foldable__pair_type_foldr' {inst_a : Type} : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> GHC.Tuple.pair_type inst_a a -> b := fun {a : Type} {b : Type} => @@ -592,38 +1356,35 @@ Local Definition Foldable__pair_type_foldr' {inst_a : Type} let f' := fun k x z => k (f x z) in Foldable__pair_type_foldl f' GHC.Base.id xs z0. -Local Definition Foldable__pair_type_length {inst_a : Type} +#[local] Definition Foldable__pair_type_length {inst_a : Type} : forall {a : Type}, GHC.Tuple.pair_type inst_a a -> GHC.Num.Int := - fun {a : Type} => - Foldable__pair_type_foldl' (fun arg_0__ arg_1__ => - match arg_0__, arg_1__ with - | c, _ => c GHC.Num.+ #1 - end) #0. + fun {a : Type} => fun arg_0__ => #1. -Local Definition Foldable__pair_type_null {inst_a : Type} +#[local] Definition Foldable__pair_type_null {inst_a : Type} : forall {a : Type}, GHC.Tuple.pair_type inst_a a -> bool := - fun {a : Type} => Foldable__pair_type_foldr (fun arg_0__ arg_1__ => false) true. + fun {a : Type} => fun arg_0__ => false. -Local Definition Foldable__pair_type_product {inst_a : Type} +#[local] Definition Foldable__pair_type_product {inst_a : Type} : forall {a : Type}, forall `{GHC.Num.Num a}, GHC.Tuple.pair_type inst_a a -> a := fun {a : Type} `{GHC.Num.Num a} => Coq.Program.Basics.compose Data.SemigroupInternal.getProduct (Foldable__pair_type_foldMap Data.SemigroupInternal.Mk_Product). -Local Definition Foldable__pair_type_sum {inst_a : Type} +#[local] Definition Foldable__pair_type_sum {inst_a : Type} : forall {a : Type}, forall `{GHC.Num.Num a}, GHC.Tuple.pair_type inst_a a -> a := fun {a : Type} `{GHC.Num.Num a} => Coq.Program.Basics.compose Data.SemigroupInternal.getSum (Foldable__pair_type_foldMap Data.SemigroupInternal.Mk_Sum). -Local Definition Foldable__pair_type_toList {inst_a : Type} +#[local] Definition Foldable__pair_type_toList {inst_a : Type} : forall {a : Type}, GHC.Tuple.pair_type inst_a a -> list a := fun {a : Type} => fun t => GHC.Base.build' (fun _ => (fun c n => Foldable__pair_type_foldr c n t)). +#[global] Program Instance Foldable__pair_type {a : Type} : Foldable (GHC.Tuple.pair_type a) := fun _ k__ => @@ -631,6 +1392,8 @@ Program Instance Foldable__pair_type {a : Type} Foldable__pair_type_fold ; foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => Foldable__pair_type_foldMap ; + foldMap'__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__pair_type_foldMap' ; foldl__ := fun {b : Type} {a : Type} => Foldable__pair_type_foldl ; foldl'__ := fun {b : Type} {a : Type} => Foldable__pair_type_foldl' ; foldr__ := fun {a : Type} {b : Type} => Foldable__pair_type_foldr ; @@ -644,27 +1407,18 @@ Program Instance Foldable__pair_type {a : Type} (* Skipping instance `Data.Foldable.Foldable__Array' of class `Data.Foldable.Foldable' *) -Local Definition Foldable__Proxy_fold +#[local] Definition Foldable__Proxy_fold : forall {m : Type}, forall `{GHC.Base.Monoid m}, Data.Proxy.Proxy m -> m := fun {m : Type} `{GHC.Base.Monoid m} => fun arg_0__ => GHC.Base.mempty. -Local Definition Foldable__Proxy_foldMap +#[local] Definition Foldable__Proxy_foldMap : forall {m : Type}, forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> Data.Proxy.Proxy a -> m := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => fun arg_0__ arg_1__ => GHC.Base.mempty. -Local Definition Foldable__Proxy_foldl - : forall {b : Type}, - forall {a : Type}, (b -> a -> b) -> b -> Data.Proxy.Proxy a -> b := - fun {b : Type} {a : Type} => - fun arg_0__ arg_1__ arg_2__ => - match arg_0__, arg_1__, arg_2__ with - | _, z, _ => z - end. - -Local Definition Foldable__Proxy_foldr +#[local] Definition Foldable__Proxy_foldr : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> Data.Proxy.Proxy a -> b := fun {a : Type} {b : Type} => @@ -673,46 +1427,66 @@ Local Definition Foldable__Proxy_foldr | _, z, _ => z end. -Local Definition Foldable__Proxy_foldl' +#[local] Definition Foldable__Proxy_foldl' : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> Data.Proxy.Proxy a -> b := fun {b : Type} {a : Type} => fun f z0 xs => let f' := fun x k z => k (f z x) in Foldable__Proxy_foldr f' GHC.Base.id xs z0. -Local Definition Foldable__Proxy_foldr' +#[local] Definition Foldable__Proxy_foldMap' + : forall {m : Type}, + forall {a : Type}, + forall `{GHC.Base.Monoid m}, (a -> m) -> Data.Proxy.Proxy a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun f => + Foldable__Proxy_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. + +#[local] Definition Foldable__Proxy_foldl + : forall {b : Type}, + forall {a : Type}, (b -> a -> b) -> b -> Data.Proxy.Proxy a -> b := + fun {b : Type} {a : Type} => + fun arg_0__ arg_1__ arg_2__ => + match arg_0__, arg_1__, arg_2__ with + | _, z, _ => z + end. + +#[local] Definition Foldable__Proxy_foldr' : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> Data.Proxy.Proxy a -> b := fun {a : Type} {b : Type} => fun f z0 xs => let f' := fun k x z => k (f x z) in Foldable__Proxy_foldl f' GHC.Base.id xs z0. -Local Definition Foldable__Proxy_length +#[local] Definition Foldable__Proxy_length : forall {a : Type}, Data.Proxy.Proxy a -> GHC.Num.Int := fun {a : Type} => fun arg_0__ => #0. -Local Definition Foldable__Proxy_null +#[local] Definition Foldable__Proxy_null : forall {a : Type}, Data.Proxy.Proxy a -> bool := fun {a : Type} => fun arg_0__ => true. -Local Definition Foldable__Proxy_product +#[local] Definition Foldable__Proxy_product : forall {a : Type}, forall `{GHC.Num.Num a}, Data.Proxy.Proxy a -> a := fun {a : Type} `{GHC.Num.Num a} => fun arg_0__ => #1. -Local Definition Foldable__Proxy_sum +#[local] Definition Foldable__Proxy_sum : forall {a : Type}, forall `{GHC.Num.Num a}, Data.Proxy.Proxy a -> a := fun {a : Type} `{GHC.Num.Num a} => fun arg_0__ => #0. -Local Definition Foldable__Proxy_toList +#[local] Definition Foldable__Proxy_toList : forall {a : Type}, Data.Proxy.Proxy a -> list a := fun {a : Type} => fun t => GHC.Base.build' (fun _ => (fun c n => Foldable__Proxy_foldr c n t)). +#[global] Program Instance Foldable__Proxy : Foldable Data.Proxy.Proxy := fun _ k__ => k__ {| fold__ := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Proxy_fold ; foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => Foldable__Proxy_foldMap ; + foldMap'__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__Proxy_foldMap' ; foldl__ := fun {b : Type} {a : Type} => Foldable__Proxy_foldl ; foldl'__ := fun {b : Type} {a : Type} => Foldable__Proxy_foldl' ; foldr__ := fun {a : Type} {b : Type} => Foldable__Proxy_foldr ; @@ -723,28 +1497,36 @@ Program Instance Foldable__Proxy : Foldable Data.Proxy.Proxy := sum__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__Proxy_sum ; toList__ := fun {a : Type} => Foldable__Proxy_toList |}. -Local Definition Foldable__Dual_foldMap +#[local] Definition Foldable__Dual_foldMap : forall {m : Type}, forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> Data.SemigroupInternal.Dual a -> m := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => GHC.Prim.coerce. -Local Definition Foldable__Dual_fold +#[local] Definition Foldable__Dual_fold : forall {m : Type}, forall `{GHC.Base.Monoid m}, Data.SemigroupInternal.Dual m -> m := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Dual_foldMap GHC.Base.id. -Local Definition Foldable__Dual_foldl +#[local] Definition Foldable__Dual_foldl' : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> Data.SemigroupInternal.Dual a -> b := fun {b : Type} {a : Type} => GHC.Prim.coerce. -Local Definition Foldable__Dual_foldl' +#[local] Definition Foldable__Dual_foldMap' + : forall {m : Type}, + forall {a : Type}, + forall `{GHC.Base.Monoid m}, (a -> m) -> Data.SemigroupInternal.Dual a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun f => + Foldable__Dual_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. + +#[local] Definition Foldable__Dual_foldl : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> Data.SemigroupInternal.Dual a -> b := fun {b : Type} {a : Type} => GHC.Prim.coerce. -Local Definition Foldable__Dual_foldr +#[local] Definition Foldable__Dual_foldr : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> Data.SemigroupInternal.Dual a -> b := fun {a : Type} {b : Type} => @@ -753,38 +1535,41 @@ Local Definition Foldable__Dual_foldr | f, z, Data.SemigroupInternal.Mk_Dual x => f x z end. -Local Definition Foldable__Dual_foldr' +#[local] Definition Foldable__Dual_foldr' : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> Data.SemigroupInternal.Dual a -> b := fun {a : Type} {b : Type} => Foldable__Dual_foldr. -Local Definition Foldable__Dual_length +#[local] Definition Foldable__Dual_length : forall {a : Type}, Data.SemigroupInternal.Dual a -> GHC.Num.Int := fun {a : Type} => fun arg_0__ => #1. -Local Definition Foldable__Dual_null +#[local] Definition Foldable__Dual_null : forall {a : Type}, Data.SemigroupInternal.Dual a -> bool := fun {a : Type} => fun arg_0__ => false. -Local Definition Foldable__Dual_product +#[local] Definition Foldable__Dual_product : forall {a : Type}, forall `{GHC.Num.Num a}, Data.SemigroupInternal.Dual a -> a := fun {a : Type} `{GHC.Num.Num a} => Data.SemigroupInternal.getDual. -Local Definition Foldable__Dual_sum +#[local] Definition Foldable__Dual_sum : forall {a : Type}, forall `{GHC.Num.Num a}, Data.SemigroupInternal.Dual a -> a := fun {a : Type} `{GHC.Num.Num a} => Data.SemigroupInternal.getDual. -Local Definition Foldable__Dual_toList +#[local] Definition Foldable__Dual_toList : forall {a : Type}, Data.SemigroupInternal.Dual a -> list a := fun {a : Type} => fun '(Data.SemigroupInternal.Mk_Dual x) => cons x nil. +#[global] Program Instance Foldable__Dual : Foldable Data.SemigroupInternal.Dual := fun _ k__ => k__ {| fold__ := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Dual_fold ; foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => Foldable__Dual_foldMap ; + foldMap'__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__Dual_foldMap' ; foldl__ := fun {b : Type} {a : Type} => Foldable__Dual_foldl ; foldl'__ := fun {b : Type} {a : Type} => Foldable__Dual_foldl' ; foldr__ := fun {a : Type} {b : Type} => Foldable__Dual_foldr ; @@ -795,28 +1580,36 @@ Program Instance Foldable__Dual : Foldable Data.SemigroupInternal.Dual := sum__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__Dual_sum ; toList__ := fun {a : Type} => Foldable__Dual_toList |}. -Local Definition Foldable__Sum_foldMap +#[local] Definition Foldable__Sum_foldMap : forall {m : Type}, forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> Data.SemigroupInternal.Sum a -> m := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => GHC.Prim.coerce. -Local Definition Foldable__Sum_fold +#[local] Definition Foldable__Sum_fold : forall {m : Type}, forall `{GHC.Base.Monoid m}, Data.SemigroupInternal.Sum m -> m := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Sum_foldMap GHC.Base.id. -Local Definition Foldable__Sum_foldl +#[local] Definition Foldable__Sum_foldl' : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> Data.SemigroupInternal.Sum a -> b := fun {b : Type} {a : Type} => GHC.Prim.coerce. -Local Definition Foldable__Sum_foldl' +#[local] Definition Foldable__Sum_foldMap' + : forall {m : Type}, + forall {a : Type}, + forall `{GHC.Base.Monoid m}, (a -> m) -> Data.SemigroupInternal.Sum a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun f => + Foldable__Sum_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. + +#[local] Definition Foldable__Sum_foldl : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> Data.SemigroupInternal.Sum a -> b := fun {b : Type} {a : Type} => GHC.Prim.coerce. -Local Definition Foldable__Sum_foldr +#[local] Definition Foldable__Sum_foldr : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> Data.SemigroupInternal.Sum a -> b := fun {a : Type} {b : Type} => @@ -825,38 +1618,41 @@ Local Definition Foldable__Sum_foldr | f, z, Data.SemigroupInternal.Mk_Sum x => f x z end. -Local Definition Foldable__Sum_foldr' +#[local] Definition Foldable__Sum_foldr' : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> Data.SemigroupInternal.Sum a -> b := fun {a : Type} {b : Type} => Foldable__Sum_foldr. -Local Definition Foldable__Sum_length +#[local] Definition Foldable__Sum_length : forall {a : Type}, Data.SemigroupInternal.Sum a -> GHC.Num.Int := fun {a : Type} => fun arg_0__ => #1. -Local Definition Foldable__Sum_null +#[local] Definition Foldable__Sum_null : forall {a : Type}, Data.SemigroupInternal.Sum a -> bool := fun {a : Type} => fun arg_0__ => false. -Local Definition Foldable__Sum_product +#[local] Definition Foldable__Sum_product : forall {a : Type}, forall `{GHC.Num.Num a}, Data.SemigroupInternal.Sum a -> a := fun {a : Type} `{GHC.Num.Num a} => Data.SemigroupInternal.getSum. -Local Definition Foldable__Sum_sum +#[local] Definition Foldable__Sum_sum : forall {a : Type}, forall `{GHC.Num.Num a}, Data.SemigroupInternal.Sum a -> a := fun {a : Type} `{GHC.Num.Num a} => Data.SemigroupInternal.getSum. -Local Definition Foldable__Sum_toList +#[local] Definition Foldable__Sum_toList : forall {a : Type}, Data.SemigroupInternal.Sum a -> list a := fun {a : Type} => fun '(Data.SemigroupInternal.Mk_Sum x) => cons x nil. +#[global] Program Instance Foldable__Sum : Foldable Data.SemigroupInternal.Sum := fun _ k__ => k__ {| fold__ := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Sum_fold ; foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => Foldable__Sum_foldMap ; + foldMap'__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__Sum_foldMap' ; foldl__ := fun {b : Type} {a : Type} => Foldable__Sum_foldl ; foldl'__ := fun {b : Type} {a : Type} => Foldable__Sum_foldl' ; foldr__ := fun {a : Type} {b : Type} => Foldable__Sum_foldr ; @@ -867,31 +1663,40 @@ Program Instance Foldable__Sum : Foldable Data.SemigroupInternal.Sum := sum__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__Sum_sum ; toList__ := fun {a : Type} => Foldable__Sum_toList |}. -Local Definition Foldable__Product_foldMap +#[local] Definition Foldable__Product_foldMap : forall {m : Type}, forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> Data.SemigroupInternal.Product a -> m := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => GHC.Prim.coerce. -Local Definition Foldable__Product_fold +#[local] Definition Foldable__Product_fold : forall {m : Type}, forall `{GHC.Base.Monoid m}, Data.SemigroupInternal.Product m -> m := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Product_foldMap GHC.Base.id. -Local Definition Foldable__Product_foldl +#[local] Definition Foldable__Product_foldl' : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> Data.SemigroupInternal.Product a -> b := fun {b : Type} {a : Type} => GHC.Prim.coerce. -Local Definition Foldable__Product_foldl' +#[local] Definition Foldable__Product_foldMap' + : forall {m : Type}, + forall {a : Type}, + forall `{GHC.Base.Monoid m}, + (a -> m) -> Data.SemigroupInternal.Product a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun f => + Foldable__Product_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. + +#[local] Definition Foldable__Product_foldl : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> Data.SemigroupInternal.Product a -> b := fun {b : Type} {a : Type} => GHC.Prim.coerce. -Local Definition Foldable__Product_foldr +#[local] Definition Foldable__Product_foldr : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> Data.SemigroupInternal.Product a -> b := @@ -901,39 +1706,42 @@ Local Definition Foldable__Product_foldr | f, z, Data.SemigroupInternal.Mk_Product x => f x z end. -Local Definition Foldable__Product_foldr' +#[local] Definition Foldable__Product_foldr' : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> Data.SemigroupInternal.Product a -> b := fun {a : Type} {b : Type} => Foldable__Product_foldr. -Local Definition Foldable__Product_length +#[local] Definition Foldable__Product_length : forall {a : Type}, Data.SemigroupInternal.Product a -> GHC.Num.Int := fun {a : Type} => fun arg_0__ => #1. -Local Definition Foldable__Product_null +#[local] Definition Foldable__Product_null : forall {a : Type}, Data.SemigroupInternal.Product a -> bool := fun {a : Type} => fun arg_0__ => false. -Local Definition Foldable__Product_product +#[local] Definition Foldable__Product_product : forall {a : Type}, forall `{GHC.Num.Num a}, Data.SemigroupInternal.Product a -> a := fun {a : Type} `{GHC.Num.Num a} => Data.SemigroupInternal.getProduct. -Local Definition Foldable__Product_sum +#[local] Definition Foldable__Product_sum : forall {a : Type}, forall `{GHC.Num.Num a}, Data.SemigroupInternal.Product a -> a := fun {a : Type} `{GHC.Num.Num a} => Data.SemigroupInternal.getProduct. -Local Definition Foldable__Product_toList +#[local] Definition Foldable__Product_toList : forall {a : Type}, Data.SemigroupInternal.Product a -> list a := fun {a : Type} => fun '(Data.SemigroupInternal.Mk_Product x) => cons x nil. +#[global] Program Instance Foldable__Product : Foldable Data.SemigroupInternal.Product := fun _ k__ => k__ {| fold__ := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Product_fold ; foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => Foldable__Product_foldMap ; + foldMap'__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__Product_foldMap' ; foldl__ := fun {b : Type} {a : Type} => Foldable__Product_foldl ; foldl'__ := fun {b : Type} {a : Type} => Foldable__Product_foldl' ; foldr__ := fun {a : Type} {b : Type} => Foldable__Product_foldr ; @@ -950,81 +1758,314 @@ Program Instance Foldable__Product : Foldable Data.SemigroupInternal.Product := (* Skipping instance `Data.Foldable.Foldable__Last' of class `Data.Foldable.Foldable' *) +#[local] Definition Foldable__Alt_foldMap {inst_f : Type -> Type} `{(Foldable + inst_f)} + : forall {m : Type}, + forall {a : Type}, + forall `{GHC.Base.Monoid m}, + (a -> m) -> Data.SemigroupInternal.Alt inst_f a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun f => foldMap f GHC.Base.∘ Data.SemigroupInternal.getAlt. + +#[local] Definition Foldable__Alt_fold {inst_f : Type -> Type} `{(Foldable + inst_f)} + : forall {m : Type}, + forall `{GHC.Base.Monoid m}, Data.SemigroupInternal.Alt inst_f m -> m := + fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Alt_foldMap GHC.Base.id. + +#[local] Definition Foldable__Alt_foldr {inst_f : Type -> Type} `{(Foldable + inst_f)} + : forall {a : Type}, + forall {b : Type}, + (a -> b -> b) -> b -> Data.SemigroupInternal.Alt inst_f a -> b := + fun {a : Type} {b : Type} => + fun f z t => + Data.SemigroupInternal.appEndo (Foldable__Alt_foldMap + (Coq.Program.Basics.compose Data.SemigroupInternal.Mk_Endo f) t) z. + +#[local] Definition Foldable__Alt_foldl' {inst_f : Type -> Type} `{(Foldable + inst_f)} + : forall {b : Type}, + forall {a : Type}, + (b -> a -> b) -> b -> Data.SemigroupInternal.Alt inst_f a -> b := + fun {b : Type} {a : Type} => + fun f z0 xs => + let f' := fun x k z => k (f z x) in Foldable__Alt_foldr f' GHC.Base.id xs z0. + +#[local] Definition Foldable__Alt_foldMap' {inst_f : Type -> Type} `{(Foldable + inst_f)} + : forall {m : Type}, + forall {a : Type}, + forall `{GHC.Base.Monoid m}, + (a -> m) -> Data.SemigroupInternal.Alt inst_f a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun f => + Foldable__Alt_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. + +#[local] Definition Foldable__Alt_foldl {inst_f : Type -> Type} `{(Foldable + inst_f)} + : forall {b : Type}, + forall {a : Type}, + (b -> a -> b) -> b -> Data.SemigroupInternal.Alt inst_f a -> b := + fun {b : Type} {a : Type} => + fun f z t => + Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual + (Foldable__Alt_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ + (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ + GHC.Base.flip f)) t)) z. + +#[local] Definition Foldable__Alt_foldr' {inst_f : Type -> Type} `{(Foldable + inst_f)} + : forall {a : Type}, + forall {b : Type}, + (a -> b -> b) -> b -> Data.SemigroupInternal.Alt inst_f a -> b := + fun {a : Type} {b : Type} => + fun f z0 xs => + let f' := fun k x z => k (f x z) in Foldable__Alt_foldl f' GHC.Base.id xs z0. + +#[local] Definition Foldable__Alt_length {inst_f : Type -> Type} `{(Foldable + inst_f)} + : forall {a : Type}, Data.SemigroupInternal.Alt inst_f a -> GHC.Num.Int := + fun {a : Type} => + Foldable__Alt_foldl' (fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | c, _ => c GHC.Num.+ #1 + end) #0. + +#[local] Definition Foldable__Alt_null {inst_f : Type -> Type} `{(Foldable + inst_f)} + : forall {a : Type}, Data.SemigroupInternal.Alt inst_f a -> bool := + fun {a : Type} => Foldable__Alt_foldr (fun arg_0__ arg_1__ => false) true. + +#[local] Definition Foldable__Alt_product {inst_f : Type -> Type} `{(Foldable + inst_f)} + : forall {a : Type}, + forall `{GHC.Num.Num a}, Data.SemigroupInternal.Alt inst_f a -> a := + fun {a : Type} `{GHC.Num.Num a} => + Coq.Program.Basics.compose Data.SemigroupInternal.getProduct + (Foldable__Alt_foldMap Data.SemigroupInternal.Mk_Product). + +#[local] Definition Foldable__Alt_sum {inst_f : Type -> Type} `{(Foldable + inst_f)} + : forall {a : Type}, + forall `{GHC.Num.Num a}, Data.SemigroupInternal.Alt inst_f a -> a := + fun {a : Type} `{GHC.Num.Num a} => + Coq.Program.Basics.compose Data.SemigroupInternal.getSum (Foldable__Alt_foldMap + Data.SemigroupInternal.Mk_Sum). + +#[local] Definition Foldable__Alt_toList {inst_f : Type -> Type} `{(Foldable + inst_f)} + : forall {a : Type}, Data.SemigroupInternal.Alt inst_f a -> list a := + fun {a : Type} => + fun t => GHC.Base.build' (fun _ => (fun c n => Foldable__Alt_foldr c n t)). + +#[global] +Program Instance Foldable__Alt {f : Type -> Type} `{(Foldable f)} + : Foldable (Data.SemigroupInternal.Alt f) := + fun _ k__ => + k__ {| fold__ := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Alt_fold ; + foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__Alt_foldMap ; + foldMap'__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__Alt_foldMap' ; + foldl__ := fun {b : Type} {a : Type} => Foldable__Alt_foldl ; + foldl'__ := fun {b : Type} {a : Type} => Foldable__Alt_foldl' ; + foldr__ := fun {a : Type} {b : Type} => Foldable__Alt_foldr ; + foldr'__ := fun {a : Type} {b : Type} => Foldable__Alt_foldr' ; + length__ := fun {a : Type} => Foldable__Alt_length ; + null__ := fun {a : Type} => Foldable__Alt_null ; + product__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__Alt_product ; + sum__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__Alt_sum ; + toList__ := fun {a : Type} => Foldable__Alt_toList |}. + +#[local] Definition Foldable__Ap_foldMap {inst_f : Type -> Type} `{(Foldable + inst_f)} + : forall {m : Type}, + forall {a : Type}, + forall `{GHC.Base.Monoid m}, (a -> m) -> Data.Monoid.Ap inst_f a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun f => foldMap f GHC.Base.∘ Data.Monoid.getAp. + +#[local] Definition Foldable__Ap_fold {inst_f : Type -> Type} `{(Foldable + inst_f)} + : forall {m : Type}, + forall `{GHC.Base.Monoid m}, Data.Monoid.Ap inst_f m -> m := + fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Ap_foldMap GHC.Base.id. + +#[local] Definition Foldable__Ap_foldr {inst_f : Type -> Type} `{(Foldable + inst_f)} + : forall {a : Type}, + forall {b : Type}, (a -> b -> b) -> b -> Data.Monoid.Ap inst_f a -> b := + fun {a : Type} {b : Type} => + fun f z t => + Data.SemigroupInternal.appEndo (Foldable__Ap_foldMap (Coq.Program.Basics.compose + Data.SemigroupInternal.Mk_Endo f) t) z. + +#[local] Definition Foldable__Ap_foldl' {inst_f : Type -> Type} `{(Foldable + inst_f)} + : forall {b : Type}, + forall {a : Type}, (b -> a -> b) -> b -> Data.Monoid.Ap inst_f a -> b := + fun {b : Type} {a : Type} => + fun f z0 xs => + let f' := fun x k z => k (f z x) in Foldable__Ap_foldr f' GHC.Base.id xs z0. + +#[local] Definition Foldable__Ap_foldMap' {inst_f : Type -> Type} `{(Foldable + inst_f)} + : forall {m : Type}, + forall {a : Type}, + forall `{GHC.Base.Monoid m}, (a -> m) -> Data.Monoid.Ap inst_f a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun f => + Foldable__Ap_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. + +#[local] Definition Foldable__Ap_foldl {inst_f : Type -> Type} `{(Foldable + inst_f)} + : forall {b : Type}, + forall {a : Type}, (b -> a -> b) -> b -> Data.Monoid.Ap inst_f a -> b := + fun {b : Type} {a : Type} => + fun f z t => + Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual + (Foldable__Ap_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ + (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ + GHC.Base.flip f)) t)) z. + +#[local] Definition Foldable__Ap_foldr' {inst_f : Type -> Type} `{(Foldable + inst_f)} + : forall {a : Type}, + forall {b : Type}, (a -> b -> b) -> b -> Data.Monoid.Ap inst_f a -> b := + fun {a : Type} {b : Type} => + fun f z0 xs => + let f' := fun k x z => k (f x z) in Foldable__Ap_foldl f' GHC.Base.id xs z0. + +#[local] Definition Foldable__Ap_length {inst_f : Type -> Type} `{(Foldable + inst_f)} + : forall {a : Type}, Data.Monoid.Ap inst_f a -> GHC.Num.Int := + fun {a : Type} => + Foldable__Ap_foldl' (fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | c, _ => c GHC.Num.+ #1 + end) #0. + +#[local] Definition Foldable__Ap_null {inst_f : Type -> Type} `{(Foldable + inst_f)} + : forall {a : Type}, Data.Monoid.Ap inst_f a -> bool := + fun {a : Type} => Foldable__Ap_foldr (fun arg_0__ arg_1__ => false) true. + +#[local] Definition Foldable__Ap_product {inst_f : Type -> Type} `{(Foldable + inst_f)} + : forall {a : Type}, forall `{GHC.Num.Num a}, Data.Monoid.Ap inst_f a -> a := + fun {a : Type} `{GHC.Num.Num a} => + Coq.Program.Basics.compose Data.SemigroupInternal.getProduct + (Foldable__Ap_foldMap Data.SemigroupInternal.Mk_Product). + +#[local] Definition Foldable__Ap_sum {inst_f : Type -> Type} `{(Foldable + inst_f)} + : forall {a : Type}, forall `{GHC.Num.Num a}, Data.Monoid.Ap inst_f a -> a := + fun {a : Type} `{GHC.Num.Num a} => + Coq.Program.Basics.compose Data.SemigroupInternal.getSum (Foldable__Ap_foldMap + Data.SemigroupInternal.Mk_Sum). + +#[local] Definition Foldable__Ap_toList {inst_f : Type -> Type} `{(Foldable + inst_f)} + : forall {a : Type}, Data.Monoid.Ap inst_f a -> list a := + fun {a : Type} => + fun t => GHC.Base.build' (fun _ => (fun c n => Foldable__Ap_foldr c n t)). + +#[global] +Program Instance Foldable__Ap {f : Type -> Type} `{(Foldable f)} + : Foldable (Data.Monoid.Ap f) := + fun _ k__ => + k__ {| fold__ := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Ap_fold ; + foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__Ap_foldMap ; + foldMap'__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__Ap_foldMap' ; + foldl__ := fun {b : Type} {a : Type} => Foldable__Ap_foldl ; + foldl'__ := fun {b : Type} {a : Type} => Foldable__Ap_foldl' ; + foldr__ := fun {a : Type} {b : Type} => Foldable__Ap_foldr ; + foldr'__ := fun {a : Type} {b : Type} => Foldable__Ap_foldr' ; + length__ := fun {a : Type} => Foldable__Ap_length ; + null__ := fun {a : Type} => Foldable__Ap_null ; + product__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__Ap_product ; + sum__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__Ap_sum ; + toList__ := fun {a : Type} => Foldable__Ap_toList |}. + (* Skipping instance `Data.Foldable.Foldable__U1' of class `Data.Foldable.Foldable' *) -Definition foldrM {t : Type -> Type} {m : Type -> Type} {a : Type} {b : Type} - `{Foldable t} `{GHC.Base.Monad m} +#[global] Definition foldrM {t : Type -> Type} {m : Type -> Type} {a : Type} {b + : Type} `{Foldable t} `{GHC.Base.Monad m} : (a -> b -> m b) -> b -> t a -> m b := fun f z0 xs => - let f' := fun k x z => f x z GHC.Base.>>= k in foldl f' GHC.Base.return_ xs z0. + let c := fun k x z => f x z GHC.Base.>>= k in foldl c GHC.Base.return_ xs z0. -Definition foldlM {t : Type -> Type} {m : Type -> Type} {b : Type} {a : Type} - `{Foldable t} `{GHC.Base.Monad m} +#[global] Definition foldlM {t : Type -> Type} {m : Type -> Type} {b : Type} {a + : Type} `{Foldable t} `{GHC.Base.Monad m} : (b -> a -> m b) -> b -> t a -> m b := fun f z0 xs => - let f' := fun x k z => f z x GHC.Base.>>= k in foldr f' GHC.Base.return_ xs z0. + let c := fun x k z => f z x GHC.Base.>>= k in foldr c GHC.Base.return_ xs z0. -Definition traverse_ {t : Type -> Type} {f : Type -> Type} {a : Type} {b : Type} - `{Foldable t} `{GHC.Base.Applicative f} +#[global] Definition traverse_ {t : Type -> Type} {f : Type -> Type} {a : Type} + {b : Type} `{Foldable t} `{GHC.Base.Applicative f} : (a -> f b) -> t a -> f unit := - fun f => foldr (_GHC.Base.*>_ GHC.Base.∘ f) (GHC.Base.pure tt). + fun f => let c := fun x k => f x GHC.Base.*> k in foldr c (GHC.Base.pure tt). -Definition for__ {t : Type -> Type} {f : Type -> Type} {a : Type} {b : Type} - `{Foldable t} `{GHC.Base.Applicative f} +#[global] Definition for__ {t : Type -> Type} {f : Type -> Type} {a : Type} {b + : Type} `{Foldable t} `{GHC.Base.Applicative f} : t a -> (a -> f b) -> f unit := GHC.Base.flip traverse_. -Definition mapM_ {t : Type -> Type} {m : Type -> Type} {a : Type} {b : Type} - `{Foldable t} `{GHC.Base.Monad m} +#[global] Definition mapM_ {t : Type -> Type} {m : Type -> Type} {a : Type} {b + : Type} `{Foldable t} `{GHC.Base.Monad m} : (a -> m b) -> t a -> m unit := - fun f => foldr (_GHC.Base.>>_ GHC.Base.∘ f) (GHC.Base.return_ tt). + fun f => let c := fun x k => f x GHC.Base.>> k in foldr c (GHC.Base.return_ tt). -Definition forM_ {t : Type -> Type} {m : Type -> Type} {a : Type} {b : Type} - `{Foldable t} `{GHC.Base.Monad m} +#[global] Definition forM_ {t : Type -> Type} {m : Type -> Type} {a : Type} {b + : Type} `{Foldable t} `{GHC.Base.Monad m} : t a -> (a -> m b) -> m unit := GHC.Base.flip mapM_. -Definition sequenceA_ {t : Type -> Type} {f : Type -> Type} {a : Type} +#[global] Definition sequenceA_ {t : Type -> Type} {f : Type -> Type} {a : Type} `{Foldable t} `{GHC.Base.Applicative f} : t (f a) -> f unit := - foldr _GHC.Base.*>_ (GHC.Base.pure tt). + let c := fun m k => m GHC.Base.*> k in foldr c (GHC.Base.pure tt). -Definition sequence_ {t : Type -> Type} {m : Type -> Type} {a : Type} `{Foldable - t} `{GHC.Base.Monad m} +#[global] Definition sequence_ {t : Type -> Type} {m : Type -> Type} {a : Type} + `{Foldable t} `{GHC.Base.Monad m} : t (m a) -> m unit := - foldr _GHC.Base.>>_ (GHC.Base.return_ tt). + let c := fun m k => m GHC.Base.>> k in foldr c (GHC.Base.return_ tt). (* Skipping definition `Data.Foldable.asum' *) (* Skipping definition `Data.Foldable.msum' *) -Definition concatMap {t : Type -> Type} {a : Type} {b : Type} `{Foldable t} +#[global] Definition concatMap {t : Type -> Type} {a : Type} {b : Type} + `{Foldable t} : (a -> list b) -> t a -> list b := fun f xs => GHC.Base.build' (fun _ => (fun c n => foldr (fun x b => foldr c b (f x)) n xs)). -Definition concat {t : Type -> Type} {a : Type} `{Foldable t} +#[global] Definition concat {t : Type -> Type} {a : Type} `{Foldable t} : t (list a) -> list a := fun xs => GHC.Base.build' (fun _ => fun c n => foldr (fun x y => (@foldr _ Foldable__list _ _ c y x)) n xs). -Definition and {t : Type -> Type} `{Foldable t} : t bool -> bool := +#[global] Definition and {t : Type -> Type} `{Foldable t} : t bool -> bool := Coq.Program.Basics.compose Data.SemigroupInternal.getAll (foldMap Data.SemigroupInternal.Mk_All). -Definition or {t : Type -> Type} `{Foldable t} : t bool -> bool := +#[global] Definition or {t : Type -> Type} `{Foldable t} : t bool -> bool := Coq.Program.Basics.compose Data.SemigroupInternal.getAny (foldMap Data.SemigroupInternal.Mk_Any). -Definition any {t : Type -> Type} {a : Type} `{Foldable t} +#[global] Definition any {t : Type -> Type} {a : Type} `{Foldable t} : (a -> bool) -> t a -> bool := fun p => Coq.Program.Basics.compose Data.SemigroupInternal.getAny (foldMap (Coq.Program.Basics.compose Data.SemigroupInternal.Mk_Any p)). -Definition all {t : Type -> Type} {a : Type} `{Foldable t} +#[global] Definition all {t : Type -> Type} {a : Type} `{Foldable t} : (a -> bool) -> t a -> bool := fun p => Coq.Program.Basics.compose Data.SemigroupInternal.getAll (foldMap @@ -1034,14 +2075,16 @@ Definition all {t : Type -> Type} {a : Type} `{Foldable t} (* Skipping definition `Data.Foldable.minimumBy' *) -Definition elem {f} `{Foldable f} {a} `{GHC.Base.Eq_ a} : a -> f a -> bool := +#[global] Definition elem {f} `{Foldable f} {a} `{GHC.Base.Eq_ a} + : a -> f a -> bool := fun x xs => any (fun y => x GHC.Base.== y) xs. -Definition notElem {t : Type -> Type} {a : Type} `{Foldable t} `{GHC.Base.Eq_ a} +#[global] Definition notElem {t : Type -> Type} {a : Type} `{Foldable t} + `{GHC.Base.Eq_ a} : a -> t a -> bool := fun x => negb GHC.Base.∘ elem x. -Definition find {t : Type -> Type} {a : Type} `{Foldable t} +#[global] Definition find {t : Type -> Type} {a : Type} `{Foldable t} : (a -> bool) -> t a -> option a := fun p => Data.Monoid.getFirst GHC.Base.∘ @@ -1050,20 +2093,23 @@ Definition find {t : Type -> Type} {a : Type} `{Foldable t} (* External variables: None Some Type bool cons false list negb nil option pair true tt unit Coq.Program.Basics.compose Data.Either.Either Data.Either.Left Data.Either.Right - Data.Either.isLeft Data.Maybe.maybe Data.Monoid.Mk_First Data.Monoid.getFirst - Data.Proxy.Proxy Data.SemigroupInternal.Dual Data.SemigroupInternal.Mk_All - Data.SemigroupInternal.Mk_Any Data.SemigroupInternal.Mk_Dual - Data.SemigroupInternal.Mk_Endo Data.SemigroupInternal.Mk_Product - Data.SemigroupInternal.Mk_Sum Data.SemigroupInternal.Product - Data.SemigroupInternal.Sum Data.SemigroupInternal.appEndo - Data.SemigroupInternal.getAll Data.SemigroupInternal.getAny + Data.Either.isLeft Data.Maybe.maybe Data.Monoid.Ap Data.Monoid.Mk_First + Data.Monoid.getAp Data.Monoid.getFirst Data.Ord.Down Data.Ord.Mk_Down + Data.Proxy.Proxy Data.SemigroupInternal.Alt Data.SemigroupInternal.Dual + Data.SemigroupInternal.Mk_All Data.SemigroupInternal.Mk_Any + Data.SemigroupInternal.Mk_Dual Data.SemigroupInternal.Mk_Endo + Data.SemigroupInternal.Mk_Product Data.SemigroupInternal.Mk_Sum + Data.SemigroupInternal.Product Data.SemigroupInternal.Sum + Data.SemigroupInternal.appEndo Data.SemigroupInternal.getAll + Data.SemigroupInternal.getAlt Data.SemigroupInternal.getAny Data.SemigroupInternal.getDual Data.SemigroupInternal.getProduct Data.SemigroupInternal.getSum GHC.Base.Applicative GHC.Base.Eq_ GHC.Base.Monad GHC.Base.Monoid GHC.Base.NEcons GHC.Base.NonEmpty GHC.Base.build' GHC.Base.flip GHC.Base.foldl GHC.Base.foldl' GHC.Base.foldr GHC.Base.id GHC.Base.mappend GHC.Base.mempty GHC.Base.op_z2218U__ GHC.Base.op_zeze__ GHC.Base.op_zgzg__ - GHC.Base.op_zgzgze__ GHC.Base.op_ztzg__ GHC.Base.pure GHC.Base.return_ - GHC.List.length GHC.List.null GHC.List.product GHC.List.sum GHC.Num.Int - GHC.Num.Num GHC.Num.fromInteger GHC.Num.op_zp__ GHC.Prim.coerce - GHC.Tuple.pair_type + GHC.Base.op_zgzgze__ GHC.Base.op_zlzlzgzg__ GHC.Base.op_ztzg__ GHC.Base.pure + GHC.Base.return_ GHC.Generics.UAddr GHC.Generics.UChar GHC.Generics.UDouble + GHC.Generics.UFloat GHC.Generics.UInt GHC.Generics.UWord GHC.List.length + GHC.List.null GHC.List.product GHC.List.sum GHC.Num.Int GHC.Num.Num + GHC.Num.fromInteger GHC.Num.op_zp__ GHC.Prim.coerce GHC.Tuple.pair_type *) diff --git a/base/Data/Function.v b/base/Data/Function.v index 32982f702..430f628d3 100644 --- a/base/Data/Function.v +++ b/base/Data/Function.v @@ -18,11 +18,11 @@ Require Coq.Program.Wf. (* Skipping definition `Data.Function.fix_' *) -Definition on {b : Type} {c : Type} {a : Type} +#[global] Definition on {b : Type} {c : Type} {a : Type} : (b -> b -> c) -> (a -> b) -> a -> a -> c := fun lop_ziztzi__ f => fun x y => lop_ziztzi__ (f x) (f y). -Definition op_za__ {a : Type} {b : Type} : a -> (a -> b) -> b := +#[global] Definition op_za__ {a : Type} {b : Type} : a -> (a -> b) -> b := fun x f => f x. Notation "'_&_'" := (op_za__). diff --git a/base/Data/Functor.v b/base/Data/Functor.v index 2f767acc8..fea19c7fe 100644 --- a/base/Data/Functor.v +++ b/base/Data/Functor.v @@ -22,7 +22,7 @@ Import GHC.Base.Notations. (* Converted value declarations: *) -Definition op_zlzdzg__ {f : Type -> Type} {a : Type} {b : Type} +#[global] Definition op_zlzdzg__ {f : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Functor f} : (a -> b) -> f a -> f b := GHC.Base.fmap. @@ -31,7 +31,7 @@ Notation "'_<$>_'" := (op_zlzdzg__). Infix "<$>" := (_<$>_) (at level 99). -Definition op_zlzazg__ {f : Type -> Type} {a : Type} {b : Type} +#[global] Definition op_zlzazg__ {f : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Functor f} : f a -> (a -> b) -> f b := fun as_ f => f <$> as_. @@ -40,8 +40,8 @@ Notation "'_<&>_'" := (op_zlzazg__). Infix "<&>" := (_<&>_) (at level 99). -Definition op_zdzg__ {f : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Functor - f} +#[global] Definition op_zdzg__ {f : Type -> Type} {a : Type} {b : Type} + `{GHC.Base.Functor f} : f a -> b -> f b := GHC.Base.flip _GHC.Base.<$_. @@ -49,7 +49,7 @@ Notation "'_$>_'" := (op_zdzg__). Infix "$>" := (_$>_) (at level 99). -Definition void {f : Type -> Type} {a : Type} `{GHC.Base.Functor f} +#[global] Definition void {f : Type -> Type} {a : Type} `{GHC.Base.Functor f} : f a -> f unit := fun x => tt GHC.Base.<$ x. diff --git a/base/Data/Functor/Classes.h2ci b/base/Data/Functor/Classes.h2ci index ee773412d..c330d3a06 100644 --- a/base/Data/Functor/Classes.h2ci +++ b/base/Data/Functor/Classes.h2ci @@ -1,13 +1,8 @@ -superclassCount: - Data.Functor.Classes.Eq2: '0' - Data.Functor.Classes.Ord1: '1' - Data.Functor.Classes.Eq1: '0' - Data.Functor.Classes.Ord2: '1' classTypes: Data.Functor.Classes.Eq2: fromList [] - Data.Functor.Classes.Ord1: fromList [] Data.Functor.Classes.Eq1: fromList [] Data.Functor.Classes.Ord2: fromList [] + Data.Functor.Classes.Ord1: fromList [] classDefns: Data.Functor.Classes.Eq2: ClassDefinition (Qualified "Data.Functor.Classes" "Eq2") [Typed Ungeneralizable Explicit (Ident (Bare "f") :| []) (Arrow (Qualid (Bare @@ -23,16 +18,6 @@ classDefns: (Bare "a")) :| [])) (PosArg (Qualid (Bare "c")) :| [])) (Arrow (App (App (Qualid (Bare "f")) (PosArg (Qualid (Bare "b")) :| [])) (PosArg (Qualid (Bare "d")) :| [])) (Qualid (Bare "bool"))))))))))] - Data.Functor.Classes.Ord1: ClassDefinition (Qualified "Data.Functor.Classes" "Ord1") - [Typed Ungeneralizable Explicit (Ident (Bare "f") :| []) (Arrow (Qualid (Bare - "Type")) (Qualid (Bare "Type"))),Generalized Implicit (App (Qualid (Qualified - "Data.Functor.Classes" "Eq1")) (PosArg (Qualid (Bare "f")) :| []))] Nothing [(Qualified - "Data.Functor.Classes" "liftCompare",Forall (Typed Ungeneralizable Implicit (Ident - (Bare "a") :| []) (Qualid (Bare "Type")) :| []) (Forall (Typed Ungeneralizable - Implicit (Ident (Bare "b") :| []) (Qualid (Bare "Type")) :| []) (Arrow (Arrow - (Qualid (Bare "a")) (Arrow (Qualid (Bare "b")) (Qualid (Bare "comparison")))) - (Arrow (App (Qualid (Bare "f")) (PosArg (Qualid (Bare "a")) :| [])) (Arrow (App - (Qualid (Bare "f")) (PosArg (Qualid (Bare "b")) :| [])) (Qualid (Bare "comparison")))))))] Data.Functor.Classes.Eq1: ClassDefinition (Qualified "Data.Functor.Classes" "Eq1") [Typed Ungeneralizable Explicit (Ident (Bare "f") :| []) (Arrow (Qualid (Bare "Type")) (Qualid (Bare "Type")))] Nothing [(Qualified "Data.Functor.Classes" "liftEq",Forall @@ -57,3 +42,18 @@ classDefns: (Qualid (Bare "f")) (PosArg (Qualid (Bare "a")) :| [])) (PosArg (Qualid (Bare "c")) :| [])) (Arrow (App (App (Qualid (Bare "f")) (PosArg (Qualid (Bare "b")) :| [])) (PosArg (Qualid (Bare "d")) :| [])) (Qualid (Bare "comparison"))))))))))] + Data.Functor.Classes.Ord1: ClassDefinition (Qualified "Data.Functor.Classes" "Ord1") + [Typed Ungeneralizable Explicit (Ident (Bare "f") :| []) (Arrow (Qualid (Bare + "Type")) (Qualid (Bare "Type"))),Generalized Implicit (App (Qualid (Qualified + "Data.Functor.Classes" "Eq1")) (PosArg (Qualid (Bare "f")) :| []))] Nothing [(Qualified + "Data.Functor.Classes" "liftCompare",Forall (Typed Ungeneralizable Implicit (Ident + (Bare "a") :| []) (Qualid (Bare "Type")) :| []) (Forall (Typed Ungeneralizable + Implicit (Ident (Bare "b") :| []) (Qualid (Bare "Type")) :| []) (Arrow (Arrow + (Qualid (Bare "a")) (Arrow (Qualid (Bare "b")) (Qualid (Bare "comparison")))) + (Arrow (App (Qualid (Bare "f")) (PosArg (Qualid (Bare "a")) :| [])) (Arrow (App + (Qualid (Bare "f")) (PosArg (Qualid (Bare "b")) :| [])) (Qualid (Bare "comparison")))))))] +superclassCount: + Data.Functor.Classes.Eq2: '0' + Data.Functor.Classes.Eq1: '0' + Data.Functor.Classes.Ord2: '1' + Data.Functor.Classes.Ord1: '1' diff --git a/base/Data/Functor/Classes.v b/base/Data/Functor/Classes.v index 7f9f8f1d8..361495325 100644 --- a/base/Data/Functor/Classes.v +++ b/base/Data/Functor/Classes.v @@ -15,6 +15,7 @@ Require Coq.Program.Wf. Require Data.Either. Require Data.Functor.Const. Require Data.Functor.Identity. +Require Data.Ord. Require Data.Proxy. Require GHC.Base. Require GHC.Tuple. @@ -29,7 +30,7 @@ Record Eq2__Dict (f : Type -> Type -> Type) := Eq2__Dict_Build { forall {d : Type}, (a -> b -> bool) -> (c -> d -> bool) -> f a c -> f b d -> bool }. -Definition Eq2 (f : Type -> Type -> Type) := +#[global] Definition Eq2 (f : Type -> Type -> Type) := forall r__, (Eq2__Dict f -> r__) -> r__. Existing Class Eq2. @@ -37,7 +38,7 @@ Record Ord1__Dict (f : Type -> Type) := Ord1__Dict_Build { liftCompare__ : forall {a : Type}, forall {b : Type}, (a -> b -> comparison) -> f a -> f b -> comparison }. -Definition liftEq2 `{g__0__ : Eq2 f} +#[global] Definition liftEq2 `{g__0__ : Eq2 f} : forall {a : Type}, forall {b : Type}, forall {c : Type}, @@ -53,11 +54,11 @@ Record Ord2__Dict (f : Type -> Type -> Type) := Ord2__Dict_Build { (a -> b -> comparison) -> (c -> d -> comparison) -> f a c -> f b d -> comparison }. -Definition Ord2 (f : Type -> Type -> Type) `{Eq2 f} := +#[global] Definition Ord2 (f : Type -> Type -> Type) `{Eq2 f} := forall r__, (Ord2__Dict f -> r__) -> r__. Existing Class Ord2. -Definition liftCompare2 `{g__0__ : Ord2 f} +#[global] Definition liftCompare2 `{g__0__ : Ord2 f} : forall {a : Type}, forall {b : Type}, forall {c : Type}, @@ -70,27 +71,27 @@ Record Eq1__Dict (f : Type -> Type) := Eq1__Dict_Build { liftEq__ : forall {a : Type}, forall {b : Type}, (a -> b -> bool) -> f a -> f b -> bool }. -Definition Eq1 (f : Type -> Type) := +#[global] Definition Eq1 (f : Type -> Type) := forall r__, (Eq1__Dict f -> r__) -> r__. Existing Class Eq1. -Definition liftEq `{g__0__ : Eq1 f} +#[global] Definition liftEq `{g__0__ : Eq1 f} : forall {a : Type}, forall {b : Type}, (a -> b -> bool) -> f a -> f b -> bool := g__0__ _ (liftEq__ f). -Definition Ord1 (f : Type -> Type) `{Eq1 f} := +#[global] Definition Ord1 (f : Type -> Type) `{Eq1 f} := forall r__, (Ord1__Dict f -> r__) -> r__. Existing Class Ord1. -Definition liftCompare `{g__0__ : Ord1 f} +#[global] Definition liftCompare `{g__0__ : Ord1 f} : forall {a : Type}, forall {b : Type}, (a -> b -> comparison) -> f a -> f b -> comparison := g__0__ _ (liftCompare__ f). (* Converted value declarations: *) -Local Definition Eq1__option_liftEq +#[local] Definition Eq1__option_liftEq : forall {a : Type}, forall {b : Type}, (a -> b -> bool) -> option a -> option b -> bool := fun {a : Type} {b : Type} => @@ -102,11 +103,12 @@ Local Definition Eq1__option_liftEq | eq, Some x, Some y => eq x y end. +#[global] Program Instance Eq1__option : Eq1 option := fun _ k__ => k__ {| liftEq__ := fun {a : Type} {b : Type} => Eq1__option_liftEq |}. -Local Definition Ord1__option_liftCompare +#[local] Definition Ord1__option_liftCompare : forall {a : Type}, forall {b : Type}, (a -> b -> comparison) -> option a -> option b -> comparison := @@ -119,6 +121,7 @@ Local Definition Ord1__option_liftCompare | comp, Some x, Some y => comp x y end. +#[global] Program Instance Ord1__option : Ord1 option := fun _ k__ => k__ {| liftCompare__ := fun {a : Type} {b : Type} => @@ -130,7 +133,7 @@ Program Instance Ord1__option : Ord1 option := (* Skipping all instances of class `Data.Functor.Classes.Show1', including `Data.Functor.Classes.Show1__option' *) -Local Definition Eq1__list_liftEq +#[local] Definition Eq1__list_liftEq : forall {a} {b}, (a -> b -> bool) -> list a -> list b -> bool := fun {a} {b} => fix liftEq arg_69__ arg_70__ arg_71__ @@ -141,11 +144,12 @@ Local Definition Eq1__list_liftEq | eq, cons x xs, cons y ys => andb (eq x y) (liftEq eq xs ys) end. +#[global] Program Instance Eq1__list : Eq1 list := fun _ k__ => k__ {| liftEq__ := fun {a : Type} {b : Type} => Eq1__list_liftEq |}. -Local Definition Ord1__list_liftCompare +#[local] Definition Ord1__list_liftCompare : forall {a} {b}, (a -> b -> comparison) -> list a -> list b -> comparison := fun {a} {b} => fix liftCompare arg_69__ arg_70__ arg_71__ @@ -157,6 +161,7 @@ Local Definition Ord1__list_liftCompare GHC.Base.mappend (comp x y) (liftCompare comp xs ys) end. +#[global] Program Instance Ord1__list : Ord1 list := fun _ k__ => k__ {| liftCompare__ := fun {a : Type} {b : Type} => Ord1__list_liftCompare |}. @@ -167,7 +172,7 @@ Program Instance Ord1__list : Ord1 list := (* Skipping all instances of class `Data.Functor.Classes.Show1', including `Data.Functor.Classes.Show1__list' *) -Local Definition Eq1__NonEmpty_liftEq +#[local] Definition Eq1__NonEmpty_liftEq : forall {a : Type}, forall {b : Type}, (a -> b -> bool) -> GHC.Base.NonEmpty a -> GHC.Base.NonEmpty b -> bool := @@ -178,11 +183,12 @@ Local Definition Eq1__NonEmpty_liftEq andb (eq a b) (liftEq eq as_ bs) end. +#[global] Program Instance Eq1__NonEmpty : Eq1 GHC.Base.NonEmpty := fun _ k__ => k__ {| liftEq__ := fun {a : Type} {b : Type} => Eq1__NonEmpty_liftEq |}. -Local Definition Ord1__NonEmpty_liftCompare +#[local] Definition Ord1__NonEmpty_liftCompare : forall {a : Type}, forall {b : Type}, (a -> b -> comparison) -> @@ -194,6 +200,7 @@ Local Definition Ord1__NonEmpty_liftCompare GHC.Base.mappend (cmp a b) (liftCompare cmp as_ bs) end. +#[global] Program Instance Ord1__NonEmpty : Ord1 GHC.Base.NonEmpty := fun _ k__ => k__ {| liftCompare__ := fun {a : Type} {b : Type} => @@ -205,7 +212,7 @@ Program Instance Ord1__NonEmpty : Ord1 GHC.Base.NonEmpty := (* Skipping all instances of class `Data.Functor.Classes.Show1', including `Data.Functor.Classes.Show1__NonEmpty' *) -Local Definition Eq2__pair_type_liftEq2 +#[local] Definition Eq2__pair_type_liftEq2 : forall {a : Type}, forall {b : Type}, forall {c : Type}, @@ -219,12 +226,13 @@ Local Definition Eq2__pair_type_liftEq2 | e1, e2, pair x1 y1, pair x2 y2 => andb (e1 x1 x2) (e2 y1 y2) end. +#[global] Program Instance Eq2__pair_type : Eq2 GHC.Tuple.pair_type := fun _ k__ => k__ {| liftEq2__ := fun {a : Type} {b : Type} {c : Type} {d : Type} => Eq2__pair_type_liftEq2 |}. -Local Definition Ord2__pair_type_liftCompare2 +#[local] Definition Ord2__pair_type_liftCompare2 : forall {a : Type}, forall {b : Type}, forall {c : Type}, @@ -239,6 +247,7 @@ Local Definition Ord2__pair_type_liftCompare2 GHC.Base.mappend (comp1 x1 x2) (comp2 y1 y2) end. +#[global] Program Instance Ord2__pair_type : Ord2 GHC.Tuple.pair_type := fun _ k__ => k__ {| liftCompare2__ := fun {a : Type} {b : Type} {c : Type} {d : Type} => @@ -250,19 +259,21 @@ Program Instance Ord2__pair_type : Ord2 GHC.Tuple.pair_type := (* Skipping all instances of class `Data.Functor.Classes.Show2', including `Data.Functor.Classes.Show2__pair_type' *) -Local Definition Eq1__pair_type_liftEq {inst_a : Type} `{(GHC.Base.Eq_ inst_a)} +#[local] Definition Eq1__pair_type_liftEq {inst_a : Type} `{(GHC.Base.Eq_ + inst_a)} : forall {a : Type}, forall {b : Type}, (a -> b -> bool) -> GHC.Tuple.pair_type inst_a a -> GHC.Tuple.pair_type inst_a b -> bool := fun {a : Type} {b : Type} => liftEq2 _GHC.Base.==_. +#[global] Program Instance Eq1__pair_type {a : Type} `{(GHC.Base.Eq_ a)} : Eq1 (GHC.Tuple.pair_type a) := fun _ k__ => k__ {| liftEq__ := fun {a : Type} {b : Type} => Eq1__pair_type_liftEq |}. -Local Definition Ord1__pair_type_liftCompare {inst_a : Type} `{(GHC.Base.Ord +#[local] Definition Ord1__pair_type_liftCompare {inst_a : Type} `{(GHC.Base.Ord inst_a)} : forall {a : Type}, forall {b : Type}, @@ -270,6 +281,7 @@ Local Definition Ord1__pair_type_liftCompare {inst_a : Type} `{(GHC.Base.Ord GHC.Tuple.pair_type inst_a a -> GHC.Tuple.pair_type inst_a b -> comparison := fun {a : Type} {b : Type} => liftCompare2 GHC.Base.compare. +#[global] Program Instance Ord1__pair_type {a : Type} `{(GHC.Base.Ord a)} : Ord1 (GHC.Tuple.pair_type a) := fun _ k__ => @@ -282,7 +294,7 @@ Program Instance Ord1__pair_type {a : Type} `{(GHC.Base.Ord a)} (* Skipping all instances of class `Data.Functor.Classes.Show1', including `Data.Functor.Classes.Show1__pair_type' *) -Local Definition Eq2__Either_liftEq2 +#[local] Definition Eq2__Either_liftEq2 : forall {a : Type}, forall {b : Type}, forall {c : Type}, @@ -298,12 +310,13 @@ Local Definition Eq2__Either_liftEq2 | _, e2, Data.Either.Right x, Data.Either.Right y => e2 x y end. +#[global] Program Instance Eq2__Either : Eq2 Data.Either.Either := fun _ k__ => k__ {| liftEq2__ := fun {a : Type} {b : Type} {c : Type} {d : Type} => Eq2__Either_liftEq2 |}. -Local Definition Ord2__Either_liftCompare2 +#[local] Definition Ord2__Either_liftCompare2 : forall {a : Type}, forall {b : Type}, forall {c : Type}, @@ -320,6 +333,7 @@ Local Definition Ord2__Either_liftCompare2 | _, comp2, Data.Either.Right x, Data.Either.Right y => comp2 x y end. +#[global] Program Instance Ord2__Either : Ord2 Data.Either.Either := fun _ k__ => k__ {| liftCompare2__ := fun {a : Type} {b : Type} {c : Type} {d : Type} => @@ -331,19 +345,20 @@ Program Instance Ord2__Either : Ord2 Data.Either.Either := (* Skipping all instances of class `Data.Functor.Classes.Show2', including `Data.Functor.Classes.Show2__Either' *) -Local Definition Eq1__Either_liftEq {inst_a : Type} `{(GHC.Base.Eq_ inst_a)} +#[local] Definition Eq1__Either_liftEq {inst_a : Type} `{(GHC.Base.Eq_ inst_a)} : forall {a : Type}, forall {b : Type}, (a -> b -> bool) -> Data.Either.Either inst_a a -> Data.Either.Either inst_a b -> bool := fun {a : Type} {b : Type} => liftEq2 _GHC.Base.==_. +#[global] Program Instance Eq1__Either {a : Type} `{(GHC.Base.Eq_ a)} : Eq1 (Data.Either.Either a) := fun _ k__ => k__ {| liftEq__ := fun {a : Type} {b : Type} => Eq1__Either_liftEq |}. -Local Definition Ord1__Either_liftCompare {inst_a : Type} `{(GHC.Base.Ord +#[local] Definition Ord1__Either_liftCompare {inst_a : Type} `{(GHC.Base.Ord inst_a)} : forall {a : Type}, forall {b : Type}, @@ -351,6 +366,7 @@ Local Definition Ord1__Either_liftCompare {inst_a : Type} `{(GHC.Base.Ord Data.Either.Either inst_a a -> Data.Either.Either inst_a b -> comparison := fun {a : Type} {b : Type} => liftCompare2 GHC.Base.compare. +#[global] Program Instance Ord1__Either {a : Type} `{(GHC.Base.Ord a)} : Ord1 (Data.Either.Either a) := fun _ k__ => @@ -363,7 +379,7 @@ Program Instance Ord1__Either {a : Type} `{(GHC.Base.Ord a)} (* Skipping all instances of class `Data.Functor.Classes.Show1', including `Data.Functor.Classes.Show1__Either' *) -Local Definition Eq1__Identity_liftEq +#[local] Definition Eq1__Identity_liftEq : forall {a : Type}, forall {b : Type}, (a -> b -> bool) -> @@ -377,11 +393,12 @@ Local Definition Eq1__Identity_liftEq eq x y end. +#[global] Program Instance Eq1__Identity : Eq1 Data.Functor.Identity.Identity := fun _ k__ => k__ {| liftEq__ := fun {a : Type} {b : Type} => Eq1__Identity_liftEq |}. -Local Definition Ord1__Identity_liftCompare +#[local] Definition Ord1__Identity_liftCompare : forall {a : Type}, forall {b : Type}, (a -> b -> comparison) -> @@ -396,6 +413,7 @@ Local Definition Ord1__Identity_liftCompare comp x y end. +#[global] Program Instance Ord1__Identity : Ord1 Data.Functor.Identity.Identity := fun _ k__ => k__ {| liftCompare__ := fun {a : Type} {b : Type} => @@ -407,7 +425,7 @@ Program Instance Ord1__Identity : Ord1 Data.Functor.Identity.Identity := (* Skipping all instances of class `Data.Functor.Classes.Show1', including `Data.Functor.Classes.Show1__Identity' *) -Local Definition Eq2__Const_liftEq2 +#[local] Definition Eq2__Const_liftEq2 : forall {a : Type}, forall {b : Type}, forall {c : Type}, @@ -421,12 +439,13 @@ Local Definition Eq2__Const_liftEq2 | eq, _, Data.Functor.Const.Mk_Const x, Data.Functor.Const.Mk_Const y => eq x y end. +#[global] Program Instance Eq2__Const : Eq2 Data.Functor.Const.Const := fun _ k__ => k__ {| liftEq2__ := fun {a : Type} {b : Type} {c : Type} {d : Type} => Eq2__Const_liftEq2 |}. -Local Definition Ord2__Const_liftCompare2 +#[local] Definition Ord2__Const_liftCompare2 : forall {a : Type}, forall {b : Type}, forall {c : Type}, @@ -441,6 +460,7 @@ Local Definition Ord2__Const_liftCompare2 comp x y end. +#[global] Program Instance Ord2__Const : Ord2 Data.Functor.Const.Const := fun _ k__ => k__ {| liftCompare2__ := fun {a : Type} {b : Type} {c : Type} {d : Type} => @@ -452,7 +472,7 @@ Program Instance Ord2__Const : Ord2 Data.Functor.Const.Const := (* Skipping all instances of class `Data.Functor.Classes.Show2', including `Data.Functor.Classes.Show2__Const' *) -Local Definition Eq1__Const_liftEq {inst_a : Type} `{(GHC.Base.Eq_ inst_a)} +#[local] Definition Eq1__Const_liftEq {inst_a : Type} `{(GHC.Base.Eq_ inst_a)} : forall {a : Type}, forall {b : Type}, (a -> b -> bool) -> @@ -460,12 +480,13 @@ Local Definition Eq1__Const_liftEq {inst_a : Type} `{(GHC.Base.Eq_ inst_a)} Data.Functor.Const.Const inst_a b -> bool := fun {a : Type} {b : Type} => liftEq2 _GHC.Base.==_. +#[global] Program Instance Eq1__Const {a : Type} `{(GHC.Base.Eq_ a)} : Eq1 (Data.Functor.Const.Const a) := fun _ k__ => k__ {| liftEq__ := fun {a : Type} {b : Type} => Eq1__Const_liftEq |}. -Local Definition Ord1__Const_liftCompare {inst_a : Type} `{(GHC.Base.Ord +#[local] Definition Ord1__Const_liftCompare {inst_a : Type} `{(GHC.Base.Ord inst_a)} : forall {a : Type}, forall {b : Type}, @@ -474,6 +495,7 @@ Local Definition Ord1__Const_liftCompare {inst_a : Type} `{(GHC.Base.Ord Data.Functor.Const.Const inst_a b -> comparison := fun {a : Type} {b : Type} => liftCompare2 GHC.Base.compare. +#[global] Program Instance Ord1__Const {a : Type} `{(GHC.Base.Ord a)} : Ord1 (Data.Functor.Const.Const a) := fun _ k__ => @@ -485,23 +507,25 @@ Program Instance Ord1__Const {a : Type} `{(GHC.Base.Ord a)} (* Skipping all instances of class `Data.Functor.Classes.Show1', including `Data.Functor.Classes.Show1__Const' *) -Local Definition Eq1__Proxy_liftEq +#[local] Definition Eq1__Proxy_liftEq : forall {a : Type}, forall {b : Type}, (a -> b -> bool) -> Data.Proxy.Proxy a -> Data.Proxy.Proxy b -> bool := fun {a : Type} {b : Type} => fun arg_0__ arg_1__ arg_2__ => true. +#[global] Program Instance Eq1__Proxy : Eq1 Data.Proxy.Proxy := fun _ k__ => k__ {| liftEq__ := fun {a : Type} {b : Type} => Eq1__Proxy_liftEq |}. -Local Definition Ord1__Proxy_liftCompare +#[local] Definition Ord1__Proxy_liftCompare : forall {a : Type}, forall {b : Type}, (a -> b -> comparison) -> Data.Proxy.Proxy a -> Data.Proxy.Proxy b -> comparison := fun {a : Type} {b : Type} => fun arg_0__ arg_1__ arg_2__ => Eq. +#[global] Program Instance Ord1__Proxy : Ord1 Data.Proxy.Proxy := fun _ k__ => k__ {| liftCompare__ := fun {a : Type} {b : Type} => Ord1__Proxy_liftCompare |}. @@ -512,11 +536,49 @@ Program Instance Ord1__Proxy : Ord1 Data.Proxy.Proxy := (* Skipping all instances of class `Data.Functor.Classes.Read1', including `Data.Functor.Classes.Read1__Proxy' *) -Definition eq1 {f : Type -> Type} {a : Type} `{Eq1 f} `{GHC.Base.Eq_ a} +#[local] Definition Eq1__Down_liftEq + : forall {a : Type}, + forall {b : Type}, + (a -> b -> bool) -> Data.Ord.Down a -> Data.Ord.Down b -> bool := + fun {a : Type} {b : Type} => + fun arg_0__ arg_1__ arg_2__ => + match arg_0__, arg_1__, arg_2__ with + | eq, Data.Ord.Mk_Down x, Data.Ord.Mk_Down y => eq x y + end. + +#[global] +Program Instance Eq1__Down : Eq1 Data.Ord.Down := + fun _ k__ => + k__ {| liftEq__ := fun {a : Type} {b : Type} => Eq1__Down_liftEq |}. + +#[local] Definition Ord1__Down_liftCompare + : forall {a : Type}, + forall {b : Type}, + (a -> b -> comparison) -> Data.Ord.Down a -> Data.Ord.Down b -> comparison := + fun {a : Type} {b : Type} => + fun arg_0__ arg_1__ arg_2__ => + match arg_0__, arg_1__, arg_2__ with + | comp, Data.Ord.Mk_Down x, Data.Ord.Mk_Down y => comp x y + end. + +#[global] +Program Instance Ord1__Down : Ord1 Data.Ord.Down := + fun _ k__ => + k__ {| liftCompare__ := fun {a : Type} {b : Type} => Ord1__Down_liftCompare |}. + +(* Skipping all instances of class `Data.Functor.Classes.Read1', including + `Data.Functor.Classes.Read1__Down' *) + +(* Skipping all instances of class `Data.Functor.Classes.Show1', including + `Data.Functor.Classes.Show1__Down' *) + +#[global] Definition eq1 {f : Type -> Type} {a : Type} `{Eq1 f} `{GHC.Base.Eq_ + a} : f a -> f a -> bool := liftEq _GHC.Base.==_. -Definition compare1 {f : Type -> Type} {a : Type} `{Ord1 f} `{GHC.Base.Ord a} +#[global] Definition compare1 {f : Type -> Type} {a : Type} `{Ord1 f} + `{GHC.Base.Ord a} : f a -> f a -> comparison := liftCompare GHC.Base.compare. @@ -530,13 +592,13 @@ Definition compare1 {f : Type -> Type} {a : Type} `{Ord1 f} `{GHC.Base.Ord a} (* Skipping definition `Data.Functor.Classes.showsPrec1' *) -Definition eq2 {f : Type -> Type -> Type} {a : Type} {b : Type} `{Eq2 f} - `{GHC.Base.Eq_ a} `{GHC.Base.Eq_ b} +#[global] Definition eq2 {f : Type -> Type -> Type} {a : Type} {b : Type} `{Eq2 + f} `{GHC.Base.Eq_ a} `{GHC.Base.Eq_ b} : f a b -> f a b -> bool := liftEq2 _GHC.Base.==_ _GHC.Base.==_. -Definition compare2 {f : Type -> Type -> Type} {a : Type} {b : Type} `{Ord2 f} - `{GHC.Base.Ord a} `{GHC.Base.Ord b} +#[global] Definition compare2 {f : Type -> Type -> Type} {a : Type} {b : Type} + `{Ord2 f} `{GHC.Base.Ord a} `{GHC.Base.Ord b} : f a b -> f a b -> comparison := liftCompare2 GHC.Base.compare GHC.Base.compare. @@ -582,7 +644,7 @@ Definition compare2 {f : Type -> Type -> Type} {a : Type} {b : Type} `{Ord2 f} Eq Gt Lt None Some Type andb bool comparison cons false list option pair true Data.Either.Either Data.Either.Left Data.Either.Right Data.Functor.Const.Const Data.Functor.Const.Mk_Const Data.Functor.Identity.Identity - Data.Functor.Identity.Mk_Identity Data.Proxy.Proxy GHC.Base.Eq_ GHC.Base.NEcons - GHC.Base.NonEmpty GHC.Base.Ord GHC.Base.compare GHC.Base.mappend - GHC.Base.op_zeze__ GHC.Tuple.pair_type + Data.Functor.Identity.Mk_Identity Data.Ord.Down Data.Ord.Mk_Down + Data.Proxy.Proxy GHC.Base.Eq_ GHC.Base.NEcons GHC.Base.NonEmpty GHC.Base.Ord + GHC.Base.compare GHC.Base.mappend GHC.Base.op_zeze__ GHC.Tuple.pair_type *) diff --git a/base/Data/Functor/Compose.h2ci b/base/Data/Functor/Compose.h2ci index 7b41e325a..0095a7fef 100644 --- a/base/Data/Functor/Compose.h2ci +++ b/base/Data/Functor/Compose.h2ci @@ -1,9 +1,9 @@ -constructors: - Data.Functor.Compose.Compose: ! '[Qualified "Data.Functor.Compose" "Mk_Compose"]' constructorFields: Data.Functor.Compose.Mk_Compose: RecordFields [Qualified "Data.Functor.Compose" "getCompose"] -recordFieldTypes: - Data.Functor.Compose.getCompose: Qualified "Data.Functor.Compose" "Compose" constructorTypes: Data.Functor.Compose.Mk_Compose: Qualified "Data.Functor.Compose" "Compose" +constructors: + Data.Functor.Compose.Compose: '[Qualified "Data.Functor.Compose" "Mk_Compose"]' +recordFieldTypes: + Data.Functor.Compose.getCompose: Qualified "Data.Functor.Compose" "Compose" diff --git a/base/Data/Functor/Compose.v b/base/Data/Functor/Compose.v index 18805dc6d..d28b41df8 100644 --- a/base/Data/Functor/Compose.v +++ b/base/Data/Functor/Compose.v @@ -32,23 +32,14 @@ Inductive Compose {k : Type} {k1 : Type} (f : k -> Type) (g : k1 -> k) (a : k1) Arguments Mk_Compose {_} {_} {_} {_} {_} _. -Definition getCompose {k : Type} {k1 : Type} {f : k -> Type} {g : k1 -> k} {a - : k1} (arg_0__ : Compose f g a) := +#[global] Definition getCompose {k : Type} {k1 : Type} {f : k -> Type} {g + : k1 -> k} {a : k1} (arg_0__ : Compose f g a) := let 'Mk_Compose getCompose := arg_0__ in getCompose. (* Converted value declarations: *) -(* Skipping all instances of class `Data.Data.Data', including - `Data.Functor.Compose.Data__Compose' *) - -(* Skipping all instances of class `GHC.Generics.Generic', including - `Data.Functor.Compose.Generic__Compose' *) - -(* Skipping all instances of class `GHC.Generics.Generic1', including - `Data.Functor.Compose.Generic1__Compose__5' *) - -Local Definition Eq1__Compose_liftEq {inst_f : Type -> Type} {inst_g +#[local] Definition Eq1__Compose_liftEq {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Functor.Classes.Eq1 inst_f} `{Data.Functor.Classes.Eq1 inst_g} : forall {a : Type}, @@ -62,6 +53,7 @@ Local Definition Eq1__Compose_liftEq {inst_f : Type -> Type} {inst_g Data.Functor.Classes.liftEq (Data.Functor.Classes.liftEq eq) x y end. +#[global] Program Instance Eq1__Compose {f : Type -> Type} {g : Type -> Type} `{Data.Functor.Classes.Eq1 f} `{Data.Functor.Classes.Eq1 g} : Data.Functor.Classes.Eq1 (Compose f g) := @@ -69,7 +61,7 @@ Program Instance Eq1__Compose {f : Type -> Type} {g : Type -> Type} k__ {| Data.Functor.Classes.liftEq__ := fun {a : Type} {b : Type} => Eq1__Compose_liftEq |}. -Local Definition Ord1__Compose_liftCompare {inst_f : Type -> Type} {inst_g +#[local] Definition Ord1__Compose_liftCompare {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Functor.Classes.Ord1 inst_f} `{Data.Functor.Classes.Ord1 inst_g} : forall {a : Type}, @@ -83,6 +75,7 @@ Local Definition Ord1__Compose_liftCompare {inst_f : Type -> Type} {inst_g Data.Functor.Classes.liftCompare (Data.Functor.Classes.liftCompare comp) x y end. +#[global] Program Instance Ord1__Compose {f : Type -> Type} {g : Type -> Type} `{Data.Functor.Classes.Ord1 f} `{Data.Functor.Classes.Ord1 g} : Data.Functor.Classes.Ord1 (Compose f g) := @@ -96,18 +89,19 @@ Program Instance Ord1__Compose {f : Type -> Type} {g : Type -> Type} (* Skipping all instances of class `Data.Functor.Classes.Show1', including `Data.Functor.Compose.Show1__Compose' *) -Local Definition Eq___Compose_op_zeze__ {inst_f : Type -> Type} {inst_g +#[local] Definition Eq___Compose_op_zeze__ {inst_f : Type -> Type} {inst_g : Type -> Type} {inst_a : Type} `{Data.Functor.Classes.Eq1 inst_f} `{Data.Functor.Classes.Eq1 inst_g} `{GHC.Base.Eq_ inst_a} : Compose inst_f inst_g inst_a -> Compose inst_f inst_g inst_a -> bool := Data.Functor.Classes.eq1. -Local Definition Eq___Compose_op_zsze__ {inst_f : Type -> Type} {inst_g +#[local] Definition Eq___Compose_op_zsze__ {inst_f : Type -> Type} {inst_g : Type -> Type} {inst_a : Type} `{Data.Functor.Classes.Eq1 inst_f} `{Data.Functor.Classes.Eq1 inst_g} `{GHC.Base.Eq_ inst_a} : Compose inst_f inst_g inst_a -> Compose inst_f inst_g inst_a -> bool := fun x y => negb (Eq___Compose_op_zeze__ x y). +#[global] Program Instance Eq___Compose {f : Type -> Type} {g : Type -> Type} {a : Type} `{Data.Functor.Classes.Eq1 f} `{Data.Functor.Classes.Eq1 g} `{GHC.Base.Eq_ a} : GHC.Base.Eq_ (Compose f g a) := @@ -115,50 +109,51 @@ Program Instance Eq___Compose {f : Type -> Type} {g : Type -> Type} {a : Type} k__ {| GHC.Base.op_zeze____ := Eq___Compose_op_zeze__ ; GHC.Base.op_zsze____ := Eq___Compose_op_zsze__ |}. -Local Definition Ord__Compose_compare {inst_f : Type -> Type} {inst_g +#[local] Definition Ord__Compose_compare {inst_f : Type -> Type} {inst_g : Type -> Type} {inst_a : Type} `{Data.Functor.Classes.Ord1 inst_f} `{Data.Functor.Classes.Ord1 inst_g} `{GHC.Base.Ord inst_a} : Compose inst_f inst_g inst_a -> Compose inst_f inst_g inst_a -> comparison := Data.Functor.Classes.compare1. -Local Definition Ord__Compose_op_zl__ {inst_f : Type -> Type} {inst_g +#[local] Definition Ord__Compose_op_zl__ {inst_f : Type -> Type} {inst_g : Type -> Type} {inst_a : Type} `{Data.Functor.Classes.Ord1 inst_f} `{Data.Functor.Classes.Ord1 inst_g} `{GHC.Base.Ord inst_a} : Compose inst_f inst_g inst_a -> Compose inst_f inst_g inst_a -> bool := fun x y => Ord__Compose_compare x y GHC.Base.== Lt. -Local Definition Ord__Compose_op_zlze__ {inst_f : Type -> Type} {inst_g +#[local] Definition Ord__Compose_op_zlze__ {inst_f : Type -> Type} {inst_g : Type -> Type} {inst_a : Type} `{Data.Functor.Classes.Ord1 inst_f} `{Data.Functor.Classes.Ord1 inst_g} `{GHC.Base.Ord inst_a} : Compose inst_f inst_g inst_a -> Compose inst_f inst_g inst_a -> bool := fun x y => Ord__Compose_compare x y GHC.Base./= Gt. -Local Definition Ord__Compose_op_zg__ {inst_f : Type -> Type} {inst_g +#[local] Definition Ord__Compose_op_zg__ {inst_f : Type -> Type} {inst_g : Type -> Type} {inst_a : Type} `{Data.Functor.Classes.Ord1 inst_f} `{Data.Functor.Classes.Ord1 inst_g} `{GHC.Base.Ord inst_a} : Compose inst_f inst_g inst_a -> Compose inst_f inst_g inst_a -> bool := fun x y => Ord__Compose_compare x y GHC.Base.== Gt. -Local Definition Ord__Compose_op_zgze__ {inst_f : Type -> Type} {inst_g +#[local] Definition Ord__Compose_op_zgze__ {inst_f : Type -> Type} {inst_g : Type -> Type} {inst_a : Type} `{Data.Functor.Classes.Ord1 inst_f} `{Data.Functor.Classes.Ord1 inst_g} `{GHC.Base.Ord inst_a} : Compose inst_f inst_g inst_a -> Compose inst_f inst_g inst_a -> bool := fun x y => Ord__Compose_compare x y GHC.Base./= Lt. -Local Definition Ord__Compose_max {inst_f : Type -> Type} {inst_g +#[local] Definition Ord__Compose_max {inst_f : Type -> Type} {inst_g : Type -> Type} {inst_a : Type} `{Data.Functor.Classes.Ord1 inst_f} `{Data.Functor.Classes.Ord1 inst_g} `{GHC.Base.Ord inst_a} : Compose inst_f inst_g inst_a -> Compose inst_f inst_g inst_a -> Compose inst_f inst_g inst_a := fun x y => if Ord__Compose_op_zlze__ x y : bool then y else x. -Local Definition Ord__Compose_min {inst_f : Type -> Type} {inst_g +#[local] Definition Ord__Compose_min {inst_f : Type -> Type} {inst_g : Type -> Type} {inst_a : Type} `{Data.Functor.Classes.Ord1 inst_f} `{Data.Functor.Classes.Ord1 inst_g} `{GHC.Base.Ord inst_a} : Compose inst_f inst_g inst_a -> Compose inst_f inst_g inst_a -> Compose inst_f inst_g inst_a := fun x y => if Ord__Compose_op_zlze__ x y : bool then x else y. +#[global] Program Instance Ord__Compose {f : Type -> Type} {g : Type -> Type} {a : Type} `{Data.Functor.Classes.Ord1 f} `{Data.Functor.Classes.Ord1 g} `{GHC.Base.Ord a} : GHC.Base.Ord (Compose f g a) := @@ -177,7 +172,7 @@ Program Instance Ord__Compose {f : Type -> Type} {g : Type -> Type} {a : Type} (* Skipping all instances of class `GHC.Show.Show', including `Data.Functor.Compose.Show__Compose' *) -Local Definition Functor__Compose_fmap {inst_f : Type -> Type} {inst_g +#[local] Definition Functor__Compose_fmap {inst_f : Type -> Type} {inst_g : Type -> Type} `{GHC.Base.Functor inst_f} `{GHC.Base.Functor inst_g} : forall {a : Type}, forall {b : Type}, @@ -188,12 +183,18 @@ Local Definition Functor__Compose_fmap {inst_f : Type -> Type} {inst_g | f, Mk_Compose x => Mk_Compose (GHC.Base.fmap (GHC.Base.fmap f) x) end. -Local Definition Functor__Compose_op_zlzd__ {inst_f : Type -> Type} {inst_g +#[local] Definition Functor__Compose_op_zlzd__ {inst_f : Type -> Type} {inst_g : Type -> Type} `{GHC.Base.Functor inst_f} `{GHC.Base.Functor inst_g} : forall {a : Type}, forall {b : Type}, a -> Compose inst_f inst_g b -> Compose inst_f inst_g a := - fun {a : Type} {b : Type} => Functor__Compose_fmap GHC.Base.∘ GHC.Base.const. + fun {a : Type} {b : Type} => + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | a, Mk_Compose x => + Mk_Compose (Functor__Compose_fmap (fun arg_2__ => a GHC.Base.<$ arg_2__) x) + end. +#[global] Program Instance Functor__Compose {f : Type -> Type} {g : Type -> Type} `{GHC.Base.Functor f} `{GHC.Base.Functor g} : GHC.Base.Functor (Compose f g) := @@ -202,7 +203,7 @@ Program Instance Functor__Compose {f : Type -> Type} {g : Type -> Type} GHC.Base.op_zlzd____ := fun {a : Type} {b : Type} => Functor__Compose_op_zlzd__ |}. -Local Definition Foldable__Compose_foldMap {inst_f : Type -> Type} {inst_g +#[local] Definition Foldable__Compose_foldMap {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable inst_g} : forall {m : Type}, @@ -214,26 +215,14 @@ Local Definition Foldable__Compose_foldMap {inst_f : Type -> Type} {inst_g | f, Mk_Compose t => Data.Foldable.foldMap (Data.Foldable.foldMap f) t end. -Local Definition Foldable__Compose_fold {inst_f : Type -> Type} {inst_g +#[local] Definition Foldable__Compose_fold {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable inst_g} : forall {m : Type}, forall `{GHC.Base.Monoid m}, Compose inst_f inst_g m -> m := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Compose_foldMap GHC.Base.id. -Local Definition Foldable__Compose_foldl {inst_f : Type -> Type} {inst_g - : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable - inst_g} - : forall {b : Type}, - forall {a : Type}, (b -> a -> b) -> b -> Compose inst_f inst_g a -> b := - fun {b : Type} {a : Type} => - fun f z t => - Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual - (Foldable__Compose_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ - (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ - GHC.Base.flip f)) t)) z. - -Local Definition Foldable__Compose_foldr {inst_f : Type -> Type} {inst_g +#[local] Definition Foldable__Compose_foldr {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable inst_g} : forall {a : Type}, @@ -243,7 +232,7 @@ Local Definition Foldable__Compose_foldr {inst_f : Type -> Type} {inst_g Data.SemigroupInternal.appEndo (Foldable__Compose_foldMap (Coq.Program.Basics.compose Data.SemigroupInternal.Mk_Endo f) t) z. -Local Definition Foldable__Compose_foldl' {inst_f : Type -> Type} {inst_g +#[local] Definition Foldable__Compose_foldl' {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable inst_g} : forall {b : Type}, @@ -253,7 +242,29 @@ Local Definition Foldable__Compose_foldl' {inst_f : Type -> Type} {inst_g let f' := fun x k z => k (f z x) in Foldable__Compose_foldr f' GHC.Base.id xs z0. -Local Definition Foldable__Compose_foldr' {inst_f : Type -> Type} {inst_g +#[local] Definition Foldable__Compose_foldMap' {inst_f : Type -> Type} {inst_g + : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable + inst_g} + : forall {m : Type}, + forall {a : Type}, + forall `{GHC.Base.Monoid m}, (a -> m) -> Compose inst_f inst_g a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun f => + Foldable__Compose_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. + +#[local] Definition Foldable__Compose_foldl {inst_f : Type -> Type} {inst_g + : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable + inst_g} + : forall {b : Type}, + forall {a : Type}, (b -> a -> b) -> b -> Compose inst_f inst_g a -> b := + fun {b : Type} {a : Type} => + fun f z t => + Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual + (Foldable__Compose_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ + (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ + GHC.Base.flip f)) t)) z. + +#[local] Definition Foldable__Compose_foldr' {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable inst_g} : forall {a : Type}, @@ -263,7 +274,7 @@ Local Definition Foldable__Compose_foldr' {inst_f : Type -> Type} {inst_g let f' := fun k x z => k (f x z) in Foldable__Compose_foldl f' GHC.Base.id xs z0. -Local Definition Foldable__Compose_length {inst_f : Type -> Type} {inst_g +#[local] Definition Foldable__Compose_length {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable inst_g} : forall {a : Type}, Compose inst_f inst_g a -> GHC.Num.Int := @@ -273,13 +284,13 @@ Local Definition Foldable__Compose_length {inst_f : Type -> Type} {inst_g | c, _ => c GHC.Num.+ #1 end) #0. -Local Definition Foldable__Compose_null {inst_f : Type -> Type} {inst_g +#[local] Definition Foldable__Compose_null {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable inst_g} : forall {a : Type}, Compose inst_f inst_g a -> bool := fun {a : Type} => Foldable__Compose_foldr (fun arg_0__ arg_1__ => false) true. -Local Definition Foldable__Compose_product {inst_f : Type -> Type} {inst_g +#[local] Definition Foldable__Compose_product {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable inst_g} : forall {a : Type}, forall `{GHC.Num.Num a}, Compose inst_f inst_g a -> a := @@ -287,7 +298,7 @@ Local Definition Foldable__Compose_product {inst_f : Type -> Type} {inst_g Coq.Program.Basics.compose Data.SemigroupInternal.getProduct (Foldable__Compose_foldMap Data.SemigroupInternal.Mk_Product). -Local Definition Foldable__Compose_sum {inst_f : Type -> Type} {inst_g +#[local] Definition Foldable__Compose_sum {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable inst_g} : forall {a : Type}, forall `{GHC.Num.Num a}, Compose inst_f inst_g a -> a := @@ -295,13 +306,14 @@ Local Definition Foldable__Compose_sum {inst_f : Type -> Type} {inst_g Coq.Program.Basics.compose Data.SemigroupInternal.getSum (Foldable__Compose_foldMap Data.SemigroupInternal.Mk_Sum). -Local Definition Foldable__Compose_toList {inst_f : Type -> Type} {inst_g +#[local] Definition Foldable__Compose_toList {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable inst_g} : forall {a : Type}, Compose inst_f inst_g a -> list a := fun {a : Type} => fun t => GHC.Base.build' (fun _ => (fun c n => Foldable__Compose_foldr c n t)). +#[global] Program Instance Foldable__Compose {f : Type -> Type} {g : Type -> Type} `{Data.Foldable.Foldable f} `{Data.Foldable.Foldable g} : Data.Foldable.Foldable (Compose f g) := @@ -310,6 +322,8 @@ Program Instance Foldable__Compose {f : Type -> Type} {g : Type -> Type} Foldable__Compose_fold ; Data.Foldable.foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => Foldable__Compose_foldMap ; + Data.Foldable.foldMap'__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__Compose_foldMap' ; Data.Foldable.foldl__ := fun {b : Type} {a : Type} => Foldable__Compose_foldl ; Data.Foldable.foldl'__ := fun {b : Type} {a : Type} => Foldable__Compose_foldl' ; @@ -324,8 +338,8 @@ Program Instance Foldable__Compose {f : Type -> Type} {g : Type -> Type} Foldable__Compose_sum ; Data.Foldable.toList__ := fun {a : Type} => Foldable__Compose_toList |}. -Local Definition Traversable__Compose_traverse {inst_f : Type -> Type} {inst_g - : Type -> Type} `{Data.Traversable.Traversable inst_f} +#[local] Definition Traversable__Compose_traverse {inst_f : Type -> Type} + {inst_g : Type -> Type} `{Data.Traversable.Traversable inst_f} `{Data.Traversable.Traversable inst_g} : forall {f : Type -> Type}, forall {a : Type}, @@ -340,7 +354,7 @@ Local Definition Traversable__Compose_traverse {inst_f : Type -> Type} {inst_g Data.Traversable.traverse (Data.Traversable.traverse f) t end. -Local Definition Traversable__Compose_mapM {inst_f : Type -> Type} {inst_g +#[local] Definition Traversable__Compose_mapM {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Traversable.Traversable inst_f} `{Data.Traversable.Traversable inst_g} : forall {m : Type -> Type}, @@ -351,8 +365,8 @@ Local Definition Traversable__Compose_mapM {inst_f : Type -> Type} {inst_g fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => Traversable__Compose_traverse. -Local Definition Traversable__Compose_sequenceA {inst_f : Type -> Type} {inst_g - : Type -> Type} `{Data.Traversable.Traversable inst_f} +#[local] Definition Traversable__Compose_sequenceA {inst_f : Type -> Type} + {inst_g : Type -> Type} `{Data.Traversable.Traversable inst_f} `{Data.Traversable.Traversable inst_g} : forall {f : Type -> Type}, forall {a : Type}, @@ -361,8 +375,8 @@ Local Definition Traversable__Compose_sequenceA {inst_f : Type -> Type} {inst_g fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => Traversable__Compose_traverse GHC.Base.id. -Local Definition Traversable__Compose_sequence {inst_f : Type -> Type} {inst_g - : Type -> Type} `{Data.Traversable.Traversable inst_f} +#[local] Definition Traversable__Compose_sequence {inst_f : Type -> Type} + {inst_g : Type -> Type} `{Data.Traversable.Traversable inst_f} `{Data.Traversable.Traversable inst_g} : forall {m : Type -> Type}, forall {a : Type}, @@ -371,6 +385,7 @@ Local Definition Traversable__Compose_sequence {inst_f : Type -> Type} {inst_g fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => Traversable__Compose_sequenceA. +#[global] Program Instance Traversable__Compose {f : Type -> Type} {g : Type -> Type} `{Data.Traversable.Traversable f} `{Data.Traversable.Traversable g} : Data.Traversable.Traversable (Compose f g) := @@ -394,7 +409,7 @@ Program Instance Traversable__Compose {f : Type -> Type} {g : Type -> Type} `{GHC.Base.Applicative f} => Traversable__Compose_traverse |}. -Local Definition Applicative__Compose_liftA2 {inst_f : Type -> Type} {inst_g +#[local] Definition Applicative__Compose_liftA2 {inst_f : Type -> Type} {inst_g : Type -> Type} `{GHC.Base.Applicative inst_f} `{GHC.Base.Applicative inst_g} : forall {a : Type}, forall {b : Type}, @@ -408,7 +423,7 @@ Local Definition Applicative__Compose_liftA2 {inst_f : Type -> Type} {inst_g Mk_Compose (GHC.Base.liftA2 (GHC.Base.liftA2 f) x y) end. -Local Definition Applicative__Compose_op_zlztzg__ {inst_f : Type -> Type} +#[local] Definition Applicative__Compose_op_zlztzg__ {inst_f : Type -> Type} {inst_g : Type -> Type} `{GHC.Base.Applicative inst_f} `{GHC.Base.Applicative inst_g} : forall {a : Type}, @@ -421,19 +436,21 @@ Local Definition Applicative__Compose_op_zlztzg__ {inst_f : Type -> Type} | Mk_Compose f, Mk_Compose x => Mk_Compose (GHC.Base.liftA2 _GHC.Base.<*>_ f x) end. -Local Definition Applicative__Compose_op_ztzg__ {inst_f : Type -> Type} {inst_g - : Type -> Type} `{GHC.Base.Applicative inst_f} `{GHC.Base.Applicative inst_g} +#[local] Definition Applicative__Compose_op_ztzg__ {inst_f : Type -> Type} + {inst_g : Type -> Type} `{GHC.Base.Applicative inst_f} `{GHC.Base.Applicative + inst_g} : forall {a : Type}, forall {b : Type}, Compose inst_f inst_g a -> Compose inst_f inst_g b -> Compose inst_f inst_g b := fun {a : Type} {b : Type} => fun a1 a2 => Applicative__Compose_op_zlztzg__ (GHC.Base.id GHC.Base.<$ a1) a2. -Local Definition Applicative__Compose_pure {inst_f : Type -> Type} {inst_g +#[local] Definition Applicative__Compose_pure {inst_f : Type -> Type} {inst_g : Type -> Type} `{GHC.Base.Applicative inst_f} `{GHC.Base.Applicative inst_g} : forall {a : Type}, a -> Compose inst_f inst_g a := fun {a : Type} => fun x => Mk_Compose (GHC.Base.pure (GHC.Base.pure x)). +#[global] Program Instance Applicative__Compose {f : Type -> Type} {g : Type -> Type} `{GHC.Base.Applicative f} `{GHC.Base.Applicative g} : GHC.Base.Applicative (Compose f g) := @@ -449,30 +466,33 @@ Program Instance Applicative__Compose {f : Type -> Type} {g : Type -> Type} (* Skipping all instances of class `GHC.Base.Alternative', including `Data.Functor.Compose.Alternative__Compose' *) +(* Skipping all instances of class `Data.Type.Equality.TestEquality', including + `Data.Functor.Compose.TestEquality__Compose' *) + (* External variables: Gt Lt Type bool comparison false list negb true Coq.Program.Basics.compose - Data.Foldable.Foldable Data.Foldable.foldMap Data.Foldable.foldMap__ - Data.Foldable.fold__ Data.Foldable.foldl'__ Data.Foldable.foldl__ - Data.Foldable.foldr'__ Data.Foldable.foldr__ Data.Foldable.length__ - Data.Foldable.null__ Data.Foldable.product__ Data.Foldable.sum__ - Data.Foldable.toList__ Data.Functor.op_zlzdzg__ Data.Functor.Classes.Eq1 - Data.Functor.Classes.Ord1 Data.Functor.Classes.compare1 Data.Functor.Classes.eq1 - Data.Functor.Classes.liftCompare Data.Functor.Classes.liftCompare__ - Data.Functor.Classes.liftEq Data.Functor.Classes.liftEq__ - Data.SemigroupInternal.Mk_Dual Data.SemigroupInternal.Mk_Endo - Data.SemigroupInternal.Mk_Product Data.SemigroupInternal.Mk_Sum - Data.SemigroupInternal.appEndo Data.SemigroupInternal.getDual - Data.SemigroupInternal.getProduct Data.SemigroupInternal.getSum - Data.Traversable.Traversable Data.Traversable.mapM__ - Data.Traversable.sequenceA__ Data.Traversable.sequence__ + Data.Foldable.Foldable Data.Foldable.foldMap Data.Foldable.foldMap'__ + Data.Foldable.foldMap__ Data.Foldable.fold__ Data.Foldable.foldl'__ + Data.Foldable.foldl__ Data.Foldable.foldr'__ Data.Foldable.foldr__ + Data.Foldable.length__ Data.Foldable.null__ Data.Foldable.product__ + Data.Foldable.sum__ Data.Foldable.toList__ Data.Functor.op_zlzdzg__ + Data.Functor.Classes.Eq1 Data.Functor.Classes.Ord1 Data.Functor.Classes.compare1 + Data.Functor.Classes.eq1 Data.Functor.Classes.liftCompare + Data.Functor.Classes.liftCompare__ Data.Functor.Classes.liftEq + Data.Functor.Classes.liftEq__ Data.SemigroupInternal.Mk_Dual + Data.SemigroupInternal.Mk_Endo Data.SemigroupInternal.Mk_Product + Data.SemigroupInternal.Mk_Sum Data.SemigroupInternal.appEndo + Data.SemigroupInternal.getDual Data.SemigroupInternal.getProduct + Data.SemigroupInternal.getSum Data.Traversable.Traversable + Data.Traversable.mapM__ Data.Traversable.sequenceA__ Data.Traversable.sequence__ Data.Traversable.traverse Data.Traversable.traverse__ GHC.Base.Applicative GHC.Base.Eq_ GHC.Base.Functor GHC.Base.Monad GHC.Base.Monoid GHC.Base.Ord - GHC.Base.build' GHC.Base.compare__ GHC.Base.const GHC.Base.flip GHC.Base.fmap - GHC.Base.fmap__ GHC.Base.id GHC.Base.liftA2 GHC.Base.liftA2__ GHC.Base.max__ + GHC.Base.build' GHC.Base.compare__ GHC.Base.flip GHC.Base.fmap GHC.Base.fmap__ + GHC.Base.id GHC.Base.liftA2 GHC.Base.liftA2__ GHC.Base.max__ GHC.Base.mempty GHC.Base.min__ GHC.Base.op_z2218U__ GHC.Base.op_zeze__ GHC.Base.op_zeze____ GHC.Base.op_zg____ GHC.Base.op_zgze____ GHC.Base.op_zl____ GHC.Base.op_zlzd__ - GHC.Base.op_zlzd____ GHC.Base.op_zlze____ GHC.Base.op_zlztzg__ - GHC.Base.op_zlztzg____ GHC.Base.op_zsze__ GHC.Base.op_zsze____ - GHC.Base.op_ztzg____ GHC.Base.pure GHC.Base.pure__ GHC.Num.Int GHC.Num.Num - GHC.Num.fromInteger GHC.Num.op_zp__ + GHC.Base.op_zlzd____ GHC.Base.op_zlze____ GHC.Base.op_zlzlzgzg__ + GHC.Base.op_zlztzg__ GHC.Base.op_zlztzg____ GHC.Base.op_zsze__ + GHC.Base.op_zsze____ GHC.Base.op_ztzg____ GHC.Base.pure GHC.Base.pure__ + GHC.Num.Int GHC.Num.Num GHC.Num.fromInteger GHC.Num.op_zp__ *) diff --git a/base/Data/Functor/Const.h2ci b/base/Data/Functor/Const.h2ci index 0b1cd907d..45358dea3 100644 --- a/base/Data/Functor/Const.h2ci +++ b/base/Data/Functor/Const.h2ci @@ -1,8 +1,8 @@ -constructors: - Data.Functor.Const.Const: ! '[Qualified "Data.Functor.Const" "Mk_Const"]' constructorFields: Data.Functor.Const.Mk_Const: RecordFields [Qualified "Data.Functor.Const" "getConst"] -recordFieldTypes: - Data.Functor.Const.getConst: Qualified "Data.Functor.Const" "Const" constructorTypes: Data.Functor.Const.Mk_Const: Qualified "Data.Functor.Const" "Const" +constructors: + Data.Functor.Const.Const: '[Qualified "Data.Functor.Const" "Mk_Const"]' +recordFieldTypes: + Data.Functor.Const.getConst: Qualified "Data.Functor.Const" "Const" diff --git a/base/Data/Functor/Const.v b/base/Data/Functor/Const.v index 372c8f4b7..de056ded5 100644 --- a/base/Data/Functor/Const.v +++ b/base/Data/Functor/Const.v @@ -39,185 +39,31 @@ Inductive Const {k : Type} (a : Type) (b : k) : Type := Arguments Mk_Const {_} {_} {_} _. -Definition getConst {k : Type} {a : Type} {b : k} (arg_0__ : Const a b) := +#[global] Definition getConst {k : Type} {a : Type} {b : k} (arg_0__ + : Const a b) := let 'Mk_Const getConst := arg_0__ in getConst. (* Converted value declarations: *) -(* Skipping all instances of class `Data.Bits.Bits', including - `Data.Functor.Const.Bits__Const' *) - -(* Skipping all instances of class `GHC.Enum.Bounded', including - `Data.Functor.Const.Bounded__Const' *) - -(* Skipping all instances of class `GHC.Enum.Enum', including - `Data.Functor.Const.Enum__Const' *) - -Instance Unpeel_Const (k a : Type) (b : k) - : HsToCoq.Unpeel.Unpeel (Const a b) a := - HsToCoq.Unpeel.Build_Unpeel _ _ getConst Mk_Const. - -Local Definition Eq___Const_op_zeze__ {inst_a : Type} {inst_k : Type} {inst_b - : inst_k} `{GHC.Base.Eq_ inst_a} - : Const inst_a inst_b -> Const inst_a inst_b -> bool := - GHC.Prim.coerce _GHC.Base.==_. - -Local Definition Eq___Const_op_zsze__ {inst_a : Type} {inst_k : Type} {inst_b - : inst_k} `{GHC.Base.Eq_ inst_a} - : Const inst_a inst_b -> Const inst_a inst_b -> bool := - GHC.Prim.coerce _GHC.Base./=_. - -Program Instance Eq___Const {a : Type} {k : Type} {b : k} `{GHC.Base.Eq_ a} - : GHC.Base.Eq_ (Const a b) := - fun _ k__ => - k__ {| GHC.Base.op_zeze____ := Eq___Const_op_zeze__ ; - GHC.Base.op_zsze____ := Eq___Const_op_zsze__ |}. - -(* Skipping all instances of class `Data.Bits.FiniteBits', including - `Data.Functor.Const.FiniteBits__Const' *) - -(* Skipping all instances of class `GHC.Float.Floating', including - `Data.Functor.Const.Floating__Const' *) - -(* Skipping all instances of class `GHC.Real.Fractional', including - `Data.Functor.Const.Fractional__Const' *) - -(* Skipping all instances of class `GHC.Generics.Generic', including - `Data.Functor.Const.Generic__Const' *) - -(* Skipping all instances of class `GHC.Generics.Generic1', including - `Data.Functor.Const.Generic1__Const__5' *) - -(* Skipping all instances of class `GHC.Real.Integral', including - `Data.Functor.Const.Integral__Const' *) - -(* Skipping all instances of class `GHC.Arr.Ix', including - `Data.Functor.Const.Ix__Const' *) - -Local Definition Semigroup__Const_op_zlzlzgzg__ {inst_a : Type} {inst_k : Type} - {inst_b : inst_k} `{GHC.Base.Semigroup inst_a} - : Const inst_a inst_b -> Const inst_a inst_b -> Const inst_a inst_b := - GHC.Prim.coerce _GHC.Base.<<>>_. - -Program Instance Semigroup__Const {a : Type} {k : Type} {b : k} - `{GHC.Base.Semigroup a} - : GHC.Base.Semigroup (Const a b) := - fun _ k__ => - k__ {| GHC.Base.op_zlzlzgzg____ := Semigroup__Const_op_zlzlzgzg__ |}. - -Local Definition Monoid__Const_mappend {inst_a : Type} {inst_k : Type} {inst_b - : inst_k} `{GHC.Base.Monoid inst_a} - : Const inst_a inst_b -> Const inst_a inst_b -> Const inst_a inst_b := - GHC.Prim.coerce GHC.Base.mappend. - -Local Definition Monoid__Const_mconcat {inst_a : Type} {inst_k : Type} {inst_b - : inst_k} `{GHC.Base.Monoid inst_a} - : list (Const inst_a inst_b) -> Const inst_a inst_b := - GHC.Prim.coerce GHC.Base.mconcat. - -Local Definition Monoid__Const_mempty {inst_a : Type} {inst_k : Type} {inst_b - : inst_k} `{GHC.Base.Monoid inst_a} - : Const inst_a inst_b := - GHC.Prim.coerce GHC.Base.mempty. - -Program Instance Monoid__Const {a : Type} {k : Type} {b : k} `{GHC.Base.Monoid - a} - : GHC.Base.Monoid (Const a b) := - fun _ k__ => - k__ {| GHC.Base.mappend__ := Monoid__Const_mappend ; - GHC.Base.mconcat__ := Monoid__Const_mconcat ; - GHC.Base.mempty__ := Monoid__Const_mempty |}. - -(* Skipping all instances of class `GHC.Num.Num', including - `Data.Functor.Const.Num__Const' *) - -Local Definition Ord__Const_op_zl__ {inst_a : Type} {inst_k : Type} {inst_b - : inst_k} `{GHC.Base.Ord inst_a} - : Const inst_a inst_b -> Const inst_a inst_b -> bool := - GHC.Prim.coerce _GHC.Base.<_. - -Local Definition Ord__Const_op_zlze__ {inst_a : Type} {inst_k : Type} {inst_b - : inst_k} `{GHC.Base.Ord inst_a} - : Const inst_a inst_b -> Const inst_a inst_b -> bool := - GHC.Prim.coerce _GHC.Base.<=_. - -Local Definition Ord__Const_op_zg__ {inst_a : Type} {inst_k : Type} {inst_b - : inst_k} `{GHC.Base.Ord inst_a} - : Const inst_a inst_b -> Const inst_a inst_b -> bool := - GHC.Prim.coerce _GHC.Base.>_. - -Local Definition Ord__Const_op_zgze__ {inst_a : Type} {inst_k : Type} {inst_b - : inst_k} `{GHC.Base.Ord inst_a} - : Const inst_a inst_b -> Const inst_a inst_b -> bool := - GHC.Prim.coerce _GHC.Base.>=_. - -Local Definition Ord__Const_compare {inst_a : Type} {inst_k : Type} {inst_b - : inst_k} `{GHC.Base.Ord inst_a} - : Const inst_a inst_b -> Const inst_a inst_b -> comparison := - GHC.Prim.coerce GHC.Base.compare. - -Local Definition Ord__Const_max {inst_a : Type} {inst_k : Type} {inst_b - : inst_k} `{GHC.Base.Ord inst_a} - : Const inst_a inst_b -> Const inst_a inst_b -> Const inst_a inst_b := - GHC.Prim.coerce GHC.Base.max. - -Local Definition Ord__Const_min {inst_a : Type} {inst_k : Type} {inst_b - : inst_k} `{GHC.Base.Ord inst_a} - : Const inst_a inst_b -> Const inst_a inst_b -> Const inst_a inst_b := - GHC.Prim.coerce GHC.Base.min. - -Program Instance Ord__Const {a : Type} {k : Type} {b : k} `{GHC.Base.Ord a} - : GHC.Base.Ord (Const a b) := - fun _ k__ => - k__ {| GHC.Base.op_zl____ := Ord__Const_op_zl__ ; - GHC.Base.op_zlze____ := Ord__Const_op_zlze__ ; - GHC.Base.op_zg____ := Ord__Const_op_zg__ ; - GHC.Base.op_zgze____ := Ord__Const_op_zgze__ ; - GHC.Base.compare__ := Ord__Const_compare ; - GHC.Base.max__ := Ord__Const_max ; - GHC.Base.min__ := Ord__Const_min |}. - -(* Skipping all instances of class `GHC.Real.Real', including - `Data.Functor.Const.Real__Const' *) - -(* Skipping all instances of class `GHC.Real.RealFrac', including - `Data.Functor.Const.RealFrac__Const' *) - -(* Skipping all instances of class `GHC.Float.RealFloat', including - `Data.Functor.Const.RealFloat__Const' *) - -(* Skipping all instances of class `Foreign.Storable.Storable', including - `Data.Functor.Const.Storable__Const' *) - (* Skipping all instances of class `GHC.Read.Read', including `Data.Functor.Const.Read__Const' *) (* Skipping all instances of class `GHC.Show.Show', including `Data.Functor.Const.Show__Const' *) -Local Definition Foldable__Const_foldMap {inst_m : Type} +#[local] Definition Foldable__Const_foldMap {inst_m : Type} : forall {m : Type}, forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> Const inst_m a -> m := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => fun arg_0__ arg_1__ => GHC.Base.mempty. -Local Definition Foldable__Const_fold {inst_m : Type} +#[local] Definition Foldable__Const_fold {inst_m : Type} : forall {m : Type}, forall `{GHC.Base.Monoid m}, Const inst_m m -> m := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Const_foldMap GHC.Base.id. -Local Definition Foldable__Const_foldl {inst_m : Type} - : forall {b : Type}, - forall {a : Type}, (b -> a -> b) -> b -> Const inst_m a -> b := - fun {b : Type} {a : Type} => - fun f z t => - Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual - (Foldable__Const_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ - (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ - GHC.Base.flip f)) t)) z. - -Local Definition Foldable__Const_foldr {inst_m : Type} +#[local] Definition Foldable__Const_foldr {inst_m : Type} : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> Const inst_m a -> b := fun {a : Type} {b : Type} => @@ -225,21 +71,39 @@ Local Definition Foldable__Const_foldr {inst_m : Type} Data.SemigroupInternal.appEndo (Foldable__Const_foldMap (Coq.Program.Basics.compose Data.SemigroupInternal.Mk_Endo f) t) z. -Local Definition Foldable__Const_foldl' {inst_m : Type} +#[local] Definition Foldable__Const_foldl' {inst_m : Type} : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> Const inst_m a -> b := fun {b : Type} {a : Type} => fun f z0 xs => let f' := fun x k z => k (f z x) in Foldable__Const_foldr f' GHC.Base.id xs z0. -Local Definition Foldable__Const_foldr' {inst_m : Type} +#[local] Definition Foldable__Const_foldMap' {inst_m : Type} + : forall {m : Type}, + forall {a : Type}, + forall `{GHC.Base.Monoid m}, (a -> m) -> Const inst_m a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun f => + Foldable__Const_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. + +#[local] Definition Foldable__Const_foldl {inst_m : Type} + : forall {b : Type}, + forall {a : Type}, (b -> a -> b) -> b -> Const inst_m a -> b := + fun {b : Type} {a : Type} => + fun f z t => + Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual + (Foldable__Const_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ + (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ + GHC.Base.flip f)) t)) z. + +#[local] Definition Foldable__Const_foldr' {inst_m : Type} : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> Const inst_m a -> b := fun {a : Type} {b : Type} => fun f z0 xs => let f' := fun k x z => k (f x z) in Foldable__Const_foldl f' GHC.Base.id xs z0. -Local Definition Foldable__Const_length {inst_m : Type} +#[local] Definition Foldable__Const_length {inst_m : Type} : forall {a : Type}, Const inst_m a -> GHC.Num.Int := fun {a : Type} => Foldable__Const_foldl' (fun arg_0__ arg_1__ => @@ -247,27 +111,28 @@ Local Definition Foldable__Const_length {inst_m : Type} | c, _ => c GHC.Num.+ #1 end) #0. -Local Definition Foldable__Const_null {inst_m : Type} +#[local] Definition Foldable__Const_null {inst_m : Type} : forall {a : Type}, Const inst_m a -> bool := fun {a : Type} => Foldable__Const_foldr (fun arg_0__ arg_1__ => false) true. -Local Definition Foldable__Const_product {inst_m : Type} +#[local] Definition Foldable__Const_product {inst_m : Type} : forall {a : Type}, forall `{GHC.Num.Num a}, Const inst_m a -> a := fun {a : Type} `{GHC.Num.Num a} => Coq.Program.Basics.compose Data.SemigroupInternal.getProduct (Foldable__Const_foldMap Data.SemigroupInternal.Mk_Product). -Local Definition Foldable__Const_sum {inst_m : Type} +#[local] Definition Foldable__Const_sum {inst_m : Type} : forall {a : Type}, forall `{GHC.Num.Num a}, Const inst_m a -> a := fun {a : Type} `{GHC.Num.Num a} => Coq.Program.Basics.compose Data.SemigroupInternal.getSum (Foldable__Const_foldMap Data.SemigroupInternal.Mk_Sum). -Local Definition Foldable__Const_toList {inst_m : Type} +#[local] Definition Foldable__Const_toList {inst_m : Type} : forall {a : Type}, Const inst_m a -> list a := fun {a : Type} => fun t => GHC.Base.build' (fun _ => (fun c n => Foldable__Const_foldr c n t)). +#[global] Program Instance Foldable__Const {m : Type} : Data.Foldable.Foldable (Const m) := fun _ k__ => @@ -275,6 +140,8 @@ Program Instance Foldable__Const {m : Type} Foldable__Const_fold ; Data.Foldable.foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => Foldable__Const_foldMap ; + Data.Foldable.foldMap'__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__Const_foldMap' ; Data.Foldable.foldl__ := fun {b : Type} {a : Type} => Foldable__Const_foldl ; Data.Foldable.foldl'__ := fun {b : Type} {a : Type} => Foldable__Const_foldl' ; Data.Foldable.foldr__ := fun {a : Type} {b : Type} => Foldable__Const_foldr ; @@ -286,7 +153,7 @@ Program Instance Foldable__Const {m : Type} Data.Foldable.sum__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__Const_sum ; Data.Foldable.toList__ := fun {a : Type} => Foldable__Const_toList |}. -Local Definition Functor__Const_fmap {inst_m : Type} +#[local] Definition Functor__Const_fmap {inst_m : Type} : forall {a : Type}, forall {b : Type}, (a -> b) -> Const inst_m a -> Const inst_m b := fun {a : Type} {b : Type} => @@ -295,18 +162,19 @@ Local Definition Functor__Const_fmap {inst_m : Type} | _, Mk_Const v => Mk_Const v end. -Local Definition Functor__Const_op_zlzd__ {inst_m : Type} +#[local] Definition Functor__Const_op_zlzd__ {inst_m : Type} : forall {a : Type}, forall {b : Type}, a -> Const inst_m b -> Const inst_m a := fun {a : Type} {b : Type} => Functor__Const_fmap GHC.Base.∘ GHC.Base.const. +#[global] Program Instance Functor__Const {m : Type} : GHC.Base.Functor (Const m) := fun _ k__ => k__ {| GHC.Base.fmap__ := fun {a : Type} {b : Type} => Functor__Const_fmap ; GHC.Base.op_zlzd____ := fun {a : Type} {b : Type} => Functor__Const_op_zlzd__ |}. -Local Definition Applicative__Const_liftA2 {inst_m : Type} `{GHC.Base.Monoid +#[local] Definition Applicative__Const_liftA2 {inst_m : Type} `{GHC.Base.Monoid inst_m} : forall {a : Type}, forall {b : Type}, @@ -318,25 +186,26 @@ Local Definition Applicative__Const_liftA2 {inst_m : Type} `{GHC.Base.Monoid | _, Mk_Const x, Mk_Const y => Mk_Const (GHC.Base.mappend x y) end. -Local Definition Applicative__Const_op_zlztzg__ {inst_m : Type} +#[local] Definition Applicative__Const_op_zlztzg__ {inst_m : Type} `{GHC.Base.Monoid inst_m} : forall {a : Type}, forall {b : Type}, Const inst_m (a -> b) -> Const inst_m a -> Const inst_m b := fun {a : Type} {b : Type} => GHC.Prim.coerce (GHC.Base.mappend : inst_m -> inst_m -> inst_m). -Local Definition Applicative__Const_op_ztzg__ {inst_m : Type} `{GHC.Base.Monoid - inst_m} +#[local] Definition Applicative__Const_op_ztzg__ {inst_m : Type} + `{GHC.Base.Monoid inst_m} : forall {a : Type}, forall {b : Type}, Const inst_m a -> Const inst_m b -> Const inst_m b := fun {a : Type} {b : Type} => fun a1 a2 => Applicative__Const_op_zlztzg__ (GHC.Base.id GHC.Base.<$ a1) a2. -Local Definition Applicative__Const_pure {inst_m : Type} `{GHC.Base.Monoid +#[local] Definition Applicative__Const_pure {inst_m : Type} `{GHC.Base.Monoid inst_m} : forall {a : Type}, a -> Const inst_m a := fun {a : Type} => fun arg_0__ => Mk_Const GHC.Base.mempty. +#[global] Program Instance Applicative__Const {m : Type} `{GHC.Base.Monoid m} : GHC.Base.Applicative (Const m) := fun _ k__ => @@ -348,9 +217,13 @@ Program Instance Applicative__Const {m : Type} `{GHC.Base.Monoid m} Applicative__Const_op_ztzg__ ; GHC.Base.pure__ := fun {a : Type} => Applicative__Const_pure |}. +Instance Unpeel_Const (k a : Type) (b : k) + : HsToCoq.Unpeel.Unpeel (Const a b) a := + HsToCoq.Unpeel.Build_Unpeel _ _ getConst Mk_Const. + (* External variables: - Type bool comparison false list true Coq.Program.Basics.compose - Data.Foldable.Foldable Data.Foldable.foldMap__ Data.Foldable.fold__ + Type bool false list true Coq.Program.Basics.compose Data.Foldable.Foldable + Data.Foldable.foldMap'__ Data.Foldable.foldMap__ Data.Foldable.fold__ Data.Foldable.foldl'__ Data.Foldable.foldl__ Data.Foldable.foldr'__ Data.Foldable.foldr__ Data.Foldable.length__ Data.Foldable.null__ Data.Foldable.product__ Data.Foldable.sum__ Data.Foldable.toList__ @@ -358,16 +231,10 @@ Program Instance Applicative__Const {m : Type} `{GHC.Base.Monoid m} Data.SemigroupInternal.Mk_Product Data.SemigroupInternal.Mk_Sum Data.SemigroupInternal.appEndo Data.SemigroupInternal.getDual Data.SemigroupInternal.getProduct Data.SemigroupInternal.getSum - GHC.Base.Applicative GHC.Base.Eq_ GHC.Base.Functor GHC.Base.Monoid GHC.Base.Ord - GHC.Base.Semigroup GHC.Base.build' GHC.Base.compare GHC.Base.compare__ + GHC.Base.Applicative GHC.Base.Functor GHC.Base.Monoid GHC.Base.build' GHC.Base.const GHC.Base.flip GHC.Base.fmap__ GHC.Base.id GHC.Base.liftA2__ - GHC.Base.mappend GHC.Base.mappend__ GHC.Base.max GHC.Base.max__ GHC.Base.mconcat - GHC.Base.mconcat__ GHC.Base.mempty GHC.Base.mempty__ GHC.Base.min GHC.Base.min__ - GHC.Base.op_z2218U__ GHC.Base.op_zeze__ GHC.Base.op_zeze____ GHC.Base.op_zg__ - GHC.Base.op_zg____ GHC.Base.op_zgze__ GHC.Base.op_zgze____ GHC.Base.op_zl__ - GHC.Base.op_zl____ GHC.Base.op_zlzd__ GHC.Base.op_zlzd____ GHC.Base.op_zlze__ - GHC.Base.op_zlze____ GHC.Base.op_zlzlzgzg__ GHC.Base.op_zlzlzgzg____ - GHC.Base.op_zlztzg____ GHC.Base.op_zsze__ GHC.Base.op_zsze____ + GHC.Base.mappend GHC.Base.mempty GHC.Base.op_z2218U__ GHC.Base.op_zlzd__ + GHC.Base.op_zlzd____ GHC.Base.op_zlzlzgzg__ GHC.Base.op_zlztzg____ GHC.Base.op_ztzg____ GHC.Base.pure__ GHC.Num.Int GHC.Num.Num GHC.Num.fromInteger GHC.Num.op_zp__ GHC.Prim.coerce HsToCoq.Unpeel.Build_Unpeel HsToCoq.Unpeel.Unpeel diff --git a/base/Data/Functor/Identity.h2ci b/base/Data/Functor/Identity.h2ci index 01b72917e..381d584e2 100644 --- a/base/Data/Functor/Identity.h2ci +++ b/base/Data/Functor/Identity.h2ci @@ -1,9 +1,9 @@ -constructors: - Data.Functor.Identity.Identity: ! '[Qualified "Data.Functor.Identity" "Mk_Identity"]' constructorFields: Data.Functor.Identity.Mk_Identity: RecordFields [Qualified "Data.Functor.Identity" "runIdentity"] -recordFieldTypes: - Data.Functor.Identity.runIdentity: Qualified "Data.Functor.Identity" "Identity" constructorTypes: Data.Functor.Identity.Mk_Identity: Qualified "Data.Functor.Identity" "Identity" +constructors: + Data.Functor.Identity.Identity: '[Qualified "Data.Functor.Identity" "Mk_Identity"]' +recordFieldTypes: + Data.Functor.Identity.runIdentity: Qualified "Data.Functor.Identity" "Identity" diff --git a/base/Data/Functor/Identity.v b/base/Data/Functor/Identity.v index 4e94986dd..0fabb7321 100644 --- a/base/Data/Functor/Identity.v +++ b/base/Data/Functor/Identity.v @@ -25,7 +25,7 @@ Inductive Identity a : Type := | Mk_Identity (runIdentity : a) : Identity a. Arguments Mk_Identity {_} _. -Definition runIdentity {a} (arg_0__ : Identity a) := +#[global] Definition runIdentity {a} (arg_0__ : Identity a) := let 'Mk_Identity runIdentity := arg_0__ in runIdentity. @@ -36,162 +36,39 @@ Instance Unpeel_Identity a : HsToCoq.Unpeel.Unpeel (Identity a) a := (* Converted value declarations: *) -(* Skipping all instances of class `Data.Bits.Bits', including - `Data.Functor.Identity.Bits__Identity' *) - -(* Skipping all instances of class `GHC.Enum.Bounded', including - `Data.Functor.Identity.Bounded__Identity' *) - -(* Skipping all instances of class `GHC.Enum.Enum', including - `Data.Functor.Identity.Enum__Identity' *) - -Local Definition Eq___Identity_op_zeze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} - : Identity inst_a -> Identity inst_a -> bool := - GHC.Prim.coerce _GHC.Base.==_. - -Local Definition Eq___Identity_op_zsze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} - : Identity inst_a -> Identity inst_a -> bool := - GHC.Prim.coerce _GHC.Base./=_. - -Program Instance Eq___Identity {a : Type} `{GHC.Base.Eq_ a} - : GHC.Base.Eq_ (Identity a) := - fun _ k__ => - k__ {| GHC.Base.op_zeze____ := Eq___Identity_op_zeze__ ; - GHC.Base.op_zsze____ := Eq___Identity_op_zsze__ |}. - -(* Skipping all instances of class `Data.Bits.FiniteBits', including - `Data.Functor.Identity.FiniteBits__Identity' *) - -(* Skipping all instances of class `GHC.Float.Floating', including - `Data.Functor.Identity.Floating__Identity' *) - -(* Skipping all instances of class `GHC.Real.Fractional', including - `Data.Functor.Identity.Fractional__Identity' *) - -(* Skipping all instances of class `GHC.Generics.Generic', including - `Data.Functor.Identity.Generic__Identity' *) - -(* Skipping all instances of class `GHC.Generics.Generic1', including - `Data.Functor.Identity.Generic1__TYPE__Identity__LiftedRep' *) - -(* Skipping all instances of class `GHC.Real.Integral', including - `Data.Functor.Identity.Integral__Identity' *) - -(* Skipping all instances of class `GHC.Arr.Ix', including - `Data.Functor.Identity.Ix__Identity' *) - -Local Definition Semigroup__Identity_op_zlzlzgzg__ {inst_a : Type} - `{GHC.Base.Semigroup inst_a} - : Identity inst_a -> Identity inst_a -> Identity inst_a := - GHC.Prim.coerce _GHC.Base.<<>>_. - -Program Instance Semigroup__Identity {a : Type} `{GHC.Base.Semigroup a} - : GHC.Base.Semigroup (Identity a) := - fun _ k__ => - k__ {| GHC.Base.op_zlzlzgzg____ := Semigroup__Identity_op_zlzlzgzg__ |}. - -Local Definition Monoid__Identity_mappend {inst_a : Type} `{GHC.Base.Monoid - inst_a} - : Identity inst_a -> Identity inst_a -> Identity inst_a := - GHC.Prim.coerce GHC.Base.mappend. - -Local Definition Monoid__Identity_mconcat {inst_a : Type} `{GHC.Base.Monoid - inst_a} - : list (Identity inst_a) -> Identity inst_a := - GHC.Prim.coerce GHC.Base.mconcat. - -Local Definition Monoid__Identity_mempty {inst_a : Type} `{GHC.Base.Monoid - inst_a} - : Identity inst_a := - GHC.Prim.coerce GHC.Base.mempty. - -Program Instance Monoid__Identity {a : Type} `{GHC.Base.Monoid a} - : GHC.Base.Monoid (Identity a) := - fun _ k__ => - k__ {| GHC.Base.mappend__ := Monoid__Identity_mappend ; - GHC.Base.mconcat__ := Monoid__Identity_mconcat ; - GHC.Base.mempty__ := Monoid__Identity_mempty |}. - -(* Skipping all instances of class `GHC.Num.Num', including - `Data.Functor.Identity.Num__Identity' *) - -Local Definition Ord__Identity_op_zl__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Identity inst_a -> Identity inst_a -> bool := - GHC.Prim.coerce _GHC.Base.<_. - -Local Definition Ord__Identity_op_zlze__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Identity inst_a -> Identity inst_a -> bool := - GHC.Prim.coerce _GHC.Base.<=_. - -Local Definition Ord__Identity_op_zg__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Identity inst_a -> Identity inst_a -> bool := - GHC.Prim.coerce _GHC.Base.>_. - -Local Definition Ord__Identity_op_zgze__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Identity inst_a -> Identity inst_a -> bool := - GHC.Prim.coerce _GHC.Base.>=_. - -Local Definition Ord__Identity_compare {inst_a : Type} `{GHC.Base.Ord inst_a} - : Identity inst_a -> Identity inst_a -> comparison := - GHC.Prim.coerce GHC.Base.compare. - -Local Definition Ord__Identity_max {inst_a : Type} `{GHC.Base.Ord inst_a} - : Identity inst_a -> Identity inst_a -> Identity inst_a := - GHC.Prim.coerce GHC.Base.max. - -Local Definition Ord__Identity_min {inst_a : Type} `{GHC.Base.Ord inst_a} - : Identity inst_a -> Identity inst_a -> Identity inst_a := - GHC.Prim.coerce GHC.Base.min. - -Program Instance Ord__Identity {a : Type} `{GHC.Base.Ord a} - : GHC.Base.Ord (Identity a) := - fun _ k__ => - k__ {| GHC.Base.op_zl____ := Ord__Identity_op_zl__ ; - GHC.Base.op_zlze____ := Ord__Identity_op_zlze__ ; - GHC.Base.op_zg____ := Ord__Identity_op_zg__ ; - GHC.Base.op_zgze____ := Ord__Identity_op_zgze__ ; - GHC.Base.compare__ := Ord__Identity_compare ; - GHC.Base.max__ := Ord__Identity_max ; - GHC.Base.min__ := Ord__Identity_min |}. - -(* Skipping all instances of class `GHC.Real.Real', including - `Data.Functor.Identity.Real__Identity' *) - -(* Skipping all instances of class `GHC.Real.RealFrac', including - `Data.Functor.Identity.RealFrac__Identity' *) - -(* Skipping all instances of class `GHC.Float.RealFloat', including - `Data.Functor.Identity.RealFloat__Identity' *) - -(* Skipping all instances of class `Foreign.Storable.Storable', including - `Data.Functor.Identity.Storable__Identity' *) - (* Skipping all instances of class `GHC.Read.Read', including `Data.Functor.Identity.Read__Identity' *) (* Skipping all instances of class `GHC.Show.Show', including `Data.Functor.Identity.Show__Identity' *) -Local Definition Foldable__Identity_foldMap +#[local] Definition Foldable__Identity_foldMap : forall {m : Type}, forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> Identity a -> m := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => GHC.Prim.coerce. -Local Definition Foldable__Identity_fold +#[local] Definition Foldable__Identity_fold : forall {m : Type}, forall `{GHC.Base.Monoid m}, Identity m -> m := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Identity_foldMap GHC.Base.id. -Local Definition Foldable__Identity_foldl +#[local] Definition Foldable__Identity_foldl' : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> Identity a -> b := fun {b : Type} {a : Type} => GHC.Prim.coerce. -Local Definition Foldable__Identity_foldl' +#[local] Definition Foldable__Identity_foldMap' + : forall {m : Type}, + forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> Identity a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun f => + Foldable__Identity_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. + +#[local] Definition Foldable__Identity_foldl : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> Identity a -> b := fun {b : Type} {a : Type} => GHC.Prim.coerce. -Local Definition Foldable__Identity_foldr +#[local] Definition Foldable__Identity_foldr : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> Identity a -> b := fun {a : Type} {b : Type} => @@ -200,37 +77,40 @@ Local Definition Foldable__Identity_foldr | f, z, Mk_Identity x => f x z end. -Local Definition Foldable__Identity_foldr' +#[local] Definition Foldable__Identity_foldr' : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> Identity a -> b := fun {a : Type} {b : Type} => Foldable__Identity_foldr. -Local Definition Foldable__Identity_length +#[local] Definition Foldable__Identity_length : forall {a : Type}, Identity a -> GHC.Num.Int := fun {a : Type} => fun arg_0__ => #1. -Local Definition Foldable__Identity_null +#[local] Definition Foldable__Identity_null : forall {a : Type}, Identity a -> bool := fun {a : Type} => fun arg_0__ => false. -Local Definition Foldable__Identity_product +#[local] Definition Foldable__Identity_product : forall {a : Type}, forall `{GHC.Num.Num a}, Identity a -> a := fun {a : Type} `{GHC.Num.Num a} => runIdentity. -Local Definition Foldable__Identity_sum +#[local] Definition Foldable__Identity_sum : forall {a : Type}, forall `{GHC.Num.Num a}, Identity a -> a := fun {a : Type} `{GHC.Num.Num a} => runIdentity. -Local Definition Foldable__Identity_toList +#[local] Definition Foldable__Identity_toList : forall {a : Type}, Identity a -> list a := fun {a : Type} => fun '(Mk_Identity x) => cons x nil. +#[global] Program Instance Foldable__Identity : Data.Foldable.Foldable Identity := fun _ k__ => k__ {| Data.Foldable.fold__ := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Identity_fold ; Data.Foldable.foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => Foldable__Identity_foldMap ; + Data.Foldable.foldMap'__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__Identity_foldMap' ; Data.Foldable.foldl__ := fun {b : Type} {a : Type} => Foldable__Identity_foldl ; Data.Foldable.foldl'__ := fun {b : Type} {a : Type} => Foldable__Identity_foldl' ; @@ -245,41 +125,43 @@ Program Instance Foldable__Identity : Data.Foldable.Foldable Identity := Foldable__Identity_sum ; Data.Foldable.toList__ := fun {a : Type} => Foldable__Identity_toList |}. -Local Definition Functor__Identity_fmap +#[local] Definition Functor__Identity_fmap : forall {a : Type}, forall {b : Type}, (a -> b) -> Identity a -> Identity b := fun {a : Type} {b : Type} => GHC.Prim.coerce. -Local Definition Functor__Identity_op_zlzd__ +#[local] Definition Functor__Identity_op_zlzd__ : forall {a : Type}, forall {b : Type}, a -> Identity b -> Identity a := fun {a : Type} {b : Type} => Functor__Identity_fmap GHC.Base.∘ GHC.Base.const. +#[global] Program Instance Functor__Identity : GHC.Base.Functor Identity := fun _ k__ => k__ {| GHC.Base.fmap__ := fun {a : Type} {b : Type} => Functor__Identity_fmap ; GHC.Base.op_zlzd____ := fun {a : Type} {b : Type} => Functor__Identity_op_zlzd__ |}. -Local Definition Applicative__Identity_liftA2 +#[local] Definition Applicative__Identity_liftA2 : forall {a : Type}, forall {b : Type}, forall {c : Type}, (a -> b -> c) -> Identity a -> Identity b -> Identity c := fun {a : Type} {b : Type} {c : Type} => GHC.Prim.coerce. -Local Definition Applicative__Identity_op_zlztzg__ +#[local] Definition Applicative__Identity_op_zlztzg__ : forall {a : Type}, forall {b : Type}, Identity (a -> b) -> Identity a -> Identity b := fun {a : Type} {b : Type} => GHC.Prim.coerce. -Local Definition Applicative__Identity_op_ztzg__ +#[local] Definition Applicative__Identity_op_ztzg__ : forall {a : Type}, forall {b : Type}, Identity a -> Identity b -> Identity b := fun {a : Type} {b : Type} => fun a1 a2 => Applicative__Identity_op_zlztzg__ (GHC.Base.id GHC.Base.<$ a1) a2. -Local Definition Applicative__Identity_pure +#[local] Definition Applicative__Identity_pure : forall {a : Type}, a -> Identity a := fun {a : Type} => Mk_Identity. +#[global] Program Instance Applicative__Identity : GHC.Base.Applicative Identity := fun _ k__ => k__ {| GHC.Base.liftA2__ := fun {a : Type} {b : Type} {c : Type} => @@ -290,20 +172,22 @@ Program Instance Applicative__Identity : GHC.Base.Applicative Identity := Applicative__Identity_op_ztzg__ ; GHC.Base.pure__ := fun {a : Type} => Applicative__Identity_pure |}. -Local Definition Monad__Identity_op_zgzgze__ +#[local] Definition Monad__Identity_op_zgzgze__ : forall {a : Type}, forall {b : Type}, Identity a -> (a -> Identity b) -> Identity b := fun {a : Type} {b : Type} => fun m k => k (runIdentity m). -Local Definition Monad__Identity_op_zgzg__ +#[local] Definition Monad__Identity_op_zgzg__ : forall {a : Type}, forall {b : Type}, Identity a -> Identity b -> Identity b := fun {a : Type} {b : Type} => fun m k => Monad__Identity_op_zgzgze__ m (fun arg_0__ => k). -Local Definition Monad__Identity_return_ : forall {a : Type}, a -> Identity a := +#[local] Definition Monad__Identity_return_ + : forall {a : Type}, a -> Identity a := fun {a : Type} => GHC.Base.pure. +#[global] Program Instance Monad__Identity : GHC.Base.Monad Identity := fun _ k__ => k__ {| GHC.Base.op_zgzg____ := fun {a : Type} {b : Type} => @@ -316,22 +200,15 @@ Program Instance Monad__Identity : GHC.Base.Monad Identity := `Data.Functor.Identity.MonadFix__Identity' *) (* External variables: - Type bool comparison cons false list nil Data.Foldable.Foldable + Type bool cons false list nil Data.Foldable.Foldable Data.Foldable.foldMap'__ Data.Foldable.foldMap__ Data.Foldable.fold__ Data.Foldable.foldl'__ Data.Foldable.foldl__ Data.Foldable.foldr'__ Data.Foldable.foldr__ Data.Foldable.length__ Data.Foldable.null__ Data.Foldable.product__ - Data.Foldable.sum__ Data.Foldable.toList__ GHC.Base.Applicative GHC.Base.Eq_ - GHC.Base.Functor GHC.Base.Monad GHC.Base.Monoid GHC.Base.Ord GHC.Base.Semigroup - GHC.Base.compare GHC.Base.compare__ GHC.Base.const GHC.Base.fmap__ GHC.Base.id - GHC.Base.liftA2__ GHC.Base.mappend GHC.Base.mappend__ GHC.Base.max - GHC.Base.max__ GHC.Base.mconcat GHC.Base.mconcat__ GHC.Base.mempty - GHC.Base.mempty__ GHC.Base.min GHC.Base.min__ GHC.Base.op_z2218U__ - GHC.Base.op_zeze__ GHC.Base.op_zeze____ GHC.Base.op_zg__ GHC.Base.op_zg____ - GHC.Base.op_zgze__ GHC.Base.op_zgze____ GHC.Base.op_zgzg____ - GHC.Base.op_zgzgze____ GHC.Base.op_zl__ GHC.Base.op_zl____ GHC.Base.op_zlzd__ - GHC.Base.op_zlzd____ GHC.Base.op_zlze__ GHC.Base.op_zlze____ - GHC.Base.op_zlzlzgzg__ GHC.Base.op_zlzlzgzg____ GHC.Base.op_zlztzg____ - GHC.Base.op_zsze__ GHC.Base.op_zsze____ GHC.Base.op_ztzg____ GHC.Base.pure + Data.Foldable.sum__ Data.Foldable.toList__ GHC.Base.Applicative GHC.Base.Functor + GHC.Base.Monad GHC.Base.Monoid GHC.Base.const GHC.Base.fmap__ GHC.Base.id + GHC.Base.liftA2__ GHC.Base.mempty GHC.Base.op_z2218U__ GHC.Base.op_zgzg____ + GHC.Base.op_zgzgze____ GHC.Base.op_zlzd__ GHC.Base.op_zlzd____ + GHC.Base.op_zlzlzgzg__ GHC.Base.op_zlztzg____ GHC.Base.op_ztzg____ GHC.Base.pure GHC.Base.pure__ GHC.Base.return___ GHC.Num.Int GHC.Num.Num GHC.Num.fromInteger GHC.Prim.coerce *) diff --git a/base/Data/Functor/Product.h2ci b/base/Data/Functor/Product.h2ci index 85193d22a..75b741e77 100644 --- a/base/Data/Functor/Product.h2ci +++ b/base/Data/Functor/Product.h2ci @@ -1,6 +1,6 @@ -constructors: - Data.Functor.Product.Product: ! '[Qualified "Data.Functor.Product" "Pair"]' constructorFields: Data.Functor.Product.Pair: NonRecordFields 2 constructorTypes: Data.Functor.Product.Pair: Qualified "Data.Functor.Product" "Product" +constructors: + Data.Functor.Product.Product: '[Qualified "Data.Functor.Product" "Pair"]' diff --git a/base/Data/Functor/Product.v b/base/Data/Functor/Product.v index 46468f930..4f14ffeb7 100644 --- a/base/Data/Functor/Product.v +++ b/base/Data/Functor/Product.v @@ -34,16 +34,7 @@ Arguments Pair {_} {_} {_} {_} _ _. (* Converted value declarations: *) -(* Skipping all instances of class `Data.Data.Data', including - `Data.Functor.Product.Data__Product' *) - -(* Skipping all instances of class `GHC.Generics.Generic', including - `Data.Functor.Product.Generic__Product' *) - -(* Skipping all instances of class `GHC.Generics.Generic1', including - `Data.Functor.Product.Generic1__Product__5' *) - -Local Definition Eq1__Product_liftEq {inst_f : Type -> Type} {inst_g +#[local] Definition Eq1__Product_liftEq {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Functor.Classes.Eq1 inst_f} `{Data.Functor.Classes.Eq1 inst_g} : forall {a : Type}, @@ -58,6 +49,7 @@ Local Definition Eq1__Product_liftEq {inst_f : Type -> Type} {inst_g y2) end. +#[global] Program Instance Eq1__Product {f : Type -> Type} {g : Type -> Type} `{Data.Functor.Classes.Eq1 f} `{Data.Functor.Classes.Eq1 g} : Data.Functor.Classes.Eq1 (Product f g) := @@ -65,7 +57,7 @@ Program Instance Eq1__Product {f : Type -> Type} {g : Type -> Type} k__ {| Data.Functor.Classes.liftEq__ := fun {a : Type} {b : Type} => Eq1__Product_liftEq |}. -Local Definition Ord1__Product_liftCompare {inst_f : Type -> Type} {inst_g +#[local] Definition Ord1__Product_liftCompare {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Functor.Classes.Ord1 inst_f} `{Data.Functor.Classes.Ord1 inst_g} : forall {a : Type}, @@ -80,6 +72,7 @@ Local Definition Ord1__Product_liftCompare {inst_f : Type -> Type} {inst_g (Data.Functor.Classes.liftCompare comp y1 y2) end. +#[global] Program Instance Ord1__Product {f : Type -> Type} {g : Type -> Type} `{Data.Functor.Classes.Ord1 f} `{Data.Functor.Classes.Ord1 g} : Data.Functor.Classes.Ord1 (Product f g) := @@ -93,18 +86,19 @@ Program Instance Ord1__Product {f : Type -> Type} {g : Type -> Type} (* Skipping all instances of class `Data.Functor.Classes.Show1', including `Data.Functor.Product.Show1__Product' *) -Local Definition Eq___Product_op_zeze__ {inst_f : Type -> Type} {inst_g +#[local] Definition Eq___Product_op_zeze__ {inst_f : Type -> Type} {inst_g : Type -> Type} {inst_a : Type} `{Data.Functor.Classes.Eq1 inst_f} `{Data.Functor.Classes.Eq1 inst_g} `{GHC.Base.Eq_ inst_a} : Product inst_f inst_g inst_a -> Product inst_f inst_g inst_a -> bool := Data.Functor.Classes.eq1. -Local Definition Eq___Product_op_zsze__ {inst_f : Type -> Type} {inst_g +#[local] Definition Eq___Product_op_zsze__ {inst_f : Type -> Type} {inst_g : Type -> Type} {inst_a : Type} `{Data.Functor.Classes.Eq1 inst_f} `{Data.Functor.Classes.Eq1 inst_g} `{GHC.Base.Eq_ inst_a} : Product inst_f inst_g inst_a -> Product inst_f inst_g inst_a -> bool := fun x y => negb (Eq___Product_op_zeze__ x y). +#[global] Program Instance Eq___Product {f : Type -> Type} {g : Type -> Type} {a : Type} `{Data.Functor.Classes.Eq1 f} `{Data.Functor.Classes.Eq1 g} `{GHC.Base.Eq_ a} : GHC.Base.Eq_ (Product f g a) := @@ -112,50 +106,51 @@ Program Instance Eq___Product {f : Type -> Type} {g : Type -> Type} {a : Type} k__ {| GHC.Base.op_zeze____ := Eq___Product_op_zeze__ ; GHC.Base.op_zsze____ := Eq___Product_op_zsze__ |}. -Local Definition Ord__Product_compare {inst_f : Type -> Type} {inst_g +#[local] Definition Ord__Product_compare {inst_f : Type -> Type} {inst_g : Type -> Type} {inst_a : Type} `{Data.Functor.Classes.Ord1 inst_f} `{Data.Functor.Classes.Ord1 inst_g} `{GHC.Base.Ord inst_a} : Product inst_f inst_g inst_a -> Product inst_f inst_g inst_a -> comparison := Data.Functor.Classes.compare1. -Local Definition Ord__Product_op_zl__ {inst_f : Type -> Type} {inst_g +#[local] Definition Ord__Product_op_zl__ {inst_f : Type -> Type} {inst_g : Type -> Type} {inst_a : Type} `{Data.Functor.Classes.Ord1 inst_f} `{Data.Functor.Classes.Ord1 inst_g} `{GHC.Base.Ord inst_a} : Product inst_f inst_g inst_a -> Product inst_f inst_g inst_a -> bool := fun x y => Ord__Product_compare x y GHC.Base.== Lt. -Local Definition Ord__Product_op_zlze__ {inst_f : Type -> Type} {inst_g +#[local] Definition Ord__Product_op_zlze__ {inst_f : Type -> Type} {inst_g : Type -> Type} {inst_a : Type} `{Data.Functor.Classes.Ord1 inst_f} `{Data.Functor.Classes.Ord1 inst_g} `{GHC.Base.Ord inst_a} : Product inst_f inst_g inst_a -> Product inst_f inst_g inst_a -> bool := fun x y => Ord__Product_compare x y GHC.Base./= Gt. -Local Definition Ord__Product_op_zg__ {inst_f : Type -> Type} {inst_g +#[local] Definition Ord__Product_op_zg__ {inst_f : Type -> Type} {inst_g : Type -> Type} {inst_a : Type} `{Data.Functor.Classes.Ord1 inst_f} `{Data.Functor.Classes.Ord1 inst_g} `{GHC.Base.Ord inst_a} : Product inst_f inst_g inst_a -> Product inst_f inst_g inst_a -> bool := fun x y => Ord__Product_compare x y GHC.Base.== Gt. -Local Definition Ord__Product_op_zgze__ {inst_f : Type -> Type} {inst_g +#[local] Definition Ord__Product_op_zgze__ {inst_f : Type -> Type} {inst_g : Type -> Type} {inst_a : Type} `{Data.Functor.Classes.Ord1 inst_f} `{Data.Functor.Classes.Ord1 inst_g} `{GHC.Base.Ord inst_a} : Product inst_f inst_g inst_a -> Product inst_f inst_g inst_a -> bool := fun x y => Ord__Product_compare x y GHC.Base./= Lt. -Local Definition Ord__Product_max {inst_f : Type -> Type} {inst_g +#[local] Definition Ord__Product_max {inst_f : Type -> Type} {inst_g : Type -> Type} {inst_a : Type} `{Data.Functor.Classes.Ord1 inst_f} `{Data.Functor.Classes.Ord1 inst_g} `{GHC.Base.Ord inst_a} : Product inst_f inst_g inst_a -> Product inst_f inst_g inst_a -> Product inst_f inst_g inst_a := fun x y => if Ord__Product_op_zlze__ x y : bool then y else x. -Local Definition Ord__Product_min {inst_f : Type -> Type} {inst_g +#[local] Definition Ord__Product_min {inst_f : Type -> Type} {inst_g : Type -> Type} {inst_a : Type} `{Data.Functor.Classes.Ord1 inst_f} `{Data.Functor.Classes.Ord1 inst_g} `{GHC.Base.Ord inst_a} : Product inst_f inst_g inst_a -> Product inst_f inst_g inst_a -> Product inst_f inst_g inst_a := fun x y => if Ord__Product_op_zlze__ x y : bool then x else y. +#[global] Program Instance Ord__Product {f : Type -> Type} {g : Type -> Type} {a : Type} `{Data.Functor.Classes.Ord1 f} `{Data.Functor.Classes.Ord1 g} `{GHC.Base.Ord a} : GHC.Base.Ord (Product f g a) := @@ -174,7 +169,7 @@ Program Instance Ord__Product {f : Type -> Type} {g : Type -> Type} {a : Type} (* Skipping all instances of class `GHC.Show.Show', including `Data.Functor.Product.Show__Product' *) -Local Definition Functor__Product_fmap {inst_f : Type -> Type} {inst_g +#[local] Definition Functor__Product_fmap {inst_f : Type -> Type} {inst_g : Type -> Type} `{GHC.Base.Functor inst_f} `{GHC.Base.Functor inst_g} : forall {a : Type}, forall {b : Type}, @@ -185,12 +180,17 @@ Local Definition Functor__Product_fmap {inst_f : Type -> Type} {inst_g | f, Pair x y => Pair (GHC.Base.fmap f x) (GHC.Base.fmap f y) end. -Local Definition Functor__Product_op_zlzd__ {inst_f : Type -> Type} {inst_g +#[local] Definition Functor__Product_op_zlzd__ {inst_f : Type -> Type} {inst_g : Type -> Type} `{GHC.Base.Functor inst_f} `{GHC.Base.Functor inst_g} : forall {a : Type}, forall {b : Type}, a -> Product inst_f inst_g b -> Product inst_f inst_g a := - fun {a : Type} {b : Type} => Functor__Product_fmap GHC.Base.∘ GHC.Base.const. + fun {a : Type} {b : Type} => + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | a, Pair x y => Pair (a GHC.Base.<$ x) (a GHC.Base.<$ y) + end. +#[global] Program Instance Functor__Product {f : Type -> Type} {g : Type -> Type} `{GHC.Base.Functor f} `{GHC.Base.Functor g} : GHC.Base.Functor (Product f g) := @@ -199,7 +199,7 @@ Program Instance Functor__Product {f : Type -> Type} {g : Type -> Type} GHC.Base.op_zlzd____ := fun {a : Type} {b : Type} => Functor__Product_op_zlzd__ |}. -Local Definition Foldable__Product_foldMap {inst_f : Type -> Type} {inst_g +#[local] Definition Foldable__Product_foldMap {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable inst_g} : forall {m : Type}, @@ -212,26 +212,14 @@ Local Definition Foldable__Product_foldMap {inst_f : Type -> Type} {inst_g GHC.Base.mappend (Data.Foldable.foldMap f x) (Data.Foldable.foldMap f y) end. -Local Definition Foldable__Product_fold {inst_f : Type -> Type} {inst_g +#[local] Definition Foldable__Product_fold {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable inst_g} : forall {m : Type}, forall `{GHC.Base.Monoid m}, Product inst_f inst_g m -> m := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Product_foldMap GHC.Base.id. -Local Definition Foldable__Product_foldl {inst_f : Type -> Type} {inst_g - : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable - inst_g} - : forall {b : Type}, - forall {a : Type}, (b -> a -> b) -> b -> Product inst_f inst_g a -> b := - fun {b : Type} {a : Type} => - fun f z t => - Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual - (Foldable__Product_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ - (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ - GHC.Base.flip f)) t)) z. - -Local Definition Foldable__Product_foldr {inst_f : Type -> Type} {inst_g +#[local] Definition Foldable__Product_foldr {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable inst_g} : forall {a : Type}, @@ -241,7 +229,7 @@ Local Definition Foldable__Product_foldr {inst_f : Type -> Type} {inst_g Data.SemigroupInternal.appEndo (Foldable__Product_foldMap (Coq.Program.Basics.compose Data.SemigroupInternal.Mk_Endo f) t) z. -Local Definition Foldable__Product_foldl' {inst_f : Type -> Type} {inst_g +#[local] Definition Foldable__Product_foldl' {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable inst_g} : forall {b : Type}, @@ -251,7 +239,29 @@ Local Definition Foldable__Product_foldl' {inst_f : Type -> Type} {inst_g let f' := fun x k z => k (f z x) in Foldable__Product_foldr f' GHC.Base.id xs z0. -Local Definition Foldable__Product_foldr' {inst_f : Type -> Type} {inst_g +#[local] Definition Foldable__Product_foldMap' {inst_f : Type -> Type} {inst_g + : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable + inst_g} + : forall {m : Type}, + forall {a : Type}, + forall `{GHC.Base.Monoid m}, (a -> m) -> Product inst_f inst_g a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun f => + Foldable__Product_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. + +#[local] Definition Foldable__Product_foldl {inst_f : Type -> Type} {inst_g + : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable + inst_g} + : forall {b : Type}, + forall {a : Type}, (b -> a -> b) -> b -> Product inst_f inst_g a -> b := + fun {b : Type} {a : Type} => + fun f z t => + Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual + (Foldable__Product_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ + (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ + GHC.Base.flip f)) t)) z. + +#[local] Definition Foldable__Product_foldr' {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable inst_g} : forall {a : Type}, @@ -261,7 +271,7 @@ Local Definition Foldable__Product_foldr' {inst_f : Type -> Type} {inst_g let f' := fun k x z => k (f x z) in Foldable__Product_foldl f' GHC.Base.id xs z0. -Local Definition Foldable__Product_length {inst_f : Type -> Type} {inst_g +#[local] Definition Foldable__Product_length {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable inst_g} : forall {a : Type}, Product inst_f inst_g a -> GHC.Num.Int := @@ -271,13 +281,13 @@ Local Definition Foldable__Product_length {inst_f : Type -> Type} {inst_g | c, _ => c GHC.Num.+ #1 end) #0. -Local Definition Foldable__Product_null {inst_f : Type -> Type} {inst_g +#[local] Definition Foldable__Product_null {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable inst_g} : forall {a : Type}, Product inst_f inst_g a -> bool := fun {a : Type} => Foldable__Product_foldr (fun arg_0__ arg_1__ => false) true. -Local Definition Foldable__Product_product {inst_f : Type -> Type} {inst_g +#[local] Definition Foldable__Product_product {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable inst_g} : forall {a : Type}, forall `{GHC.Num.Num a}, Product inst_f inst_g a -> a := @@ -285,7 +295,7 @@ Local Definition Foldable__Product_product {inst_f : Type -> Type} {inst_g Coq.Program.Basics.compose Data.SemigroupInternal.getProduct (Foldable__Product_foldMap Data.SemigroupInternal.Mk_Product). -Local Definition Foldable__Product_sum {inst_f : Type -> Type} {inst_g +#[local] Definition Foldable__Product_sum {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable inst_g} : forall {a : Type}, forall `{GHC.Num.Num a}, Product inst_f inst_g a -> a := @@ -293,13 +303,14 @@ Local Definition Foldable__Product_sum {inst_f : Type -> Type} {inst_g Coq.Program.Basics.compose Data.SemigroupInternal.getSum (Foldable__Product_foldMap Data.SemigroupInternal.Mk_Sum). -Local Definition Foldable__Product_toList {inst_f : Type -> Type} {inst_g +#[local] Definition Foldable__Product_toList {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable inst_g} : forall {a : Type}, Product inst_f inst_g a -> list a := fun {a : Type} => fun t => GHC.Base.build' (fun _ => (fun c n => Foldable__Product_foldr c n t)). +#[global] Program Instance Foldable__Product {f : Type -> Type} {g : Type -> Type} `{Data.Foldable.Foldable f} `{Data.Foldable.Foldable g} : Data.Foldable.Foldable (Product f g) := @@ -308,6 +319,8 @@ Program Instance Foldable__Product {f : Type -> Type} {g : Type -> Type} Foldable__Product_fold ; Data.Foldable.foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => Foldable__Product_foldMap ; + Data.Foldable.foldMap'__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__Product_foldMap' ; Data.Foldable.foldl__ := fun {b : Type} {a : Type} => Foldable__Product_foldl ; Data.Foldable.foldl'__ := fun {b : Type} {a : Type} => Foldable__Product_foldl' ; @@ -322,8 +335,8 @@ Program Instance Foldable__Product {f : Type -> Type} {g : Type -> Type} Foldable__Product_sum ; Data.Foldable.toList__ := fun {a : Type} => Foldable__Product_toList |}. -Local Definition Traversable__Product_traverse {inst_f : Type -> Type} {inst_g - : Type -> Type} `{Data.Traversable.Traversable inst_f} +#[local] Definition Traversable__Product_traverse {inst_f : Type -> Type} + {inst_g : Type -> Type} `{Data.Traversable.Traversable inst_f} `{Data.Traversable.Traversable inst_g} : forall {f : Type -> Type}, forall {a : Type}, @@ -338,7 +351,7 @@ Local Definition Traversable__Product_traverse {inst_f : Type -> Type} {inst_g f y) end. -Local Definition Traversable__Product_mapM {inst_f : Type -> Type} {inst_g +#[local] Definition Traversable__Product_mapM {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Traversable.Traversable inst_f} `{Data.Traversable.Traversable inst_g} : forall {m : Type -> Type}, @@ -349,8 +362,8 @@ Local Definition Traversable__Product_mapM {inst_f : Type -> Type} {inst_g fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => Traversable__Product_traverse. -Local Definition Traversable__Product_sequenceA {inst_f : Type -> Type} {inst_g - : Type -> Type} `{Data.Traversable.Traversable inst_f} +#[local] Definition Traversable__Product_sequenceA {inst_f : Type -> Type} + {inst_g : Type -> Type} `{Data.Traversable.Traversable inst_f} `{Data.Traversable.Traversable inst_g} : forall {f : Type -> Type}, forall {a : Type}, @@ -359,8 +372,8 @@ Local Definition Traversable__Product_sequenceA {inst_f : Type -> Type} {inst_g fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => Traversable__Product_traverse GHC.Base.id. -Local Definition Traversable__Product_sequence {inst_f : Type -> Type} {inst_g - : Type -> Type} `{Data.Traversable.Traversable inst_f} +#[local] Definition Traversable__Product_sequence {inst_f : Type -> Type} + {inst_g : Type -> Type} `{Data.Traversable.Traversable inst_f} `{Data.Traversable.Traversable inst_g} : forall {m : Type -> Type}, forall {a : Type}, @@ -369,6 +382,7 @@ Local Definition Traversable__Product_sequence {inst_f : Type -> Type} {inst_g fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => Traversable__Product_sequenceA. +#[global] Program Instance Traversable__Product {f : Type -> Type} {g : Type -> Type} `{Data.Traversable.Traversable f} `{Data.Traversable.Traversable g} : Data.Traversable.Traversable (Product f g) := @@ -392,7 +406,7 @@ Program Instance Traversable__Product {f : Type -> Type} {g : Type -> Type} `{GHC.Base.Applicative f} => Traversable__Product_traverse |}. -Local Definition Applicative__Product_liftA2 {inst_f : Type -> Type} {inst_g +#[local] Definition Applicative__Product_liftA2 {inst_f : Type -> Type} {inst_g : Type -> Type} `{GHC.Base.Applicative inst_f} `{GHC.Base.Applicative inst_g} : forall {a : Type}, forall {b : Type}, @@ -405,7 +419,7 @@ Local Definition Applicative__Product_liftA2 {inst_f : Type -> Type} {inst_g | f, Pair a b, Pair x y => Pair (GHC.Base.liftA2 f a x) (GHC.Base.liftA2 f b y) end. -Local Definition Applicative__Product_op_zlztzg__ {inst_f : Type -> Type} +#[local] Definition Applicative__Product_op_zlztzg__ {inst_f : Type -> Type} {inst_g : Type -> Type} `{GHC.Base.Applicative inst_f} `{GHC.Base.Applicative inst_g} : forall {a : Type}, @@ -418,19 +432,21 @@ Local Definition Applicative__Product_op_zlztzg__ {inst_f : Type -> Type} | Pair f g, Pair x y => Pair (f GHC.Base.<*> x) (g GHC.Base.<*> y) end. -Local Definition Applicative__Product_op_ztzg__ {inst_f : Type -> Type} {inst_g - : Type -> Type} `{GHC.Base.Applicative inst_f} `{GHC.Base.Applicative inst_g} +#[local] Definition Applicative__Product_op_ztzg__ {inst_f : Type -> Type} + {inst_g : Type -> Type} `{GHC.Base.Applicative inst_f} `{GHC.Base.Applicative + inst_g} : forall {a : Type}, forall {b : Type}, Product inst_f inst_g a -> Product inst_f inst_g b -> Product inst_f inst_g b := fun {a : Type} {b : Type} => fun a1 a2 => Applicative__Product_op_zlztzg__ (GHC.Base.id GHC.Base.<$ a1) a2. -Local Definition Applicative__Product_pure {inst_f : Type -> Type} {inst_g +#[local] Definition Applicative__Product_pure {inst_f : Type -> Type} {inst_g : Type -> Type} `{GHC.Base.Applicative inst_f} `{GHC.Base.Applicative inst_g} : forall {a : Type}, a -> Product inst_f inst_g a := fun {a : Type} => fun x => Pair (GHC.Base.pure x) (GHC.Base.pure x). +#[global] Program Instance Applicative__Product {f : Type -> Type} {g : Type -> Type} `{GHC.Base.Applicative f} `{GHC.Base.Applicative g} : GHC.Base.Applicative (Product f g) := @@ -446,7 +462,7 @@ Program Instance Applicative__Product {f : Type -> Type} {g : Type -> Type} (* Skipping all instances of class `GHC.Base.Alternative', including `Data.Functor.Product.Alternative__Product' *) -Local Definition Monad__Product_op_zgzgze__ {inst_f : Type -> Type} {inst_g +#[local] Definition Monad__Product_op_zgzgze__ {inst_f : Type -> Type} {inst_g : Type -> Type} `{GHC.Base.Monad inst_f} `{GHC.Base.Monad inst_g} : forall {a : Type}, forall {b : Type}, @@ -461,7 +477,7 @@ Local Definition Monad__Product_op_zgzgze__ {inst_f : Type -> Type} {inst_g Pair (m GHC.Base.>>= (fstP GHC.Base.∘ f)) (n GHC.Base.>>= (sndP GHC.Base.∘ f)) end. -Local Definition Monad__Product_op_zgzg__ {inst_f : Type -> Type} {inst_g +#[local] Definition Monad__Product_op_zgzg__ {inst_f : Type -> Type} {inst_g : Type -> Type} `{GHC.Base.Monad inst_f} `{GHC.Base.Monad inst_g} : forall {a : Type}, forall {b : Type}, @@ -469,11 +485,12 @@ Local Definition Monad__Product_op_zgzg__ {inst_f : Type -> Type} {inst_g fun {a : Type} {b : Type} => fun m k => Monad__Product_op_zgzgze__ m (fun arg_0__ => k). -Local Definition Monad__Product_return_ {inst_f : Type -> Type} {inst_g +#[local] Definition Monad__Product_return_ {inst_f : Type -> Type} {inst_g : Type -> Type} `{GHC.Base.Monad inst_f} `{GHC.Base.Monad inst_g} : forall {a : Type}, a -> Product inst_f inst_g a := fun {a : Type} => GHC.Base.pure. +#[global] Program Instance Monad__Product {f : Type -> Type} {g : Type -> Type} `{GHC.Base.Monad f} `{GHC.Base.Monad g} : GHC.Base.Monad (Product f g) := @@ -490,7 +507,7 @@ Program Instance Monad__Product {f : Type -> Type} {g : Type -> Type} (* Skipping all instances of class `Control.Monad.Fix.MonadFix', including `Data.Functor.Product.MonadFix__Product' *) -Local Definition MonadZip__Product_munzip {inst_f : Type -> Type} {inst_g +#[local] Definition MonadZip__Product_munzip {inst_f : Type -> Type} {inst_g : Type -> Type} `{Control.Monad.Zip.MonadZip inst_f} `{Control.Monad.Zip.MonadZip inst_g} : forall {a : Type}, @@ -501,7 +518,7 @@ Local Definition MonadZip__Product_munzip {inst_f : Type -> Type} {inst_g fun mab => pair (GHC.Base.liftM Data.Tuple.fst mab) (GHC.Base.liftM Data.Tuple.snd mab). -Local Definition MonadZip__Product_mzipWith {inst_f : Type -> Type} {inst_g +#[local] Definition MonadZip__Product_mzipWith {inst_f : Type -> Type} {inst_g : Type -> Type} `{Control.Monad.Zip.MonadZip inst_f} `{Control.Monad.Zip.MonadZip inst_g} : forall {a : Type}, @@ -516,7 +533,7 @@ Local Definition MonadZip__Product_mzipWith {inst_f : Type -> Type} {inst_g Pair (Control.Monad.Zip.mzipWith f x1 x2) (Control.Monad.Zip.mzipWith f y1 y2) end. -Local Definition MonadZip__Product_mzip {inst_f : Type -> Type} {inst_g +#[local] Definition MonadZip__Product_mzip {inst_f : Type -> Type} {inst_g : Type -> Type} `{Control.Monad.Zip.MonadZip inst_f} `{Control.Monad.Zip.MonadZip inst_g} : forall {a : Type}, @@ -525,6 +542,7 @@ Local Definition MonadZip__Product_mzip {inst_f : Type -> Type} {inst_g Product inst_f inst_g b -> Product inst_f inst_g (a * b)%type := fun {a : Type} {b : Type} => MonadZip__Product_mzipWith GHC.Tuple.pair2. +#[global] Program Instance MonadZip__Product {f : Type -> Type} {g : Type -> Type} `{Control.Monad.Zip.MonadZip f} `{Control.Monad.Zip.MonadZip g} : Control.Monad.Zip.MonadZip (Product f g) := @@ -540,12 +558,12 @@ Program Instance MonadZip__Product {f : Type -> Type} {g : Type -> Type} Gt Lt Type andb bool comparison false list negb op_zt__ pair true Control.Monad.Zip.MonadZip Control.Monad.Zip.munzip__ Control.Monad.Zip.mzipWith Control.Monad.Zip.mzipWith__ Control.Monad.Zip.mzip__ Coq.Program.Basics.compose - Data.Foldable.Foldable Data.Foldable.foldMap Data.Foldable.foldMap__ - Data.Foldable.fold__ Data.Foldable.foldl'__ Data.Foldable.foldl__ - Data.Foldable.foldr'__ Data.Foldable.foldr__ Data.Foldable.length__ - Data.Foldable.null__ Data.Foldable.product__ Data.Foldable.sum__ - Data.Foldable.toList__ Data.Functor.Classes.Eq1 Data.Functor.Classes.Ord1 - Data.Functor.Classes.compare1 Data.Functor.Classes.eq1 + Data.Foldable.Foldable Data.Foldable.foldMap Data.Foldable.foldMap'__ + Data.Foldable.foldMap__ Data.Foldable.fold__ Data.Foldable.foldl'__ + Data.Foldable.foldl__ Data.Foldable.foldr'__ Data.Foldable.foldr__ + Data.Foldable.length__ Data.Foldable.null__ Data.Foldable.product__ + Data.Foldable.sum__ Data.Foldable.toList__ Data.Functor.Classes.Eq1 + Data.Functor.Classes.Ord1 Data.Functor.Classes.compare1 Data.Functor.Classes.eq1 Data.Functor.Classes.liftCompare Data.Functor.Classes.liftCompare__ Data.Functor.Classes.liftEq Data.Functor.Classes.liftEq__ Data.SemigroupInternal.Mk_Dual Data.SemigroupInternal.Mk_Endo @@ -556,14 +574,15 @@ Program Instance MonadZip__Product {f : Type -> Type} {g : Type -> Type} Data.Traversable.sequenceA__ Data.Traversable.sequence__ Data.Traversable.traverse Data.Traversable.traverse__ Data.Tuple.fst Data.Tuple.snd GHC.Base.Applicative GHC.Base.Eq_ GHC.Base.Functor GHC.Base.Monad - GHC.Base.Monoid GHC.Base.Ord GHC.Base.build' GHC.Base.compare__ GHC.Base.const - GHC.Base.flip GHC.Base.fmap GHC.Base.fmap__ GHC.Base.id GHC.Base.liftA2 - GHC.Base.liftA2__ GHC.Base.liftM GHC.Base.mappend GHC.Base.max__ GHC.Base.min__ + GHC.Base.Monoid GHC.Base.Ord GHC.Base.build' GHC.Base.compare__ GHC.Base.flip + GHC.Base.fmap GHC.Base.fmap__ GHC.Base.id GHC.Base.liftA2 GHC.Base.liftA2__ + GHC.Base.liftM GHC.Base.mappend GHC.Base.max__ GHC.Base.mempty GHC.Base.min__ GHC.Base.op_z2218U__ GHC.Base.op_zeze__ GHC.Base.op_zeze____ GHC.Base.op_zg____ GHC.Base.op_zgze____ GHC.Base.op_zgzg____ GHC.Base.op_zgzgze__ GHC.Base.op_zgzgze____ GHC.Base.op_zl____ GHC.Base.op_zlzd__ - GHC.Base.op_zlzd____ GHC.Base.op_zlze____ GHC.Base.op_zlztzg__ - GHC.Base.op_zlztzg____ GHC.Base.op_zsze__ GHC.Base.op_zsze____ - GHC.Base.op_ztzg____ GHC.Base.pure GHC.Base.pure__ GHC.Base.return___ - GHC.Num.Int GHC.Num.Num GHC.Num.fromInteger GHC.Num.op_zp__ GHC.Tuple.pair2 + GHC.Base.op_zlzd____ GHC.Base.op_zlze____ GHC.Base.op_zlzlzgzg__ + GHC.Base.op_zlztzg__ GHC.Base.op_zlztzg____ GHC.Base.op_zsze__ + GHC.Base.op_zsze____ GHC.Base.op_ztzg____ GHC.Base.pure GHC.Base.pure__ + GHC.Base.return___ GHC.Num.Int GHC.Num.Num GHC.Num.fromInteger GHC.Num.op_zp__ + GHC.Tuple.pair2 *) diff --git a/base/Data/Functor/Sum.h2ci b/base/Data/Functor/Sum.h2ci index ffd3ae583..358a653da 100644 --- a/base/Data/Functor/Sum.h2ci +++ b/base/Data/Functor/Sum.h2ci @@ -1,9 +1,9 @@ -constructors: - Data.Functor.Sum.Sum: ! '[Qualified "Data.Functor.Sum" "InL",Qualified "Data.Functor.Sum" - "InR"]' constructorFields: - Data.Functor.Sum.InR: NonRecordFields 1 Data.Functor.Sum.InL: NonRecordFields 1 + Data.Functor.Sum.InR: NonRecordFields 1 constructorTypes: - Data.Functor.Sum.InR: Qualified "Data.Functor.Sum" "Sum" Data.Functor.Sum.InL: Qualified "Data.Functor.Sum" "Sum" + Data.Functor.Sum.InR: Qualified "Data.Functor.Sum" "Sum" +constructors: + Data.Functor.Sum.Sum: '[Qualified "Data.Functor.Sum" "InL",Qualified "Data.Functor.Sum" + "InR"]' diff --git a/base/Data/Functor/Sum.v b/base/Data/Functor/Sum.v index 717bc9acf..3d4f90c28 100644 --- a/base/Data/Functor/Sum.v +++ b/base/Data/Functor/Sum.v @@ -36,17 +36,9 @@ Arguments InR {_} {_} {_} {_} _. (* Converted value declarations: *) -(* Skipping all instances of class `Data.Data.Data', including - `Data.Functor.Sum.Data__Sum' *) - -(* Skipping all instances of class `GHC.Generics.Generic', including - `Data.Functor.Sum.Generic__Sum' *) - -(* Skipping all instances of class `GHC.Generics.Generic1', including - `Data.Functor.Sum.Generic1__Sum__5' *) - -Local Definition Eq1__Sum_liftEq {inst_f : Type -> Type} {inst_g : Type -> Type} - `{Data.Functor.Classes.Eq1 inst_f} `{Data.Functor.Classes.Eq1 inst_g} +#[local] Definition Eq1__Sum_liftEq {inst_f : Type -> Type} {inst_g + : Type -> Type} `{Data.Functor.Classes.Eq1 inst_f} `{Data.Functor.Classes.Eq1 + inst_g} : forall {a : Type}, forall {b : Type}, (a -> b -> bool) -> Sum inst_f inst_g a -> Sum inst_f inst_g b -> bool := @@ -59,6 +51,7 @@ Local Definition Eq1__Sum_liftEq {inst_f : Type -> Type} {inst_g : Type -> Type} | eq, InR y1, InR y2 => Data.Functor.Classes.liftEq eq y1 y2 end. +#[global] Program Instance Eq1__Sum {f : Type -> Type} {g : Type -> Type} `{Data.Functor.Classes.Eq1 f} `{Data.Functor.Classes.Eq1 g} : Data.Functor.Classes.Eq1 (Sum f g) := @@ -66,7 +59,7 @@ Program Instance Eq1__Sum {f : Type -> Type} {g : Type -> Type} k__ {| Data.Functor.Classes.liftEq__ := fun {a : Type} {b : Type} => Eq1__Sum_liftEq |}. -Local Definition Ord1__Sum_liftCompare {inst_f : Type -> Type} {inst_g +#[local] Definition Ord1__Sum_liftCompare {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Functor.Classes.Ord1 inst_f} `{Data.Functor.Classes.Ord1 inst_g} : forall {a : Type}, @@ -82,6 +75,7 @@ Local Definition Ord1__Sum_liftCompare {inst_f : Type -> Type} {inst_g | comp, InR y1, InR y2 => Data.Functor.Classes.liftCompare comp y1 y2 end. +#[global] Program Instance Ord1__Sum {f : Type -> Type} {g : Type -> Type} `{Data.Functor.Classes.Ord1 f} `{Data.Functor.Classes.Ord1 g} : Data.Functor.Classes.Ord1 (Sum f g) := @@ -95,18 +89,19 @@ Program Instance Ord1__Sum {f : Type -> Type} {g : Type -> Type} (* Skipping all instances of class `Data.Functor.Classes.Show1', including `Data.Functor.Sum.Show1__Sum' *) -Local Definition Eq___Sum_op_zeze__ {inst_f : Type -> Type} {inst_g +#[local] Definition Eq___Sum_op_zeze__ {inst_f : Type -> Type} {inst_g : Type -> Type} {inst_a : Type} `{Data.Functor.Classes.Eq1 inst_f} `{Data.Functor.Classes.Eq1 inst_g} `{GHC.Base.Eq_ inst_a} : Sum inst_f inst_g inst_a -> Sum inst_f inst_g inst_a -> bool := Data.Functor.Classes.eq1. -Local Definition Eq___Sum_op_zsze__ {inst_f : Type -> Type} {inst_g +#[local] Definition Eq___Sum_op_zsze__ {inst_f : Type -> Type} {inst_g : Type -> Type} {inst_a : Type} `{Data.Functor.Classes.Eq1 inst_f} `{Data.Functor.Classes.Eq1 inst_g} `{GHC.Base.Eq_ inst_a} : Sum inst_f inst_g inst_a -> Sum inst_f inst_g inst_a -> bool := fun x y => negb (Eq___Sum_op_zeze__ x y). +#[global] Program Instance Eq___Sum {f : Type -> Type} {g : Type -> Type} {a : Type} `{Data.Functor.Classes.Eq1 f} `{Data.Functor.Classes.Eq1 g} `{GHC.Base.Eq_ a} : GHC.Base.Eq_ (Sum f g a) := @@ -114,50 +109,51 @@ Program Instance Eq___Sum {f : Type -> Type} {g : Type -> Type} {a : Type} k__ {| GHC.Base.op_zeze____ := Eq___Sum_op_zeze__ ; GHC.Base.op_zsze____ := Eq___Sum_op_zsze__ |}. -Local Definition Ord__Sum_compare {inst_f : Type -> Type} {inst_g +#[local] Definition Ord__Sum_compare {inst_f : Type -> Type} {inst_g : Type -> Type} {inst_a : Type} `{Data.Functor.Classes.Ord1 inst_f} `{Data.Functor.Classes.Ord1 inst_g} `{GHC.Base.Ord inst_a} : Sum inst_f inst_g inst_a -> Sum inst_f inst_g inst_a -> comparison := Data.Functor.Classes.compare1. -Local Definition Ord__Sum_op_zl__ {inst_f : Type -> Type} {inst_g +#[local] Definition Ord__Sum_op_zl__ {inst_f : Type -> Type} {inst_g : Type -> Type} {inst_a : Type} `{Data.Functor.Classes.Ord1 inst_f} `{Data.Functor.Classes.Ord1 inst_g} `{GHC.Base.Ord inst_a} : Sum inst_f inst_g inst_a -> Sum inst_f inst_g inst_a -> bool := fun x y => Ord__Sum_compare x y GHC.Base.== Lt. -Local Definition Ord__Sum_op_zlze__ {inst_f : Type -> Type} {inst_g +#[local] Definition Ord__Sum_op_zlze__ {inst_f : Type -> Type} {inst_g : Type -> Type} {inst_a : Type} `{Data.Functor.Classes.Ord1 inst_f} `{Data.Functor.Classes.Ord1 inst_g} `{GHC.Base.Ord inst_a} : Sum inst_f inst_g inst_a -> Sum inst_f inst_g inst_a -> bool := fun x y => Ord__Sum_compare x y GHC.Base./= Gt. -Local Definition Ord__Sum_op_zg__ {inst_f : Type -> Type} {inst_g +#[local] Definition Ord__Sum_op_zg__ {inst_f : Type -> Type} {inst_g : Type -> Type} {inst_a : Type} `{Data.Functor.Classes.Ord1 inst_f} `{Data.Functor.Classes.Ord1 inst_g} `{GHC.Base.Ord inst_a} : Sum inst_f inst_g inst_a -> Sum inst_f inst_g inst_a -> bool := fun x y => Ord__Sum_compare x y GHC.Base.== Gt. -Local Definition Ord__Sum_op_zgze__ {inst_f : Type -> Type} {inst_g +#[local] Definition Ord__Sum_op_zgze__ {inst_f : Type -> Type} {inst_g : Type -> Type} {inst_a : Type} `{Data.Functor.Classes.Ord1 inst_f} `{Data.Functor.Classes.Ord1 inst_g} `{GHC.Base.Ord inst_a} : Sum inst_f inst_g inst_a -> Sum inst_f inst_g inst_a -> bool := fun x y => Ord__Sum_compare x y GHC.Base./= Lt. -Local Definition Ord__Sum_max {inst_f : Type -> Type} {inst_g : Type -> Type} +#[local] Definition Ord__Sum_max {inst_f : Type -> Type} {inst_g : Type -> Type} {inst_a : Type} `{Data.Functor.Classes.Ord1 inst_f} `{Data.Functor.Classes.Ord1 inst_g} `{GHC.Base.Ord inst_a} : Sum inst_f inst_g inst_a -> Sum inst_f inst_g inst_a -> Sum inst_f inst_g inst_a := fun x y => if Ord__Sum_op_zlze__ x y : bool then y else x. -Local Definition Ord__Sum_min {inst_f : Type -> Type} {inst_g : Type -> Type} +#[local] Definition Ord__Sum_min {inst_f : Type -> Type} {inst_g : Type -> Type} {inst_a : Type} `{Data.Functor.Classes.Ord1 inst_f} `{Data.Functor.Classes.Ord1 inst_g} `{GHC.Base.Ord inst_a} : Sum inst_f inst_g inst_a -> Sum inst_f inst_g inst_a -> Sum inst_f inst_g inst_a := fun x y => if Ord__Sum_op_zlze__ x y : bool then x else y. +#[global] Program Instance Ord__Sum {f : Type -> Type} {g : Type -> Type} {a : Type} `{Data.Functor.Classes.Ord1 f} `{Data.Functor.Classes.Ord1 g} `{GHC.Base.Ord a} : GHC.Base.Ord (Sum f g a) := @@ -176,7 +172,7 @@ Program Instance Ord__Sum {f : Type -> Type} {g : Type -> Type} {a : Type} (* Skipping all instances of class `GHC.Show.Show', including `Data.Functor.Sum.Show__Sum' *) -Local Definition Functor__Sum_fmap {inst_f : Type -> Type} {inst_g +#[local] Definition Functor__Sum_fmap {inst_f : Type -> Type} {inst_g : Type -> Type} `{GHC.Base.Functor inst_f} `{GHC.Base.Functor inst_g} : forall {a : Type}, forall {b : Type}, (a -> b) -> Sum inst_f inst_g a -> Sum inst_f inst_g b := @@ -187,12 +183,18 @@ Local Definition Functor__Sum_fmap {inst_f : Type -> Type} {inst_g | f, InR y => InR (GHC.Base.fmap f y) end. -Local Definition Functor__Sum_op_zlzd__ {inst_f : Type -> Type} {inst_g +#[local] Definition Functor__Sum_op_zlzd__ {inst_f : Type -> Type} {inst_g : Type -> Type} `{GHC.Base.Functor inst_f} `{GHC.Base.Functor inst_g} : forall {a : Type}, forall {b : Type}, a -> Sum inst_f inst_g b -> Sum inst_f inst_g a := - fun {a : Type} {b : Type} => Functor__Sum_fmap GHC.Base.∘ GHC.Base.const. + fun {a : Type} {b : Type} => + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | a, InL x => InL (a GHC.Base.<$ x) + | a, InR y => InR (a GHC.Base.<$ y) + end. +#[global] Program Instance Functor__Sum {f : Type -> Type} {g : Type -> Type} `{GHC.Base.Functor f} `{GHC.Base.Functor g} : GHC.Base.Functor (Sum f g) := @@ -200,7 +202,7 @@ Program Instance Functor__Sum {f : Type -> Type} {g : Type -> Type} k__ {| GHC.Base.fmap__ := fun {a : Type} {b : Type} => Functor__Sum_fmap ; GHC.Base.op_zlzd____ := fun {a : Type} {b : Type} => Functor__Sum_op_zlzd__ |}. -Local Definition Foldable__Sum_foldMap {inst_f : Type -> Type} {inst_g +#[local] Definition Foldable__Sum_foldMap {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable inst_g} : forall {m : Type}, @@ -213,25 +215,13 @@ Local Definition Foldable__Sum_foldMap {inst_f : Type -> Type} {inst_g | f, InR y => Data.Foldable.foldMap f y end. -Local Definition Foldable__Sum_fold {inst_f : Type -> Type} {inst_g +#[local] Definition Foldable__Sum_fold {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable inst_g} : forall {m : Type}, forall `{GHC.Base.Monoid m}, Sum inst_f inst_g m -> m := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Sum_foldMap GHC.Base.id. -Local Definition Foldable__Sum_foldl {inst_f : Type -> Type} {inst_g - : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable - inst_g} - : forall {b : Type}, - forall {a : Type}, (b -> a -> b) -> b -> Sum inst_f inst_g a -> b := - fun {b : Type} {a : Type} => - fun f z t => - Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual - (Foldable__Sum_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ - (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ - GHC.Base.flip f)) t)) z. - -Local Definition Foldable__Sum_foldr {inst_f : Type -> Type} {inst_g +#[local] Definition Foldable__Sum_foldr {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable inst_g} : forall {a : Type}, @@ -241,7 +231,7 @@ Local Definition Foldable__Sum_foldr {inst_f : Type -> Type} {inst_g Data.SemigroupInternal.appEndo (Foldable__Sum_foldMap (Coq.Program.Basics.compose Data.SemigroupInternal.Mk_Endo f) t) z. -Local Definition Foldable__Sum_foldl' {inst_f : Type -> Type} {inst_g +#[local] Definition Foldable__Sum_foldl' {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable inst_g} : forall {b : Type}, @@ -250,7 +240,29 @@ Local Definition Foldable__Sum_foldl' {inst_f : Type -> Type} {inst_g fun f z0 xs => let f' := fun x k z => k (f z x) in Foldable__Sum_foldr f' GHC.Base.id xs z0. -Local Definition Foldable__Sum_foldr' {inst_f : Type -> Type} {inst_g +#[local] Definition Foldable__Sum_foldMap' {inst_f : Type -> Type} {inst_g + : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable + inst_g} + : forall {m : Type}, + forall {a : Type}, + forall `{GHC.Base.Monoid m}, (a -> m) -> Sum inst_f inst_g a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun f => + Foldable__Sum_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. + +#[local] Definition Foldable__Sum_foldl {inst_f : Type -> Type} {inst_g + : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable + inst_g} + : forall {b : Type}, + forall {a : Type}, (b -> a -> b) -> b -> Sum inst_f inst_g a -> b := + fun {b : Type} {a : Type} => + fun f z t => + Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual + (Foldable__Sum_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ + (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ + GHC.Base.flip f)) t)) z. + +#[local] Definition Foldable__Sum_foldr' {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable inst_g} : forall {a : Type}, @@ -259,7 +271,7 @@ Local Definition Foldable__Sum_foldr' {inst_f : Type -> Type} {inst_g fun f z0 xs => let f' := fun k x z => k (f x z) in Foldable__Sum_foldl f' GHC.Base.id xs z0. -Local Definition Foldable__Sum_length {inst_f : Type -> Type} {inst_g +#[local] Definition Foldable__Sum_length {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable inst_g} : forall {a : Type}, Sum inst_f inst_g a -> GHC.Num.Int := @@ -269,13 +281,13 @@ Local Definition Foldable__Sum_length {inst_f : Type -> Type} {inst_g | c, _ => c GHC.Num.+ #1 end) #0. -Local Definition Foldable__Sum_null {inst_f : Type -> Type} {inst_g +#[local] Definition Foldable__Sum_null {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable inst_g} : forall {a : Type}, Sum inst_f inst_g a -> bool := fun {a : Type} => Foldable__Sum_foldr (fun arg_0__ arg_1__ => false) true. -Local Definition Foldable__Sum_product {inst_f : Type -> Type} {inst_g +#[local] Definition Foldable__Sum_product {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable inst_g} : forall {a : Type}, forall `{GHC.Num.Num a}, Sum inst_f inst_g a -> a := @@ -283,7 +295,7 @@ Local Definition Foldable__Sum_product {inst_f : Type -> Type} {inst_g Coq.Program.Basics.compose Data.SemigroupInternal.getProduct (Foldable__Sum_foldMap Data.SemigroupInternal.Mk_Product). -Local Definition Foldable__Sum_sum {inst_f : Type -> Type} {inst_g +#[local] Definition Foldable__Sum_sum {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable inst_g} : forall {a : Type}, forall `{GHC.Num.Num a}, Sum inst_f inst_g a -> a := @@ -291,13 +303,14 @@ Local Definition Foldable__Sum_sum {inst_f : Type -> Type} {inst_g Coq.Program.Basics.compose Data.SemigroupInternal.getSum (Foldable__Sum_foldMap Data.SemigroupInternal.Mk_Sum). -Local Definition Foldable__Sum_toList {inst_f : Type -> Type} {inst_g +#[local] Definition Foldable__Sum_toList {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Foldable.Foldable inst_f} `{Data.Foldable.Foldable inst_g} : forall {a : Type}, Sum inst_f inst_g a -> list a := fun {a : Type} => fun t => GHC.Base.build' (fun _ => (fun c n => Foldable__Sum_foldr c n t)). +#[global] Program Instance Foldable__Sum {f : Type -> Type} {g : Type -> Type} `{Data.Foldable.Foldable f} `{Data.Foldable.Foldable g} : Data.Foldable.Foldable (Sum f g) := @@ -306,6 +319,8 @@ Program Instance Foldable__Sum {f : Type -> Type} {g : Type -> Type} Foldable__Sum_fold ; Data.Foldable.foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => Foldable__Sum_foldMap ; + Data.Foldable.foldMap'__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__Sum_foldMap' ; Data.Foldable.foldl__ := fun {b : Type} {a : Type} => Foldable__Sum_foldl ; Data.Foldable.foldl'__ := fun {b : Type} {a : Type} => Foldable__Sum_foldl' ; Data.Foldable.foldr__ := fun {a : Type} {b : Type} => Foldable__Sum_foldr ; @@ -317,7 +332,7 @@ Program Instance Foldable__Sum {f : Type -> Type} {g : Type -> Type} Data.Foldable.sum__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__Sum_sum ; Data.Foldable.toList__ := fun {a : Type} => Foldable__Sum_toList |}. -Local Definition Traversable__Sum_traverse {inst_f : Type -> Type} {inst_g +#[local] Definition Traversable__Sum_traverse {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Traversable.Traversable inst_f} `{Data.Traversable.Traversable inst_g} : forall {f : Type -> Type}, @@ -332,7 +347,7 @@ Local Definition Traversable__Sum_traverse {inst_f : Type -> Type} {inst_g | f, InR y => InR Data.Functor.<$> Data.Traversable.traverse f y end. -Local Definition Traversable__Sum_mapM {inst_f : Type -> Type} {inst_g +#[local] Definition Traversable__Sum_mapM {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Traversable.Traversable inst_f} `{Data.Traversable.Traversable inst_g} : forall {m : Type -> Type}, @@ -343,7 +358,7 @@ Local Definition Traversable__Sum_mapM {inst_f : Type -> Type} {inst_g fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => Traversable__Sum_traverse. -Local Definition Traversable__Sum_sequenceA {inst_f : Type -> Type} {inst_g +#[local] Definition Traversable__Sum_sequenceA {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Traversable.Traversable inst_f} `{Data.Traversable.Traversable inst_g} : forall {f : Type -> Type}, @@ -353,7 +368,7 @@ Local Definition Traversable__Sum_sequenceA {inst_f : Type -> Type} {inst_g fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => Traversable__Sum_traverse GHC.Base.id. -Local Definition Traversable__Sum_sequence {inst_f : Type -> Type} {inst_g +#[local] Definition Traversable__Sum_sequence {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Traversable.Traversable inst_f} `{Data.Traversable.Traversable inst_g} : forall {m : Type -> Type}, @@ -363,6 +378,7 @@ Local Definition Traversable__Sum_sequence {inst_f : Type -> Type} {inst_g fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => Traversable__Sum_sequenceA. +#[global] Program Instance Traversable__Sum {f : Type -> Type} {g : Type -> Type} `{Data.Traversable.Traversable f} `{Data.Traversable.Traversable g} : Data.Traversable.Traversable (Sum f g) := @@ -388,25 +404,26 @@ Program Instance Traversable__Sum {f : Type -> Type} {g : Type -> Type} (* External variables: Gt Lt Type bool comparison false list negb true Coq.Program.Basics.compose - Data.Foldable.Foldable Data.Foldable.foldMap Data.Foldable.foldMap__ - Data.Foldable.fold__ Data.Foldable.foldl'__ Data.Foldable.foldl__ - Data.Foldable.foldr'__ Data.Foldable.foldr__ Data.Foldable.length__ - Data.Foldable.null__ Data.Foldable.product__ Data.Foldable.sum__ - Data.Foldable.toList__ Data.Functor.op_zlzdzg__ Data.Functor.Classes.Eq1 - Data.Functor.Classes.Ord1 Data.Functor.Classes.compare1 Data.Functor.Classes.eq1 - Data.Functor.Classes.liftCompare Data.Functor.Classes.liftCompare__ - Data.Functor.Classes.liftEq Data.Functor.Classes.liftEq__ - Data.SemigroupInternal.Mk_Dual Data.SemigroupInternal.Mk_Endo - Data.SemigroupInternal.Mk_Product Data.SemigroupInternal.Mk_Sum - Data.SemigroupInternal.appEndo Data.SemigroupInternal.getDual - Data.SemigroupInternal.getProduct Data.SemigroupInternal.getSum - Data.Traversable.Traversable Data.Traversable.mapM__ - Data.Traversable.sequenceA__ Data.Traversable.sequence__ + Data.Foldable.Foldable Data.Foldable.foldMap Data.Foldable.foldMap'__ + Data.Foldable.foldMap__ Data.Foldable.fold__ Data.Foldable.foldl'__ + Data.Foldable.foldl__ Data.Foldable.foldr'__ Data.Foldable.foldr__ + Data.Foldable.length__ Data.Foldable.null__ Data.Foldable.product__ + Data.Foldable.sum__ Data.Foldable.toList__ Data.Functor.op_zlzdzg__ + Data.Functor.Classes.Eq1 Data.Functor.Classes.Ord1 Data.Functor.Classes.compare1 + Data.Functor.Classes.eq1 Data.Functor.Classes.liftCompare + Data.Functor.Classes.liftCompare__ Data.Functor.Classes.liftEq + Data.Functor.Classes.liftEq__ Data.SemigroupInternal.Mk_Dual + Data.SemigroupInternal.Mk_Endo Data.SemigroupInternal.Mk_Product + Data.SemigroupInternal.Mk_Sum Data.SemigroupInternal.appEndo + Data.SemigroupInternal.getDual Data.SemigroupInternal.getProduct + Data.SemigroupInternal.getSum Data.Traversable.Traversable + Data.Traversable.mapM__ Data.Traversable.sequenceA__ Data.Traversable.sequence__ Data.Traversable.traverse Data.Traversable.traverse__ GHC.Base.Applicative GHC.Base.Eq_ GHC.Base.Functor GHC.Base.Monad GHC.Base.Monoid GHC.Base.Ord - GHC.Base.build' GHC.Base.compare__ GHC.Base.const GHC.Base.flip GHC.Base.fmap - GHC.Base.fmap__ GHC.Base.id GHC.Base.max__ GHC.Base.min__ GHC.Base.op_z2218U__ + GHC.Base.build' GHC.Base.compare__ GHC.Base.flip GHC.Base.fmap GHC.Base.fmap__ + GHC.Base.id GHC.Base.max__ GHC.Base.mempty GHC.Base.min__ GHC.Base.op_z2218U__ GHC.Base.op_zeze__ GHC.Base.op_zeze____ GHC.Base.op_zg____ GHC.Base.op_zgze____ - GHC.Base.op_zl____ GHC.Base.op_zlzd____ GHC.Base.op_zlze____ GHC.Base.op_zsze__ - GHC.Base.op_zsze____ GHC.Num.Int GHC.Num.Num GHC.Num.fromInteger GHC.Num.op_zp__ + GHC.Base.op_zl____ GHC.Base.op_zlzd__ GHC.Base.op_zlzd____ GHC.Base.op_zlze____ + GHC.Base.op_zlzlzgzg__ GHC.Base.op_zsze__ GHC.Base.op_zsze____ GHC.Num.Int + GHC.Num.Num GHC.Num.fromInteger GHC.Num.op_zp__ *) diff --git a/base/Data/Functor/Utils.h2ci b/base/Data/Functor/Utils.h2ci index ca6a79d21..81f55b992 100644 --- a/base/Data/Functor/Utils.h2ci +++ b/base/Data/Functor/Utils.h2ci @@ -1,20 +1,20 @@ -constructors: - Data.Functor.Utils.Max: ! '[Qualified "Data.Functor.Utils" "Mk_Max"]' - Data.Functor.Utils.StateR: ! '[Qualified "Data.Functor.Utils" "Mk_StateR"]' - Data.Functor.Utils.Min: ! '[Qualified "Data.Functor.Utils" "Mk_Min"]' - Data.Functor.Utils.StateL: ! '[Qualified "Data.Functor.Utils" "Mk_StateL"]' constructorFields: - Data.Functor.Utils.Mk_StateR: RecordFields [Qualified "Data.Functor.Utils" "runStateR"] Data.Functor.Utils.Mk_Min: RecordFields [Qualified "Data.Functor.Utils" "getMin"] Data.Functor.Utils.Mk_StateL: RecordFields [Qualified "Data.Functor.Utils" "runStateL"] Data.Functor.Utils.Mk_Max: RecordFields [Qualified "Data.Functor.Utils" "getMax"] -recordFieldTypes: - Data.Functor.Utils.runStateR: Qualified "Data.Functor.Utils" "StateR" - Data.Functor.Utils.getMin: Qualified "Data.Functor.Utils" "Min" - Data.Functor.Utils.getMax: Qualified "Data.Functor.Utils" "Max" - Data.Functor.Utils.runStateL: Qualified "Data.Functor.Utils" "StateL" + Data.Functor.Utils.Mk_StateR: RecordFields [Qualified "Data.Functor.Utils" "runStateR"] constructorTypes: - Data.Functor.Utils.Mk_StateR: Qualified "Data.Functor.Utils" "StateR" Data.Functor.Utils.Mk_Min: Qualified "Data.Functor.Utils" "Min" Data.Functor.Utils.Mk_StateL: Qualified "Data.Functor.Utils" "StateL" Data.Functor.Utils.Mk_Max: Qualified "Data.Functor.Utils" "Max" + Data.Functor.Utils.Mk_StateR: Qualified "Data.Functor.Utils" "StateR" +constructors: + Data.Functor.Utils.Min: '[Qualified "Data.Functor.Utils" "Mk_Min"]' + Data.Functor.Utils.StateL: '[Qualified "Data.Functor.Utils" "Mk_StateL"]' + Data.Functor.Utils.Max: '[Qualified "Data.Functor.Utils" "Mk_Max"]' + Data.Functor.Utils.StateR: '[Qualified "Data.Functor.Utils" "Mk_StateR"]' +recordFieldTypes: + Data.Functor.Utils.runStateR: Qualified "Data.Functor.Utils" "StateR" + Data.Functor.Utils.getMax: Qualified "Data.Functor.Utils" "Max" + Data.Functor.Utils.getMin: Qualified "Data.Functor.Utils" "Min" + Data.Functor.Utils.runStateL: Qualified "Data.Functor.Utils" "StateL" diff --git a/base/Data/Functor/Utils.v b/base/Data/Functor/Utils.v index e77cb8796..2982a405f 100644 --- a/base/Data/Functor/Utils.v +++ b/base/Data/Functor/Utils.v @@ -35,19 +35,19 @@ Arguments Mk_Min {_} _. Arguments Mk_Max {_} _. -Definition runStateR {s} {a} (arg_0__ : StateR s a) := +#[global] Definition runStateR {s} {a} (arg_0__ : StateR s a) := let 'Mk_StateR runStateR := arg_0__ in runStateR. -Definition runStateL {s} {a} (arg_0__ : StateL s a) := +#[global] Definition runStateL {s} {a} (arg_0__ : StateL s a) := let 'Mk_StateL runStateL := arg_0__ in runStateL. -Definition getMin {a} (arg_0__ : Min a) := +#[global] Definition getMin {a} (arg_0__ : Min a) := let 'Mk_Min getMin := arg_0__ in getMin. -Definition getMax {a} (arg_0__ : Max a) := +#[global] Definition getMax {a} (arg_0__ : Max a) := let 'Mk_Max getMax := arg_0__ in getMax. @@ -66,7 +66,7 @@ Instance Unpeel_Max {a} : HsToCoq.Unpeel.Unpeel (Max a) (option a) (* Converted value declarations: *) -Local Definition Semigroup__Max_op_zlzlzgzg__ {inst_a : Type} `{GHC.Base.Ord +#[local] Definition Semigroup__Max_op_zlzlzgzg__ {inst_a : Type} `{GHC.Base.Ord inst_a} : Max inst_a -> Max inst_a -> Max inst_a := fun arg_0__ arg_1__ => @@ -78,22 +78,24 @@ Local Definition Semigroup__Max_op_zlzlzgzg__ {inst_a : Type} `{GHC.Base.Ord Mk_Max n end. +#[global] Program Instance Semigroup__Max {a : Type} `{GHC.Base.Ord a} : GHC.Base.Semigroup (Max a) := fun _ k__ => k__ {| GHC.Base.op_zlzlzgzg____ := Semigroup__Max_op_zlzlzgzg__ |}. -Local Definition Monoid__Max_mappend {inst_a : Type} `{GHC.Base.Ord inst_a} +#[local] Definition Monoid__Max_mappend {inst_a : Type} `{GHC.Base.Ord inst_a} : Max inst_a -> Max inst_a -> Max inst_a := _GHC.Base.<<>>_. -Local Definition Monoid__Max_mempty {inst_a : Type} `{GHC.Base.Ord inst_a} +#[local] Definition Monoid__Max_mempty {inst_a : Type} `{GHC.Base.Ord inst_a} : Max inst_a := Mk_Max None. -Local Definition Monoid__Max_mconcat {inst_a : Type} `{GHC.Base.Ord inst_a} +#[local] Definition Monoid__Max_mconcat {inst_a : Type} `{GHC.Base.Ord inst_a} : list (Max inst_a) -> Max inst_a := GHC.Base.foldr Monoid__Max_mappend Monoid__Max_mempty. +#[global] Program Instance Monoid__Max {a : Type} `{GHC.Base.Ord a} : GHC.Base.Monoid (Max a) := fun _ k__ => @@ -101,7 +103,7 @@ Program Instance Monoid__Max {a : Type} `{GHC.Base.Ord a} GHC.Base.mconcat__ := Monoid__Max_mconcat ; GHC.Base.mempty__ := Monoid__Max_mempty |}. -Local Definition Semigroup__Min_op_zlzlzgzg__ {inst_a : Type} `{GHC.Base.Ord +#[local] Definition Semigroup__Min_op_zlzlzgzg__ {inst_a : Type} `{GHC.Base.Ord inst_a} : Min inst_a -> Min inst_a -> Min inst_a := fun arg_0__ arg_1__ => @@ -113,22 +115,24 @@ Local Definition Semigroup__Min_op_zlzlzgzg__ {inst_a : Type} `{GHC.Base.Ord Mk_Min n end. +#[global] Program Instance Semigroup__Min {a : Type} `{GHC.Base.Ord a} : GHC.Base.Semigroup (Min a) := fun _ k__ => k__ {| GHC.Base.op_zlzlzgzg____ := Semigroup__Min_op_zlzlzgzg__ |}. -Local Definition Monoid__Min_mappend {inst_a : Type} `{GHC.Base.Ord inst_a} +#[local] Definition Monoid__Min_mappend {inst_a : Type} `{GHC.Base.Ord inst_a} : Min inst_a -> Min inst_a -> Min inst_a := _GHC.Base.<<>>_. -Local Definition Monoid__Min_mempty {inst_a : Type} `{GHC.Base.Ord inst_a} +#[local] Definition Monoid__Min_mempty {inst_a : Type} `{GHC.Base.Ord inst_a} : Min inst_a := Mk_Min None. -Local Definition Monoid__Min_mconcat {inst_a : Type} `{GHC.Base.Ord inst_a} +#[local] Definition Monoid__Min_mconcat {inst_a : Type} `{GHC.Base.Ord inst_a} : list (Min inst_a) -> Min inst_a := GHC.Base.foldr Monoid__Min_mappend Monoid__Min_mempty. +#[global] Program Instance Monoid__Min {a : Type} `{GHC.Base.Ord a} : GHC.Base.Monoid (Min a) := fun _ k__ => @@ -136,7 +140,7 @@ Program Instance Monoid__Min {a : Type} `{GHC.Base.Ord a} GHC.Base.mconcat__ := Monoid__Min_mconcat ; GHC.Base.mempty__ := Monoid__Min_mempty |}. -Local Definition Functor__StateL_fmap {inst_s : Type} +#[local] Definition Functor__StateL_fmap {inst_s : Type} : forall {a : Type}, forall {b : Type}, (a -> b) -> StateL inst_s a -> StateL inst_s b := fun {a : Type} {b : Type} => @@ -145,18 +149,19 @@ Local Definition Functor__StateL_fmap {inst_s : Type} | f, Mk_StateL k => Mk_StateL (fun s => let 'pair s' v := k s in pair s' (f v)) end. -Local Definition Functor__StateL_op_zlzd__ {inst_s : Type} +#[local] Definition Functor__StateL_op_zlzd__ {inst_s : Type} : forall {a : Type}, forall {b : Type}, a -> StateL inst_s b -> StateL inst_s a := fun {a : Type} {b : Type} => Functor__StateL_fmap GHC.Base.∘ GHC.Base.const. +#[global] Program Instance Functor__StateL {s : Type} : GHC.Base.Functor (StateL s) := fun _ k__ => k__ {| GHC.Base.fmap__ := fun {a : Type} {b : Type} => Functor__StateL_fmap ; GHC.Base.op_zlzd____ := fun {a : Type} {b : Type} => Functor__StateL_op_zlzd__ |}. -Local Definition Applicative__StateL_liftA2 {inst_s : Type} +#[local] Definition Applicative__StateL_liftA2 {inst_s : Type} : forall {a : Type}, forall {b : Type}, forall {c : Type}, @@ -171,7 +176,7 @@ Local Definition Applicative__StateL_liftA2 {inst_s : Type} pair s'' (f x y)) end. -Local Definition Applicative__StateL_op_zlztzg__ {inst_s : Type} +#[local] Definition Applicative__StateL_op_zlztzg__ {inst_s : Type} : forall {a : Type}, forall {b : Type}, StateL inst_s (a -> b) -> StateL inst_s a -> StateL inst_s b := @@ -185,16 +190,17 @@ Local Definition Applicative__StateL_op_zlztzg__ {inst_s : Type} pair s'' (f v)) end. -Local Definition Applicative__StateL_op_ztzg__ {inst_s : Type} +#[local] Definition Applicative__StateL_op_ztzg__ {inst_s : Type} : forall {a : Type}, forall {b : Type}, StateL inst_s a -> StateL inst_s b -> StateL inst_s b := fun {a : Type} {b : Type} => fun a1 a2 => Applicative__StateL_op_zlztzg__ (GHC.Base.id GHC.Base.<$ a1) a2. -Local Definition Applicative__StateL_pure {inst_s : Type} +#[local] Definition Applicative__StateL_pure {inst_s : Type} : forall {a : Type}, a -> StateL inst_s a := fun {a : Type} => fun x => Mk_StateL (fun s => pair s x). +#[global] Program Instance Applicative__StateL {s : Type} : GHC.Base.Applicative (StateL s) := fun _ k__ => @@ -206,7 +212,7 @@ Program Instance Applicative__StateL {s : Type} Applicative__StateL_op_ztzg__ ; GHC.Base.pure__ := fun {a : Type} => Applicative__StateL_pure |}. -Local Definition Functor__StateR_fmap {inst_s : Type} +#[local] Definition Functor__StateR_fmap {inst_s : Type} : forall {a : Type}, forall {b : Type}, (a -> b) -> StateR inst_s a -> StateR inst_s b := fun {a : Type} {b : Type} => @@ -215,18 +221,19 @@ Local Definition Functor__StateR_fmap {inst_s : Type} | f, Mk_StateR k => Mk_StateR (fun s => let 'pair s' v := k s in pair s' (f v)) end. -Local Definition Functor__StateR_op_zlzd__ {inst_s : Type} +#[local] Definition Functor__StateR_op_zlzd__ {inst_s : Type} : forall {a : Type}, forall {b : Type}, a -> StateR inst_s b -> StateR inst_s a := fun {a : Type} {b : Type} => Functor__StateR_fmap GHC.Base.∘ GHC.Base.const. +#[global] Program Instance Functor__StateR {s : Type} : GHC.Base.Functor (StateR s) := fun _ k__ => k__ {| GHC.Base.fmap__ := fun {a : Type} {b : Type} => Functor__StateR_fmap ; GHC.Base.op_zlzd____ := fun {a : Type} {b : Type} => Functor__StateR_op_zlzd__ |}. -Local Definition Applicative__StateR_liftA2 {inst_s : Type} +#[local] Definition Applicative__StateR_liftA2 {inst_s : Type} : forall {a : Type}, forall {b : Type}, forall {c : Type}, @@ -241,7 +248,7 @@ Local Definition Applicative__StateR_liftA2 {inst_s : Type} pair s'' (f x y)) end. -Local Definition Applicative__StateR_op_zlztzg__ {inst_s : Type} +#[local] Definition Applicative__StateR_op_zlztzg__ {inst_s : Type} : forall {a : Type}, forall {b : Type}, StateR inst_s (a -> b) -> StateR inst_s a -> StateR inst_s b := @@ -255,16 +262,17 @@ Local Definition Applicative__StateR_op_zlztzg__ {inst_s : Type} pair s'' (f v)) end. -Local Definition Applicative__StateR_op_ztzg__ {inst_s : Type} +#[local] Definition Applicative__StateR_op_ztzg__ {inst_s : Type} : forall {a : Type}, forall {b : Type}, StateR inst_s a -> StateR inst_s b -> StateR inst_s b := fun {a : Type} {b : Type} => fun a1 a2 => Applicative__StateR_op_zlztzg__ (GHC.Base.id GHC.Base.<$ a1) a2. -Local Definition Applicative__StateR_pure {inst_s : Type} +#[local] Definition Applicative__StateR_pure {inst_s : Type} : forall {a : Type}, a -> StateR inst_s a := fun {a : Type} => fun x => Mk_StateR (fun s => pair s x). +#[global] Program Instance Applicative__StateR {s : Type} : GHC.Base.Applicative (StateR s) := fun _ k__ => diff --git a/base/Data/List/NonEmpty.v b/base/Data/List/NonEmpty.v index 5b01f3568..3373be845 100644 --- a/base/Data/List/NonEmpty.v +++ b/base/Data/List/NonEmpty.v @@ -88,10 +88,10 @@ Definition sort {a} `{GHC.Base.Ord a} : GHC.Base.NonEmpty a -> GHC.Base.NonEmpty (* Converted value declarations: *) -Definition length {a : Type} : GHC.Base.NonEmpty a -> GHC.Num.Int := +#[global] Definition length {a : Type} : GHC.Base.NonEmpty a -> GHC.Num.Int := fun '(GHC.Base.NEcons _ xs) => #1 GHC.Num.+ Data.Foldable.length xs. -Definition xor : GHC.Base.NonEmpty bool -> bool := +#[global] Definition xor : GHC.Base.NonEmpty bool -> bool := fun '(GHC.Base.NEcons x xs) => let xor' := fun arg_1__ arg_2__ => @@ -103,30 +103,31 @@ Definition xor : GHC.Base.NonEmpty bool -> bool := (* Skipping definition `Data.List.NonEmpty.unfold' *) -Definition nonEmpty {a : Type} : list a -> option (GHC.Base.NonEmpty a) := +#[global] Definition nonEmpty {a : Type} + : list a -> option (GHC.Base.NonEmpty a) := fun arg_0__ => match arg_0__ with | nil => None | cons a as_ => Some (GHC.Base.NEcons a as_) end. -Definition uncons {a : Type} +#[global] Definition uncons {a : Type} : GHC.Base.NonEmpty a -> (a * option (GHC.Base.NonEmpty a))%type := fun '(GHC.Base.NEcons a as_) => pair a (nonEmpty as_). (* Skipping definition `Data.List.NonEmpty.unfoldr' *) -Definition head {a : Type} : GHC.Base.NonEmpty a -> a := +#[global] Definition head {a : Type} : GHC.Base.NonEmpty a -> a := fun '(GHC.Base.NEcons a _) => a. -Definition tail {a : Type} : GHC.Base.NonEmpty a -> list a := +#[global] Definition tail {a : Type} : GHC.Base.NonEmpty a -> list a := fun '(GHC.Base.NEcons _ as_) => as_. (* Skipping definition `Data.List.NonEmpty.last' *) (* Skipping definition `Data.List.NonEmpty.init' *) -Definition op_zlzb__ {a : Type} +#[global] Definition op_zlzb__ {a : Type} : a -> GHC.Base.NonEmpty a -> GHC.Base.NonEmpty a := fun arg_0__ arg_1__ => match arg_0__, arg_1__ with @@ -137,7 +138,8 @@ Notation "'_<|_'" := (op_zlzb__). Infix "<|" := (_<|_) (at level 99). -Definition cons_ {a : Type} : a -> GHC.Base.NonEmpty a -> GHC.Base.NonEmpty a := +#[global] Definition cons_ {a : Type} + : a -> GHC.Base.NonEmpty a -> GHC.Base.NonEmpty a := _<|_. (* Skipping definition `Data.List.NonEmpty.sort' *) @@ -148,7 +150,7 @@ Definition cons_ {a : Type} : a -> GHC.Base.NonEmpty a -> GHC.Base.NonEmpty a := (* Skipping definition `Data.List.NonEmpty.lift' *) -Definition map {a : Type} {b : Type} +#[global] Definition map {a : Type} {b : Type} : (a -> b) -> GHC.Base.NonEmpty a -> GHC.Base.NonEmpty b := fun arg_0__ arg_1__ => match arg_0__, arg_1__ with @@ -181,36 +183,39 @@ Definition map {a : Type} {b : Type} (* Skipping definition `Data.List.NonEmpty.repeat' *) -Definition take {a : Type} : GHC.Num.Int -> GHC.Base.NonEmpty a -> list a := +#[global] Definition take {a : Type} + : GHC.Num.Int -> GHC.Base.NonEmpty a -> list a := fun n => GHC.List.take n GHC.Base.∘ toList. -Definition drop {a : Type} : GHC.Num.Int -> GHC.Base.NonEmpty a -> list a := +#[global] Definition drop {a : Type} + : GHC.Num.Int -> GHC.Base.NonEmpty a -> list a := fun n => GHC.List.drop n GHC.Base.∘ toList. -Definition splitAt {a : Type} +#[global] Definition splitAt {a : Type} : GHC.Num.Int -> GHC.Base.NonEmpty a -> (list a * list a)%type := fun n => GHC.List.splitAt n GHC.Base.∘ toList. -Definition takeWhile {a : Type} +#[global] Definition takeWhile {a : Type} : (a -> bool) -> GHC.Base.NonEmpty a -> list a := fun p => GHC.List.takeWhile p GHC.Base.∘ toList. -Definition dropWhile {a : Type} +#[global] Definition dropWhile {a : Type} : (a -> bool) -> GHC.Base.NonEmpty a -> list a := fun p => GHC.List.dropWhile p GHC.Base.∘ toList. -Definition span {a : Type} +#[global] Definition span {a : Type} : (a -> bool) -> GHC.Base.NonEmpty a -> (list a * list a)%type := fun p => GHC.List.span p GHC.Base.∘ toList. -Definition break {a : Type} +#[global] Definition break {a : Type} : (a -> bool) -> GHC.Base.NonEmpty a -> (list a * list a)%type := fun p => span (negb GHC.Base.∘ p). -Definition filter {a : Type} : (a -> bool) -> GHC.Base.NonEmpty a -> list a := +#[global] Definition filter {a : Type} + : (a -> bool) -> GHC.Base.NonEmpty a -> list a := fun p => GHC.List.filter p GHC.Base.∘ toList. -Definition partition {a : Type} +#[global] Definition partition {a : Type} : (a -> bool) -> GHC.Base.NonEmpty a -> (list a * list a)%type := fun p => Data.OldList.partition p GHC.Base.∘ toList. @@ -230,7 +235,7 @@ Definition partition {a : Type} (* Skipping definition `Data.List.NonEmpty.groupAllWith1' *) -Definition isPrefixOf {a : Type} `{GHC.Base.Eq_ a} +#[global] Definition isPrefixOf {a : Type} `{GHC.Base.Eq_ a} : list a -> GHC.Base.NonEmpty a -> bool := fun arg_0__ arg_1__ => match arg_0__, arg_1__ with @@ -241,7 +246,7 @@ Definition isPrefixOf {a : Type} `{GHC.Base.Eq_ a} (* Skipping definition `Data.List.NonEmpty.op_znzn__' *) -Definition zip {a : Type} {b : Type} +#[global] Definition zip {a : Type} {b : Type} : GHC.Base.NonEmpty a -> GHC.Base.NonEmpty b -> GHC.Base.NonEmpty (a * b)%type := fun arg_0__ arg_1__ => @@ -250,7 +255,7 @@ Definition zip {a : Type} {b : Type} GHC.Base.NEcons (pair x y) (GHC.List.zip xs ys) end. -Definition zipWith {a : Type} {b : Type} {c : Type} +#[global] Definition zipWith {a : Type} {b : Type} {c : Type} : (a -> b -> c) -> GHC.Base.NonEmpty a -> GHC.Base.NonEmpty b -> GHC.Base.NonEmpty c := fun arg_0__ arg_1__ arg_2__ => @@ -259,12 +264,13 @@ Definition zipWith {a : Type} {b : Type} {c : Type} GHC.Base.NEcons (f x y) (GHC.List.zipWith f xs ys) end. -Definition unzip {f : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Functor f} +#[global] Definition unzip {f : Type -> Type} {a : Type} {b : Type} + `{GHC.Base.Functor f} : f (a * b)%type -> (f a * f b)%type := fun xs => pair (Data.Tuple.fst Data.Functor.<$> xs) (Data.Tuple.snd Data.Functor.<$> xs). -Definition nubBy {a : Type} +#[global] Definition nubBy {a : Type} : (a -> a -> bool) -> GHC.Base.NonEmpty a -> GHC.Base.NonEmpty a := fun arg_0__ arg_1__ => match arg_0__, arg_1__ with @@ -273,7 +279,7 @@ Definition nubBy {a : Type} negb (eq a b)) as_)) end. -Definition nub {a : Type} `{GHC.Base.Eq_ a} +#[global] Definition nub {a : Type} `{GHC.Base.Eq_ a} : GHC.Base.NonEmpty a -> GHC.Base.NonEmpty a := nubBy _GHC.Base.==_. @@ -281,7 +287,7 @@ Definition nub {a : Type} `{GHC.Base.Eq_ a} (* Skipping definition `Data.List.NonEmpty.sortBy' *) -Definition sortWith {o : Type} {a : Type} `{GHC.Base.Ord o} +#[global] Definition sortWith {o : Type} {a : Type} `{GHC.Base.Ord o} : (a -> o) -> GHC.Base.NonEmpty a -> GHC.Base.NonEmpty a := sortBy GHC.Base.∘ Data.Ord.comparing. diff --git a/base/Data/Maybe.v b/base/Data/Maybe.v index ff8baef6a..11bb3dabf 100644 --- a/base/Data/Maybe.v +++ b/base/Data/Maybe.v @@ -23,31 +23,32 @@ Import GHC.Base.Notations. (* Converted value declarations: *) -Definition maybe {b : Type} {a : Type} : b -> (a -> b) -> option a -> b := +#[global] Definition maybe {b : Type} {a : Type} + : b -> (a -> b) -> option a -> b := fun arg_0__ arg_1__ arg_2__ => match arg_0__, arg_1__, arg_2__ with | n, _, None => n | _, f, Some x => f x end. -Definition isJust {a : Type} : option a -> bool := +#[global] Definition isJust {a : Type} : option a -> bool := fun arg_0__ => match arg_0__ with | None => false | _ => true end. -Definition isNothing {a : Type} : option a -> bool := +#[global] Definition isNothing {a : Type} : option a -> bool := fun arg_0__ => match arg_0__ with | None => true | _ => false end. (* Skipping definition `Data.Maybe.fromJust' *) -Definition fromMaybe {a : Type} : a -> option a -> a := +#[global] Definition fromMaybe {a : Type} : a -> option a -> a := fun d x => match x with | None => d | Some v => v end. -Definition maybeToList {a : Type} : option a -> list a := +#[global] Definition maybeToList {a : Type} : option a -> list a := fun arg_0__ => match arg_0__ with | None => nil | Some x => cons x nil end. -Definition listToMaybe {a : Type} : list a -> option a := +#[global] Definition listToMaybe {a : Type} : list a -> option a := GHC.Base.foldr (GHC.Base.const GHC.Base.∘ Some) None. -Definition catMaybes {a : Type} : list (option a) -> list a := +#[global] Definition catMaybes {a : Type} : list (option a) -> list a := fun ls => let cont_0__ arg_1__ := match arg_1__ with @@ -64,7 +65,7 @@ Fixpoint mapMaybe {a : Type} {b : Type} (arg_0__ : a -> option b) (arg_1__ let rs := mapMaybe f xs in match f x with | None => rs | Some r => cons r rs end end. -Definition mapMaybeFB {b} {r} {a} +#[global] Definition mapMaybeFB {b} {r} {a} : (b -> r -> r) -> (a -> option b) -> a -> r -> r := fun cons_ f x next => match f x with diff --git a/base/Data/Monoid.h2ci b/base/Data/Monoid.h2ci index 5b2627b93..4ad2f80e1 100644 --- a/base/Data/Monoid.h2ci +++ b/base/Data/Monoid.h2ci @@ -1,12 +1,16 @@ -constructors: - Data.Monoid.Last: ! '[Qualified "Data.Monoid" "Mk_Last"]' - Data.Monoid.First: ! '[Qualified "Data.Monoid" "Mk_First"]' constructorFields: Data.Monoid.Mk_Last: RecordFields [Qualified "Data.Monoid" "getLast"] Data.Monoid.Mk_First: RecordFields [Qualified "Data.Monoid" "getFirst"] -recordFieldTypes: - Data.Monoid.getFirst: Qualified "Data.Monoid" "First" - Data.Monoid.getLast: Qualified "Data.Monoid" "Last" + Data.Monoid.Mk_Ap: RecordFields [Qualified "Data.Monoid" "getAp"] constructorTypes: Data.Monoid.Mk_Last: Qualified "Data.Monoid" "Last" Data.Monoid.Mk_First: Qualified "Data.Monoid" "First" + Data.Monoid.Mk_Ap: Qualified "Data.Monoid" "Ap" +constructors: + Data.Monoid.First: '[Qualified "Data.Monoid" "Mk_First"]' + Data.Monoid.Last: '[Qualified "Data.Monoid" "Mk_Last"]' + Data.Monoid.Ap: '[Qualified "Data.Monoid" "Mk_Ap"]' +recordFieldTypes: + Data.Monoid.getLast: Qualified "Data.Monoid" "Last" + Data.Monoid.getAp: Qualified "Data.Monoid" "Ap" + Data.Monoid.getFirst: Qualified "Data.Monoid" "First" diff --git a/base/Data/Monoid.v b/base/Data/Monoid.v index 086dde7a0..32729e7c3 100644 --- a/base/Data/Monoid.v +++ b/base/Data/Monoid.v @@ -13,7 +13,6 @@ Require Coq.Program.Wf. (* Converted imports: *) Require GHC.Base. -Require GHC.Prim. Require HsToCoq.Unpeel. Import GHC.Base.Notations. @@ -23,275 +22,30 @@ Inductive Last a : Type := | Mk_Last (getLast : option a) : Last a. Inductive First a : Type := | Mk_First (getFirst : option a) : First a. +Inductive Ap (f : Type -> Type) (a : Type) : Type := + | Mk_Ap (getAp : f a) : Ap f a. + Arguments Mk_Last {_} _. Arguments Mk_First {_} _. -Definition getLast {a} (arg_0__ : Last a) := +Arguments Mk_Ap {_} {_} _. + +#[global] Definition getLast {a} (arg_0__ : Last a) := let 'Mk_Last getLast := arg_0__ in getLast. -Definition getFirst {a} (arg_0__ : First a) := +#[global] Definition getFirst {a} (arg_0__ : First a) := let 'Mk_First getFirst := arg_0__ in getFirst. -(* Converted value declarations: *) - -Instance Unpeel_First a : HsToCoq.Unpeel.Unpeel (First a) (option a) := - HsToCoq.Unpeel.Build_Unpeel _ _ getFirst Mk_First. - -Local Definition Eq___First_op_zeze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} - : First inst_a -> First inst_a -> bool := - GHC.Prim.coerce _GHC.Base.==_. - -Local Definition Eq___First_op_zsze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} - : First inst_a -> First inst_a -> bool := - GHC.Prim.coerce _GHC.Base./=_. - -Program Instance Eq___First {a : Type} `{GHC.Base.Eq_ a} - : GHC.Base.Eq_ (First a) := - fun _ k__ => - k__ {| GHC.Base.op_zeze____ := Eq___First_op_zeze__ ; - GHC.Base.op_zsze____ := Eq___First_op_zsze__ |}. - -Local Definition Ord__First_op_zl__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : First inst_a -> First inst_a -> bool := - GHC.Prim.coerce _GHC.Base.<_. - -Local Definition Ord__First_op_zlze__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : First inst_a -> First inst_a -> bool := - GHC.Prim.coerce _GHC.Base.<=_. - -Local Definition Ord__First_op_zg__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : First inst_a -> First inst_a -> bool := - GHC.Prim.coerce _GHC.Base.>_. - -Local Definition Ord__First_op_zgze__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : First inst_a -> First inst_a -> bool := - GHC.Prim.coerce _GHC.Base.>=_. - -Local Definition Ord__First_compare {inst_a : Type} `{GHC.Base.Ord inst_a} - : First inst_a -> First inst_a -> comparison := - GHC.Prim.coerce GHC.Base.compare. - -Local Definition Ord__First_max {inst_a : Type} `{GHC.Base.Ord inst_a} - : First inst_a -> First inst_a -> First inst_a := - GHC.Prim.coerce GHC.Base.max. - -Local Definition Ord__First_min {inst_a : Type} `{GHC.Base.Ord inst_a} - : First inst_a -> First inst_a -> First inst_a := - GHC.Prim.coerce GHC.Base.min. - -Program Instance Ord__First {a : Type} `{GHC.Base.Ord a} - : GHC.Base.Ord (First a) := - fun _ k__ => - k__ {| GHC.Base.op_zl____ := Ord__First_op_zl__ ; - GHC.Base.op_zlze____ := Ord__First_op_zlze__ ; - GHC.Base.op_zg____ := Ord__First_op_zg__ ; - GHC.Base.op_zgze____ := Ord__First_op_zgze__ ; - GHC.Base.compare__ := Ord__First_compare ; - GHC.Base.max__ := Ord__First_max ; - GHC.Base.min__ := Ord__First_min |}. - -(* Skipping all instances of class `GHC.Read.Read', including - `Data.Monoid.Read__First' *) - -(* Skipping all instances of class `GHC.Show.Show', including - `Data.Monoid.Show__First' *) - -(* Skipping all instances of class `GHC.Generics.Generic', including - `Data.Monoid.Generic__First' *) - -(* Skipping all instances of class `GHC.Generics.Generic1', including - `Data.Monoid.Generic1__TYPE__First__LiftedRep' *) - -Local Definition Functor__First_fmap - : forall {a : Type}, forall {b : Type}, (a -> b) -> First a -> First b := - fun {a : Type} {b : Type} => GHC.Prim.coerce GHC.Base.fmap. - -Local Definition Functor__First_op_zlzd__ - : forall {a : Type}, forall {b : Type}, a -> First b -> First a := - fun {a : Type} {b : Type} => GHC.Prim.coerce _GHC.Base.<$_. - -Program Instance Functor__First : GHC.Base.Functor First := - fun _ k__ => - k__ {| GHC.Base.fmap__ := fun {a : Type} {b : Type} => Functor__First_fmap ; - GHC.Base.op_zlzd____ := fun {a : Type} {b : Type} => - Functor__First_op_zlzd__ |}. - -Local Definition Applicative__First_liftA2 - : forall {a : Type}, - forall {b : Type}, - forall {c : Type}, (a -> b -> c) -> First a -> First b -> First c := - fun {a : Type} {b : Type} {c : Type} => GHC.Prim.coerce GHC.Base.liftA2. - -Local Definition Applicative__First_op_zlztzg__ - : forall {a : Type}, forall {b : Type}, First (a -> b) -> First a -> First b := - fun {a : Type} {b : Type} => GHC.Prim.coerce _GHC.Base.<*>_. - -Local Definition Applicative__First_op_ztzg__ - : forall {a : Type}, forall {b : Type}, First a -> First b -> First b := - fun {a : Type} {b : Type} => GHC.Prim.coerce _GHC.Base.*>_. - -Local Definition Applicative__First_pure : forall {a : Type}, a -> First a := - fun {a : Type} => GHC.Prim.coerce GHC.Base.pure. - -Program Instance Applicative__First : GHC.Base.Applicative First := - fun _ k__ => - k__ {| GHC.Base.liftA2__ := fun {a : Type} {b : Type} {c : Type} => - Applicative__First_liftA2 ; - GHC.Base.op_zlztzg____ := fun {a : Type} {b : Type} => - Applicative__First_op_zlztzg__ ; - GHC.Base.op_ztzg____ := fun {a : Type} {b : Type} => - Applicative__First_op_ztzg__ ; - GHC.Base.pure__ := fun {a : Type} => Applicative__First_pure |}. - -Local Definition Monad__First_op_zgzg__ - : forall {a : Type}, forall {b : Type}, First a -> First b -> First b := - fun {a : Type} {b : Type} => GHC.Prim.coerce _GHC.Base.>>_. - -Local Definition Monad__First_op_zgzgze__ - : forall {a : Type}, forall {b : Type}, First a -> (a -> First b) -> First b := - fun {a : Type} {b : Type} => GHC.Prim.coerce _GHC.Base.>>=_. - -Local Definition Monad__First_return_ : forall {a : Type}, a -> First a := - fun {a : Type} => GHC.Prim.coerce GHC.Base.return_. - -Program Instance Monad__First : GHC.Base.Monad First := - fun _ k__ => - k__ {| GHC.Base.op_zgzg____ := fun {a : Type} {b : Type} => - Monad__First_op_zgzg__ ; - GHC.Base.op_zgzgze____ := fun {a : Type} {b : Type} => - Monad__First_op_zgzgze__ ; - GHC.Base.return___ := fun {a : Type} => Monad__First_return_ |}. - -Instance Unpeel_Last a : HsToCoq.Unpeel.Unpeel (Last a) (option a) := - HsToCoq.Unpeel.Build_Unpeel _ _ getLast Mk_Last. - -Local Definition Eq___Last_op_zeze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} - : Last inst_a -> Last inst_a -> bool := - GHC.Prim.coerce _GHC.Base.==_. - -Local Definition Eq___Last_op_zsze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} - : Last inst_a -> Last inst_a -> bool := - GHC.Prim.coerce _GHC.Base./=_. - -Program Instance Eq___Last {a : Type} `{GHC.Base.Eq_ a} - : GHC.Base.Eq_ (Last a) := - fun _ k__ => - k__ {| GHC.Base.op_zeze____ := Eq___Last_op_zeze__ ; - GHC.Base.op_zsze____ := Eq___Last_op_zsze__ |}. - -Local Definition Ord__Last_op_zl__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Last inst_a -> Last inst_a -> bool := - GHC.Prim.coerce _GHC.Base.<_. +#[global] Definition getAp {f : Type -> Type} {a : Type} (arg_0__ : Ap f a) := + let 'Mk_Ap getAp := arg_0__ in + getAp. -Local Definition Ord__Last_op_zlze__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Last inst_a -> Last inst_a -> bool := - GHC.Prim.coerce _GHC.Base.<=_. - -Local Definition Ord__Last_op_zg__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Last inst_a -> Last inst_a -> bool := - GHC.Prim.coerce _GHC.Base.>_. - -Local Definition Ord__Last_op_zgze__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Last inst_a -> Last inst_a -> bool := - GHC.Prim.coerce _GHC.Base.>=_. - -Local Definition Ord__Last_compare {inst_a : Type} `{GHC.Base.Ord inst_a} - : Last inst_a -> Last inst_a -> comparison := - GHC.Prim.coerce GHC.Base.compare. - -Local Definition Ord__Last_max {inst_a : Type} `{GHC.Base.Ord inst_a} - : Last inst_a -> Last inst_a -> Last inst_a := - GHC.Prim.coerce GHC.Base.max. - -Local Definition Ord__Last_min {inst_a : Type} `{GHC.Base.Ord inst_a} - : Last inst_a -> Last inst_a -> Last inst_a := - GHC.Prim.coerce GHC.Base.min. - -Program Instance Ord__Last {a : Type} `{GHC.Base.Ord a} - : GHC.Base.Ord (Last a) := - fun _ k__ => - k__ {| GHC.Base.op_zl____ := Ord__Last_op_zl__ ; - GHC.Base.op_zlze____ := Ord__Last_op_zlze__ ; - GHC.Base.op_zg____ := Ord__Last_op_zg__ ; - GHC.Base.op_zgze____ := Ord__Last_op_zgze__ ; - GHC.Base.compare__ := Ord__Last_compare ; - GHC.Base.max__ := Ord__Last_max ; - GHC.Base.min__ := Ord__Last_min |}. - -(* Skipping all instances of class `GHC.Read.Read', including - `Data.Monoid.Read__Last' *) - -(* Skipping all instances of class `GHC.Show.Show', including - `Data.Monoid.Show__Last' *) - -(* Skipping all instances of class `GHC.Generics.Generic', including - `Data.Monoid.Generic__Last' *) - -(* Skipping all instances of class `GHC.Generics.Generic1', including - `Data.Monoid.Generic1__TYPE__Last__LiftedRep' *) - -Local Definition Functor__Last_fmap - : forall {a : Type}, forall {b : Type}, (a -> b) -> Last a -> Last b := - fun {a : Type} {b : Type} => GHC.Prim.coerce GHC.Base.fmap. - -Local Definition Functor__Last_op_zlzd__ - : forall {a : Type}, forall {b : Type}, a -> Last b -> Last a := - fun {a : Type} {b : Type} => GHC.Prim.coerce _GHC.Base.<$_. - -Program Instance Functor__Last : GHC.Base.Functor Last := - fun _ k__ => - k__ {| GHC.Base.fmap__ := fun {a : Type} {b : Type} => Functor__Last_fmap ; - GHC.Base.op_zlzd____ := fun {a : Type} {b : Type} => Functor__Last_op_zlzd__ |}. - -Local Definition Applicative__Last_liftA2 - : forall {a : Type}, - forall {b : Type}, - forall {c : Type}, (a -> b -> c) -> Last a -> Last b -> Last c := - fun {a : Type} {b : Type} {c : Type} => GHC.Prim.coerce GHC.Base.liftA2. - -Local Definition Applicative__Last_op_zlztzg__ - : forall {a : Type}, forall {b : Type}, Last (a -> b) -> Last a -> Last b := - fun {a : Type} {b : Type} => GHC.Prim.coerce _GHC.Base.<*>_. - -Local Definition Applicative__Last_op_ztzg__ - : forall {a : Type}, forall {b : Type}, Last a -> Last b -> Last b := - fun {a : Type} {b : Type} => GHC.Prim.coerce _GHC.Base.*>_. - -Local Definition Applicative__Last_pure : forall {a : Type}, a -> Last a := - fun {a : Type} => GHC.Prim.coerce GHC.Base.pure. - -Program Instance Applicative__Last : GHC.Base.Applicative Last := - fun _ k__ => - k__ {| GHC.Base.liftA2__ := fun {a : Type} {b : Type} {c : Type} => - Applicative__Last_liftA2 ; - GHC.Base.op_zlztzg____ := fun {a : Type} {b : Type} => - Applicative__Last_op_zlztzg__ ; - GHC.Base.op_ztzg____ := fun {a : Type} {b : Type} => - Applicative__Last_op_ztzg__ ; - GHC.Base.pure__ := fun {a : Type} => Applicative__Last_pure |}. - -Local Definition Monad__Last_op_zgzg__ - : forall {a : Type}, forall {b : Type}, Last a -> Last b -> Last b := - fun {a : Type} {b : Type} => GHC.Prim.coerce _GHC.Base.>>_. - -Local Definition Monad__Last_op_zgzgze__ - : forall {a : Type}, forall {b : Type}, Last a -> (a -> Last b) -> Last b := - fun {a : Type} {b : Type} => GHC.Prim.coerce _GHC.Base.>>=_. - -Local Definition Monad__Last_return_ : forall {a : Type}, a -> Last a := - fun {a : Type} => GHC.Prim.coerce GHC.Base.return_. - -Program Instance Monad__Last : GHC.Base.Monad Last := - fun _ k__ => - k__ {| GHC.Base.op_zgzg____ := fun {a : Type} {b : Type} => - Monad__Last_op_zgzg__ ; - GHC.Base.op_zgzgze____ := fun {a : Type} {b : Type} => Monad__Last_op_zgzgze__ ; - GHC.Base.return___ := fun {a : Type} => Monad__Last_return_ |}. +(* Converted value declarations: *) -Local Definition Semigroup__First_op_zlzlzgzg__ {inst_a : Type} +#[local] Definition Semigroup__First_op_zlzlzgzg__ {inst_a : Type} : First inst_a -> First inst_a -> First inst_a := fun arg_0__ arg_1__ => match arg_0__, arg_1__ with @@ -299,28 +53,30 @@ Local Definition Semigroup__First_op_zlzlzgzg__ {inst_a : Type} | a, _ => a end. +#[global] Program Instance Semigroup__First {a : Type} : GHC.Base.Semigroup (First a) := fun _ k__ => k__ {| GHC.Base.op_zlzlzgzg____ := Semigroup__First_op_zlzlzgzg__ |}. -Local Definition Monoid__First_mappend {inst_a : Type} +#[local] Definition Monoid__First_mappend {inst_a : Type} : First inst_a -> First inst_a -> First inst_a := _GHC.Base.<<>>_. -Local Definition Monoid__First_mempty {inst_a : Type} : First inst_a := +#[local] Definition Monoid__First_mempty {inst_a : Type} : First inst_a := Mk_First None. -Local Definition Monoid__First_mconcat {inst_a : Type} +#[local] Definition Monoid__First_mconcat {inst_a : Type} : list (First inst_a) -> First inst_a := GHC.Base.foldr Monoid__First_mappend Monoid__First_mempty. +#[global] Program Instance Monoid__First {a : Type} : GHC.Base.Monoid (First a) := fun _ k__ => k__ {| GHC.Base.mappend__ := Monoid__First_mappend ; GHC.Base.mconcat__ := Monoid__First_mconcat ; GHC.Base.mempty__ := Monoid__First_mempty |}. -Local Definition Semigroup__Last_op_zlzlzgzg__ {inst_a : Type} +#[local] Definition Semigroup__Last_op_zlzlzgzg__ {inst_a : Type} : Last inst_a -> Last inst_a -> Last inst_a := fun arg_0__ arg_1__ => match arg_0__, arg_1__ with @@ -328,40 +84,83 @@ Local Definition Semigroup__Last_op_zlzlzgzg__ {inst_a : Type} | _, b => b end. +#[global] Program Instance Semigroup__Last {a : Type} : GHC.Base.Semigroup (Last a) := fun _ k__ => k__ {| GHC.Base.op_zlzlzgzg____ := Semigroup__Last_op_zlzlzgzg__ |}. -Local Definition Monoid__Last_mappend {inst_a : Type} +#[local] Definition Monoid__Last_mappend {inst_a : Type} : Last inst_a -> Last inst_a -> Last inst_a := _GHC.Base.<<>>_. -Local Definition Monoid__Last_mempty {inst_a : Type} : Last inst_a := +#[local] Definition Monoid__Last_mempty {inst_a : Type} : Last inst_a := Mk_Last None. -Local Definition Monoid__Last_mconcat {inst_a : Type} +#[local] Definition Monoid__Last_mconcat {inst_a : Type} : list (Last inst_a) -> Last inst_a := GHC.Base.foldr Monoid__Last_mappend Monoid__Last_mempty. +#[global] Program Instance Monoid__Last {a : Type} : GHC.Base.Monoid (Last a) := fun _ k__ => k__ {| GHC.Base.mappend__ := Monoid__Last_mappend ; GHC.Base.mconcat__ := Monoid__Last_mconcat ; GHC.Base.mempty__ := Monoid__Last_mempty |}. +#[local] Definition Semigroup__Ap_op_zlzlzgzg__ {inst_f : Type -> Type} {inst_a + : Type} `{GHC.Base.Applicative inst_f} `{GHC.Base.Semigroup inst_a} + : Ap inst_f inst_a -> Ap inst_f inst_a -> Ap inst_f inst_a := + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | Mk_Ap x, Mk_Ap y => Mk_Ap (GHC.Base.liftA2 _GHC.Base.<<>>_ x y) + end. + +#[global] +Program Instance Semigroup__Ap {f : Type -> Type} {a : Type} + `{GHC.Base.Applicative f} `{GHC.Base.Semigroup a} + : GHC.Base.Semigroup (Ap f a) := + fun _ k__ => k__ {| GHC.Base.op_zlzlzgzg____ := Semigroup__Ap_op_zlzlzgzg__ |}. + +#[local] Definition Monoid__Ap_mappend {inst_f : Type -> Type} {inst_a : Type} + `{GHC.Base.Applicative inst_f} `{GHC.Base.Monoid inst_a} + : Ap inst_f inst_a -> Ap inst_f inst_a -> Ap inst_f inst_a := + _GHC.Base.<<>>_. + +#[local] Definition Monoid__Ap_mempty {inst_f : Type -> Type} {inst_a : Type} + `{GHC.Base.Applicative inst_f} `{GHC.Base.Monoid inst_a} + : Ap inst_f inst_a := + Mk_Ap (GHC.Base.pure GHC.Base.mempty). + +#[local] Definition Monoid__Ap_mconcat {inst_f : Type -> Type} {inst_a : Type} + `{GHC.Base.Applicative inst_f} `{GHC.Base.Monoid inst_a} + : list (Ap inst_f inst_a) -> Ap inst_f inst_a := + GHC.Base.foldr Monoid__Ap_mappend Monoid__Ap_mempty. + +#[global] +Program Instance Monoid__Ap {f : Type -> Type} {a : Type} `{GHC.Base.Applicative + f} `{GHC.Base.Monoid a} + : GHC.Base.Monoid (Ap f a) := + fun _ k__ => + k__ {| GHC.Base.mappend__ := Monoid__Ap_mappend ; + GHC.Base.mconcat__ := Monoid__Ap_mconcat ; + GHC.Base.mempty__ := Monoid__Ap_mempty |}. + +(* Skipping all instances of class `GHC.Enum.Bounded', including + `Data.Monoid.Bounded__Ap' *) + +(* Skipping all instances of class `GHC.Num.Num', including + `Data.Monoid.Num__Ap' *) + +Instance Unpeel_Last a : HsToCoq.Unpeel.Unpeel (Last a) (option a) := + HsToCoq.Unpeel.Build_Unpeel _ _ getLast Mk_Last. + +Instance Unpeel_First a : HsToCoq.Unpeel.Unpeel (First a) (option a) := + HsToCoq.Unpeel.Build_Unpeel _ _ getFirst Mk_First. + (* External variables: - None Type bool comparison list option GHC.Base.Applicative GHC.Base.Eq_ - GHC.Base.Functor GHC.Base.Monad GHC.Base.Monoid GHC.Base.Ord GHC.Base.Semigroup - GHC.Base.compare GHC.Base.compare__ GHC.Base.fmap GHC.Base.fmap__ GHC.Base.foldr - GHC.Base.liftA2 GHC.Base.liftA2__ GHC.Base.mappend__ GHC.Base.max GHC.Base.max__ - GHC.Base.mconcat__ GHC.Base.mempty__ GHC.Base.min GHC.Base.min__ - GHC.Base.op_zeze__ GHC.Base.op_zeze____ GHC.Base.op_zg__ GHC.Base.op_zg____ - GHC.Base.op_zgze__ GHC.Base.op_zgze____ GHC.Base.op_zgzg__ GHC.Base.op_zgzg____ - GHC.Base.op_zgzgze__ GHC.Base.op_zgzgze____ GHC.Base.op_zl__ GHC.Base.op_zl____ - GHC.Base.op_zlzd__ GHC.Base.op_zlzd____ GHC.Base.op_zlze__ GHC.Base.op_zlze____ - GHC.Base.op_zlzlzgzg__ GHC.Base.op_zlzlzgzg____ GHC.Base.op_zlztzg__ - GHC.Base.op_zlztzg____ GHC.Base.op_zsze__ GHC.Base.op_zsze____ - GHC.Base.op_ztzg__ GHC.Base.op_ztzg____ GHC.Base.pure GHC.Base.pure__ - GHC.Base.return_ GHC.Base.return___ GHC.Prim.coerce HsToCoq.Unpeel.Build_Unpeel + None Type list option GHC.Base.Applicative GHC.Base.Monoid GHC.Base.Semigroup + GHC.Base.foldr GHC.Base.liftA2 GHC.Base.mappend__ GHC.Base.mconcat__ + GHC.Base.mempty GHC.Base.mempty__ GHC.Base.op_zlzlzgzg__ + GHC.Base.op_zlzlzgzg____ GHC.Base.pure HsToCoq.Unpeel.Build_Unpeel HsToCoq.Unpeel.Unpeel *) diff --git a/base/Data/OldList.h2ci b/base/Data/OldList.h2ci index 7629e1b9b..7a9e4546a 100644 --- a/base/Data/OldList.h2ci +++ b/base/Data/OldList.h2ci @@ -1,6 +1,6 @@ -constructors: - Data.OldList.SnocBuilder: ! '[Qualified "Data.OldList" "Mk_SnocBuilder"]' constructorFields: Data.OldList.Mk_SnocBuilder: NonRecordFields 3 constructorTypes: Data.OldList.Mk_SnocBuilder: Qualified "Data.OldList" "SnocBuilder" +constructors: + Data.OldList.SnocBuilder: '[Qualified "Data.OldList" "Mk_SnocBuilder"]' diff --git a/base/Data/OldList.v b/base/Data/OldList.v index 16bd70465..311375416 100644 --- a/base/Data/OldList.v +++ b/base/Data/OldList.v @@ -227,7 +227,8 @@ Defined. (* Converted value declarations: *) -Definition dropWhileEnd {a : Type} : (a -> bool) -> list a -> list a := +#[global] Definition dropWhileEnd {a : Type} + : (a -> bool) -> list a -> list a := fun p => foldr (fun x xs => if andb (p x) (GHC.List.null xs) : bool @@ -246,7 +247,7 @@ Fixpoint stripPrefix {a : Type} `{Eq_ a} (arg_0__ arg_1__ : list a) : option (* Skipping definition `Data.OldList.elemIndices' *) -Definition find {a : Type} : (a -> bool) -> list a -> option a := +#[global] Definition find {a : Type} : (a -> bool) -> list a -> option a := fun p => Data.Maybe.listToMaybe ∘ GHC.List.filter p. (* Skipping definition `Data.OldList.findIndex' *) @@ -275,7 +276,8 @@ Fixpoint dropLengthMaybe {a} {b} (arg_0__ : list a) (arg_1__ : list b) : option | cons _ x', cons _ y' => dropLengthMaybe x' y' end. -Definition isSuffixOf {a : Type} `{Eq_ a} : list a -> list a -> bool := +#[global] Definition isSuffixOf {a : Type} `{Eq_ a} + : list a -> list a -> bool := fun ns hs => Data.Maybe.maybe false id (dropLengthMaybe ns hs >>= (fun delta => return_ (ns == dropLength delta hs))). @@ -289,7 +291,7 @@ Fixpoint elem_by {a} (arg_0__ : (a -> a -> bool)) (arg_1__ : a) (arg_2__ | eq, y, cons x xs => orb (eq x y) (elem_by eq y xs) end. -Definition nubBy {a : Type} : (a -> a -> bool) -> list a -> list a := +#[global] Definition nubBy {a : Type} : (a -> a -> bool) -> list a -> list a := fun eq l => let fix nubBy' arg_0__ arg_1__ := match arg_0__, arg_1__ with @@ -300,7 +302,7 @@ Definition nubBy {a : Type} : (a -> a -> bool) -> list a -> list a := end in nubBy' l nil. -Definition nub {a : Type} `{Eq_ a} : list a -> list a := +#[global] Definition nub {a : Type} `{Eq_ a} : list a -> list a := nubBy _==_. Fixpoint deleteBy {a : Type} (arg_0__ : a -> a -> bool) (arg_1__ : a) (arg_2__ @@ -310,25 +312,26 @@ Fixpoint deleteBy {a : Type} (arg_0__ : a -> a -> bool) (arg_1__ : a) (arg_2__ | eq, x, cons y ys => if eq x y : bool then ys else cons y (deleteBy eq x ys) end. -Definition delete {a : Type} `{Eq_ a} : a -> list a -> list a := +#[global] Definition delete {a : Type} `{Eq_ a} : a -> list a -> list a := deleteBy _==_. -Definition op_zrzr__ {a : Type} `{Eq_ a} : list a -> list a -> list a := +#[global] Definition op_zrzr__ {a : Type} `{Eq_ a} + : list a -> list a -> list a := foldl (flip delete). Notation "'_\\_'" := (op_zrzr__). Infix "\\" := (_\\_) (at level 99). -Definition unionBy {a : Type} +#[global] Definition unionBy {a : Type} : (a -> a -> bool) -> list a -> list a -> list a := fun eq xs ys => Coq.Init.Datatypes.app xs (foldl (flip (deleteBy eq)) (nubBy eq ys) xs). -Definition union {a : Type} `{Eq_ a} : list a -> list a -> list a := +#[global] Definition union {a : Type} `{Eq_ a} : list a -> list a -> list a := unionBy _==_. -Definition intersectBy {a : Type} +#[global] Definition intersectBy {a : Type} : (a -> a -> bool) -> list a -> list a -> list a := fun arg_0__ arg_1__ arg_2__ => match arg_0__, arg_1__, arg_2__ with @@ -340,7 +343,8 @@ Definition intersectBy {a : Type} nil) xs end. -Definition intersect {a : Type} `{Eq_ a} : list a -> list a -> list a := +#[global] Definition intersect {a : Type} `{Eq_ a} + : list a -> list a -> list a := intersectBy _==_. (* Skipping definition `Data.OldList.intersperse' *) @@ -355,7 +359,7 @@ Fixpoint prependToAll {a} (arg_0__ : a) (arg_1__ : list a) : list a (* Skipping definition `Data.OldList.transpose' *) -Definition select {a} +#[global] Definition select {a} : (a -> bool) -> a -> (list a * list a)%type -> (list a * list a)%type := fun arg_0__ arg_1__ arg_2__ => match arg_0__, arg_1__, arg_2__ with @@ -364,7 +368,7 @@ Definition select {a} pair ts (cons x fs) end. -Definition partition {a : Type} +#[global] Definition partition {a : Type} : (a -> bool) -> list a -> (list a * list a)%type := fun p xs => foldr (select p) (pair nil nil) xs. @@ -379,10 +383,10 @@ Fixpoint mapAccumL {acc : Type} {x : Type} {y : Type} (arg_0__ pair s'' (cons y ys) end. -Definition pairWithNil {acc} {y} : acc -> (acc * list y)%type := +#[global] Definition pairWithNil {acc} {y} : acc -> (acc * list y)%type := fun x => pair x nil. -Definition mapAccumLF {acc} {x} {y} +#[global] Definition mapAccumLF {acc} {x} {y} : (acc -> x -> (acc * y)%type) -> x -> (acc -> (acc * list y)%type) -> acc -> (acc * list y)%type := fun f => @@ -414,10 +418,11 @@ Fixpoint insertBy {a : Type} (arg_0__ : a -> a -> comparison) (arg_1__ : a) end end. -Definition insert {a : Type} `{Ord a} : a -> list a -> list a := +#[global] Definition insert {a : Type} `{Ord a} : a -> list a -> list a := fun e ls => insertBy (compare) e ls. -Definition maximumBy {a} {_ : HsToCoq.Err.Default a} {_ : Eq_ a} {_ : Ord a} +#[global] Definition maximumBy {a} {_ : HsToCoq.Err.Default a} {_ : Eq_ a} {_ + : Ord a} : (a -> a -> comparison) -> list a -> a := fun arg_0__ arg_1__ => match arg_0__, arg_1__ with @@ -429,7 +434,8 @@ Definition maximumBy {a} {_ : HsToCoq.Err.Default a} {_ : Eq_ a} {_ : Ord a} GHC.List.foldl1 maxBy xs end. -Definition minimumBy {a} {_ : HsToCoq.Err.Default a} {_ : Eq_ a} {_ : Ord a} +#[global] Definition minimumBy {a} {_ : HsToCoq.Err.Default a} {_ : Eq_ a} {_ + : Ord a} : (a -> a -> comparison) -> list a -> a := fun arg_0__ arg_1__ => match arg_0__, arg_1__ with @@ -448,7 +454,8 @@ Fixpoint genericLength {i : Type} {a : Type} `{GHC.Num.Num i} (arg_0__ : list a) | cons _ l => #1 GHC.Num.+ genericLength l end. -Definition strictGenericLength {i} {b} `{(GHC.Num.Num i)} : list b -> i := +#[global] Definition strictGenericLength {i} {b} `{(GHC.Num.Num i)} + : list b -> i := fun l => let fix gl arg_0__ arg_1__ := match arg_0__, arg_1__ with @@ -505,7 +512,7 @@ Fixpoint zipWith4 {a : Type} {b : Type} {c : Type} {d : Type} {e : Type} | _, _, _, _, _ => nil end. -Definition zip4 {a : Type} {b : Type} {c : Type} {d : Type} +#[global] Definition zip4 {a : Type} {b : Type} {c : Type} {d : Type} : list a -> list b -> list c -> list d -> list (a * b * c * d)%type := zipWith4 GHC.Tuple.pair4. @@ -518,7 +525,7 @@ Fixpoint zipWith5 {a : Type} {b : Type} {c : Type} {d : Type} {e : Type} {f | _, _, _, _, _, _ => nil end. -Definition zip5 {a : Type} {b : Type} {c : Type} {d : Type} {e : Type} +#[global] Definition zip5 {a : Type} {b : Type} {c : Type} {d : Type} {e : Type} : list a -> list b -> list c -> list d -> list e -> list (a * b * c * d * e)%type := zipWith5 GHC.Tuple.pair5. @@ -533,8 +540,8 @@ Fixpoint zipWith6 {a : Type} {b : Type} {c : Type} {d : Type} {e : Type} {f | _, _, _, _, _, _, _ => nil end. -Definition zip6 {a : Type} {b : Type} {c : Type} {d : Type} {e : Type} {f - : Type} +#[global] Definition zip6 {a : Type} {b : Type} {c : Type} {d : Type} {e : Type} + {f : Type} : list a -> list b -> list c -> list d -> list e -> list f -> list (a * b * c * d * e * f)%type := @@ -564,15 +571,180 @@ Fixpoint zipWith7 {a : Type} {b : Type} {c : Type} {d : Type} {e : Type} {f | _, _, _, _, _, _, _, _ => nil end. -Definition zip7 {a : Type} {b : Type} {c : Type} {d : Type} {e : Type} {f - : Type} {g : Type} +#[global] Definition zip7 {a : Type} {b : Type} {c : Type} {d : Type} {e : Type} + {f : Type} {g : Type} : list a -> list b -> list c -> list d -> list e -> list f -> list g -> list (a * b * c * d * e * f * g)%type := zipWith7 GHC.Tuple.pair7. -Definition unzip4 {a : Type} {b : Type} {c : Type} {d : Type} +#[global] Definition zipWith4FB {e} {xs} {xs'} {a} {b} {c} {d} + : (e -> xs -> xs') -> + (a -> b -> c -> d -> e) -> a -> b -> c -> d -> xs -> xs' := + fun cons_ func => fun a b c d r => cons_ (func a b c d) r. + +#[global] Definition zipWith5FB {f} {xs} {xs'} {a} {b} {c} {d} {e} + : (f -> xs -> xs') -> + (a -> b -> c -> d -> e -> f) -> a -> b -> c -> d -> e -> xs -> xs' := + fun cons_ func => fun a b c d e r => cons_ (func a b c d e) r. + +#[global] Definition zipWith6FB {g} {xs} {xs'} {a} {b} {c} {d} {e} {f} + : (g -> xs -> xs') -> + (a -> b -> c -> d -> e -> f -> g) -> a -> b -> c -> d -> e -> f -> xs -> xs' := + fun cons_ func => fun a b c d e f r => cons_ (func a b c d e f) r. + +#[global] Definition zipWith7FB {h} {xs} {xs'} {a} {b} {c} {d} {e} {f} {g} + : (h -> xs -> xs') -> + (a -> b -> c -> d -> e -> f -> g -> h) -> + a -> b -> c -> d -> e -> f -> g -> xs -> xs' := + fun cons_ func => fun a b c d e f g r => cons_ (func a b c d e f g) r. + +#[global] Definition foldr4 {a} {b} {c} {d} {e} + : (a -> b -> c -> d -> e -> e) -> + e -> list a -> list b -> list c -> list d -> e := + fun k z => + let fix go arg_0__ arg_1__ arg_2__ arg_3__ + := match arg_0__, arg_1__, arg_2__, arg_3__ with + | cons a as_, cons b bs, cons c cs, cons d ds => k a b c d (go as_ bs cs ds) + | _, _, _, _ => z + end in + go. + +#[global] Definition foldr5 {a} {b} {c} {d} {e} {f} + : (a -> b -> c -> d -> e -> f -> f) -> + f -> list a -> list b -> list c -> list d -> list e -> f := + fun k z => + let fix go arg_0__ arg_1__ arg_2__ arg_3__ arg_4__ + := match arg_0__, arg_1__, arg_2__, arg_3__, arg_4__ with + | cons a as_, cons b bs, cons c cs, cons d ds, cons e es => + k a b c d e (go as_ bs cs ds es) + | _, _, _, _, _ => z + end in + go. + +#[global] Definition foldr6 {a} {b} {c} {d} {e} {f} {g} + : (a -> b -> c -> d -> e -> f -> g -> g) -> + g -> list a -> list b -> list c -> list d -> list e -> list f -> g := + fun k z => + let fix go arg_0__ arg_1__ arg_2__ arg_3__ arg_4__ arg_5__ + := match arg_0__, arg_1__, arg_2__, arg_3__, arg_4__, arg_5__ with + | cons a as_, cons b bs, cons c cs, cons d ds, cons e es, cons f fs => + k a b c d e f (go as_ bs cs ds es fs) + | _, _, _, _, _, _ => z + end in + go. + +#[global] Definition foldr7 {a} {b} {c} {d} {e} {f} {g} {h} + : (a -> b -> c -> d -> e -> f -> g -> h -> h) -> + h -> list a -> list b -> list c -> list d -> list e -> list f -> list g -> h := + fun k z => + let fix go arg_0__ arg_1__ arg_2__ arg_3__ arg_4__ arg_5__ arg_6__ + := match arg_0__, arg_1__, arg_2__, arg_3__, arg_4__, arg_5__, arg_6__ with + | cons a as_ + , cons b bs + , cons c cs + , cons d ds + , cons e es + , cons f fs + , cons g gs => + k a b c d e f g (go as_ bs cs ds es fs gs) + | _, _, _, _, _, _, _ => z + end in + go. + +#[global] Definition foldr4_left {a} {b} {c} {d} {e} {f} + : (a -> b -> c -> d -> e -> f) -> + f -> + a -> (list b -> list c -> list d -> e) -> list b -> list c -> list d -> f := + fun arg_0__ arg_1__ arg_2__ arg_3__ arg_4__ arg_5__ arg_6__ => + match arg_0__, arg_1__, arg_2__, arg_3__, arg_4__, arg_5__, arg_6__ with + | k, _z, a, r, cons b bs, cons c cs, cons d ds => k a b c d (r bs cs ds) + | _, z, _, _, _, _, _ => z + end. + +#[global] Definition foldr5_left {a} {b} {c} {d} {e} {f} {g} + : (a -> b -> c -> d -> e -> f -> g) -> + g -> + a -> + (list b -> list c -> list d -> list e -> f) -> + list b -> list c -> list d -> list e -> g := + fun arg_0__ arg_1__ arg_2__ arg_3__ arg_4__ arg_5__ arg_6__ arg_7__ => + match arg_0__ + , arg_1__ + , arg_2__ + , arg_3__ + , arg_4__ + , arg_5__ + , arg_6__ + , arg_7__ with + | k, _z, a, r, cons b bs, cons c cs, cons d ds, cons e es => + k a b c d e (r bs cs ds es) + | _, z, _, _, _, _, _, _ => z + end. + +#[global] Definition foldr6_left {a} {b} {c} {d} {e} {f} {g} {h} + : (a -> b -> c -> d -> e -> f -> g -> h) -> + h -> + a -> + (list b -> list c -> list d -> list e -> list f -> g) -> + list b -> list c -> list d -> list e -> list f -> h := + fun arg_0__ arg_1__ arg_2__ arg_3__ arg_4__ arg_5__ arg_6__ arg_7__ arg_8__ => + match arg_0__ + , arg_1__ + , arg_2__ + , arg_3__ + , arg_4__ + , arg_5__ + , arg_6__ + , arg_7__ + , arg_8__ with + | k, _z, a, r, cons b bs, cons c cs, cons d ds, cons e es, cons f fs => + k a b c d e f (r bs cs ds es fs) + | _, z, _, _, _, _, _, _, _ => z + end. + +#[global] Definition foldr7_left {a} {b} {c} {d} {e} {f} {g} {h} {i} + : (a -> b -> c -> d -> e -> f -> g -> h -> i) -> + i -> + a -> + (list b -> list c -> list d -> list e -> list f -> list g -> h) -> + list b -> list c -> list d -> list e -> list f -> list g -> i := + fun arg_0__ + arg_1__ + arg_2__ + arg_3__ + arg_4__ + arg_5__ + arg_6__ + arg_7__ + arg_8__ + arg_9__ => + match arg_0__ + , arg_1__ + , arg_2__ + , arg_3__ + , arg_4__ + , arg_5__ + , arg_6__ + , arg_7__ + , arg_8__ + , arg_9__ with + | k + , _z + , a + , r + , cons b bs + , cons c cs + , cons d ds + , cons e es + , cons f fs + , cons g gs => + k a b c d e f g (r bs cs ds es fs gs) + | _, z, _, _, _, _, _, _, _, _ => z + end. + +#[global] Definition unzip4 {a : Type} {b : Type} {c : Type} {d : Type} : list (a * b * c * d)%type -> (list a * list b * list c * list d)%type := foldr (fun arg_0__ arg_1__ => match arg_0__, arg_1__ with @@ -580,7 +752,8 @@ Definition unzip4 {a : Type} {b : Type} {c : Type} {d : Type} pair (pair (pair (cons a as_) (cons b bs)) (cons c cs)) (cons d ds) end) (pair (pair (pair nil nil) nil) nil). -Definition unzip5 {a : Type} {b : Type} {c : Type} {d : Type} {e : Type} +#[global] Definition unzip5 {a : Type} {b : Type} {c : Type} {d : Type} {e + : Type} : list (a * b * c * d * e)%type -> (list a * list b * list c * list d * list e)%type := foldr (fun arg_0__ arg_1__ => @@ -591,8 +764,8 @@ Definition unzip5 {a : Type} {b : Type} {c : Type} {d : Type} {e : Type} e es) end) (pair (pair (pair (pair nil nil) nil) nil) nil). -Definition unzip6 {a : Type} {b : Type} {c : Type} {d : Type} {e : Type} {f - : Type} +#[global] Definition unzip6 {a : Type} {b : Type} {c : Type} {d : Type} {e + : Type} {f : Type} : list (a * b * c * d * e * f)%type -> (list a * list b * list c * list d * list e * list f)%type := foldr (fun arg_0__ arg_1__ => @@ -603,8 +776,8 @@ Definition unzip6 {a : Type} {b : Type} {c : Type} {d : Type} {e : Type} {f (cons e es)) (cons f fs) end) (pair (pair (pair (pair (pair nil nil) nil) nil) nil) nil). -Definition unzip7 {a : Type} {b : Type} {c : Type} {d : Type} {e : Type} {f - : Type} {g : Type} +#[global] Definition unzip7 {a : Type} {b : Type} {c : Type} {d : Type} {e + : Type} {f : Type} {g : Type} : list (a * b * c * d * e * f * g)%type -> (list a * list b * list c * list d * list e * list f * list g)%type := foldr (fun arg_0__ arg_1__ => @@ -615,7 +788,7 @@ Definition unzip7 {a : Type} {b : Type} {c : Type} {d : Type} {e : Type} {f d ds)) (cons e es)) (cons f fs)) (cons g gs) end) (pair (pair (pair (pair (pair (pair nil nil) nil) nil) nil) nil) nil). -Definition deleteFirstsBy {a : Type} +#[global] Definition deleteFirstsBy {a : Type} : (a -> a -> bool) -> list a -> list a -> list a := fun eq => foldl (flip (deleteBy eq)). @@ -625,7 +798,7 @@ Definition deleteFirstsBy {a : Type} (* Skipping definition `Data.OldList.inits' *) -Definition tails {a : Type} : list a -> list (list a) := +#[global] Definition tails {a : Type} : list a -> list (list a) := fun lst => build' (fun _ => (fun c n => @@ -647,10 +820,10 @@ Fixpoint nonEmptySubsequences {a} (arg_0__ : list a) : list (list a) (* Skipping definition `Data.OldList.sortBy' *) -Definition sort {a : Type} `{Ord a} : list a -> list a := +#[global] Definition sort {a : Type} `{Ord a} : list a -> list a := sortBy compare. -Definition sortOn {b : Type} {a : Type} `{Ord b} +#[global] Definition sortOn {b : Type} {a : Type} `{Ord b} : (a -> b) -> list a -> list a := fun f => map Data.Tuple.snd ∘ @@ -667,7 +840,7 @@ Axiom unlines : list String -> String. (* Skipping definition `Data.OldList.wordsFB' *) -Definition unwords : list String -> String := +#[global] Definition unwords : list String -> String := fun arg_0__ => match arg_0__ with | nil => GHC.Base.hs_string__ "" @@ -680,20 +853,20 @@ Definition unwords : list String -> String := Coq.Init.Datatypes.app w (go ws) end. -Definition tailUnwords : String -> String := +#[global] Definition tailUnwords : String -> String := fun arg_0__ => match arg_0__ with | nil => nil | cons _ xs => xs end. -Definition unwordsFB : String -> String -> String := +#[global] Definition unwordsFB : String -> String -> String := fun w r => cons (GHC.Char.hs_char__ " ") (Coq.Init.Datatypes.app w r). (* Skipping definition `Data.OldList.sb' *) -Definition emptySB {a} : SnocBuilder a := +#[global] Definition emptySB {a} : SnocBuilder a := Mk_SnocBuilder #0 nil nil. (* Skipping definition `Data.OldList.snocSB' *) -Definition toListSB {a} : SnocBuilder a -> list a := +#[global] Definition toListSB {a} : SnocBuilder a -> list a := fun '(Mk_SnocBuilder _ f r) => Coq.Init.Datatypes.app f (GHC.List.reverse r). Module Notations. diff --git a/base/Data/Ord.h2ci b/base/Data/Ord.h2ci index 4ca84af51..de22cb49b 100644 --- a/base/Data/Ord.h2ci +++ b/base/Data/Ord.h2ci @@ -1,6 +1,8 @@ -constructors: - Data.Ord.Down: ! '[Qualified "Data.Ord" "Mk_Down"]' constructorFields: - Data.Ord.Mk_Down: NonRecordFields 1 + Data.Ord.Mk_Down: RecordFields [Qualified "Data.Ord" "getDown"] constructorTypes: Data.Ord.Mk_Down: Qualified "Data.Ord" "Down" +constructors: + Data.Ord.Down: '[Qualified "Data.Ord" "Mk_Down"]' +recordFieldTypes: + Data.Ord.getDown: Qualified "Data.Ord" "Down" diff --git a/base/Data/Ord.v b/base/Data/Ord.v index 6e1eb5436..77f8674c5 100644 --- a/base/Data/Ord.v +++ b/base/Data/Ord.v @@ -19,98 +19,70 @@ Import GHC.Base.Notations. (* Converted type declarations: *) -Inductive Down a : Type := | Mk_Down : a -> Down a. +Inductive Down a : Type := | Mk_Down (getDown : a) : Down a. Arguments Mk_Down {_} _. -(* Converted value declarations: *) +#[global] Definition getDown {a} (arg_0__ : Down a) := + let 'Mk_Down getDown := arg_0__ in + getDown. -Instance Unpeel_Down a : HsToCoq.Unpeel.Unpeel (Down a) a := - HsToCoq.Unpeel.Build_Unpeel _ _ (fun '(Mk_Down x) => x) Mk_Down. +(* Midamble *) -Local Definition Eq___Down_op_zeze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} +#[local] Definition Eq___Down_op_zeze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} : Down inst_a -> Down inst_a -> bool := GHC.Prim.coerce _GHC.Base.==_. -Local Definition Eq___Down_op_zsze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} +#[local] Definition Eq___Down_op_zsze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} : Down inst_a -> Down inst_a -> bool := GHC.Prim.coerce _GHC.Base./=_. -Program Instance Eq___Down {a : Type} `{GHC.Base.Eq_ a} +#[global] Program Instance Eq___Down {a : Type} `{GHC.Base.Eq_ a} : GHC.Base.Eq_ (Down a) := fun _ k__ => k__ {| GHC.Base.op_zeze____ := Eq___Down_op_zeze__ ; GHC.Base.op_zsze____ := Eq___Down_op_zsze__ |}. -(* Skipping all instances of class `GHC.Show.Show', including - `Data.Ord.Show__Down' *) +(* Converted value declarations: *) (* Skipping all instances of class `GHC.Read.Read', including `Data.Ord.Read__Down' *) -(* Skipping all instances of class `GHC.Num.Num', including - `Data.Ord.Num__Down' *) - -Local Definition Semigroup__Down_op_zlzlzgzg__ {inst_a : Type} - `{GHC.Base.Semigroup inst_a} - : Down inst_a -> Down inst_a -> Down inst_a := - GHC.Prim.coerce _GHC.Base.<<>>_. - -Program Instance Semigroup__Down {a : Type} `{GHC.Base.Semigroup a} - : GHC.Base.Semigroup (Down a) := - fun _ k__ => - k__ {| GHC.Base.op_zlzlzgzg____ := Semigroup__Down_op_zlzlzgzg__ |}. - -Local Definition Monoid__Down_mappend {inst_a : Type} `{GHC.Base.Monoid inst_a} - : Down inst_a -> Down inst_a -> Down inst_a := - GHC.Prim.coerce GHC.Base.mappend. - -Local Definition Monoid__Down_mconcat {inst_a : Type} `{GHC.Base.Monoid inst_a} - : list (Down inst_a) -> Down inst_a := - GHC.Prim.coerce GHC.Base.mconcat. - -Local Definition Monoid__Down_mempty {inst_a : Type} `{GHC.Base.Monoid inst_a} - : Down inst_a := - GHC.Prim.coerce GHC.Base.mempty. - -Program Instance Monoid__Down {a : Type} `{GHC.Base.Monoid a} - : GHC.Base.Monoid (Down a) := - fun _ k__ => - k__ {| GHC.Base.mappend__ := Monoid__Down_mappend ; - GHC.Base.mconcat__ := Monoid__Down_mconcat ; - GHC.Base.mempty__ := Monoid__Down_mempty |}. +(* Skipping all instances of class `GHC.Show.Show', including + `Data.Ord.Show__Down' *) -Local Definition Ord__Down_compare {inst_a : Type} `{GHC.Base.Ord inst_a} +#[local] Definition Ord__Down_compare {inst_a : Type} `{GHC.Base.Ord inst_a} : Down inst_a -> Down inst_a -> comparison := fun arg_0__ arg_1__ => match arg_0__, arg_1__ with | Mk_Down x, Mk_Down y => GHC.Base.compare y x end. -Local Definition Ord__Down_op_zl__ {inst_a : Type} `{GHC.Base.Ord inst_a} +#[local] Definition Ord__Down_op_zl__ {inst_a : Type} `{GHC.Base.Ord inst_a} : Down inst_a -> Down inst_a -> bool := fun x y => Ord__Down_compare x y GHC.Base.== Lt. -Local Definition Ord__Down_op_zlze__ {inst_a : Type} `{GHC.Base.Ord inst_a} +#[local] Definition Ord__Down_op_zlze__ {inst_a : Type} `{GHC.Base.Ord inst_a} : Down inst_a -> Down inst_a -> bool := fun x y => Ord__Down_compare x y GHC.Base./= Gt. -Local Definition Ord__Down_op_zg__ {inst_a : Type} `{GHC.Base.Ord inst_a} +#[local] Definition Ord__Down_op_zg__ {inst_a : Type} `{GHC.Base.Ord inst_a} : Down inst_a -> Down inst_a -> bool := fun x y => Ord__Down_compare x y GHC.Base.== Gt. -Local Definition Ord__Down_op_zgze__ {inst_a : Type} `{GHC.Base.Ord inst_a} +#[local] Definition Ord__Down_op_zgze__ {inst_a : Type} `{GHC.Base.Ord inst_a} : Down inst_a -> Down inst_a -> bool := fun x y => Ord__Down_compare x y GHC.Base./= Lt. -Local Definition Ord__Down_max {inst_a : Type} `{GHC.Base.Ord inst_a} +#[local] Definition Ord__Down_max {inst_a : Type} `{GHC.Base.Ord inst_a} : Down inst_a -> Down inst_a -> Down inst_a := fun x y => if Ord__Down_op_zlze__ x y : bool then y else x. -Local Definition Ord__Down_min {inst_a : Type} `{GHC.Base.Ord inst_a} +#[local] Definition Ord__Down_min {inst_a : Type} `{GHC.Base.Ord inst_a} : Down inst_a -> Down inst_a -> Down inst_a := fun x y => if Ord__Down_op_zlze__ x y : bool then x else y. +#[global] Program Instance Ord__Down {a : Type} `{GHC.Base.Ord a} : GHC.Base.Ord (Down a) := fun _ k__ => @@ -122,38 +94,40 @@ Program Instance Ord__Down {a : Type} `{GHC.Base.Ord a} GHC.Base.max__ := Ord__Down_max ; GHC.Base.min__ := Ord__Down_min |}. -Local Definition Functor__Down_fmap +#[local] Definition Functor__Down_fmap : forall {a : Type}, forall {b : Type}, (a -> b) -> Down a -> Down b := fun {a : Type} {b : Type} => GHC.Prim.coerce. -Local Definition Functor__Down_op_zlzd__ +#[local] Definition Functor__Down_op_zlzd__ : forall {a : Type}, forall {b : Type}, a -> Down b -> Down a := fun {a : Type} {b : Type} => Functor__Down_fmap GHC.Base.∘ GHC.Base.const. +#[global] Program Instance Functor__Down : GHC.Base.Functor Down := fun _ k__ => k__ {| GHC.Base.fmap__ := fun {a : Type} {b : Type} => Functor__Down_fmap ; GHC.Base.op_zlzd____ := fun {a : Type} {b : Type} => Functor__Down_op_zlzd__ |}. -Local Definition Applicative__Down_op_zlztzg__ +#[local] Definition Applicative__Down_op_zlztzg__ : forall {a : Type}, forall {b : Type}, Down (a -> b) -> Down a -> Down b := fun {a : Type} {b : Type} => GHC.Prim.coerce. -Local Definition Applicative__Down_liftA2 +#[local] Definition Applicative__Down_liftA2 : forall {a : Type}, forall {b : Type}, forall {c : Type}, (a -> b -> c) -> Down a -> Down b -> Down c := fun {a : Type} {b : Type} {c : Type} => fun f x => Applicative__Down_op_zlztzg__ (GHC.Base.fmap f x). -Local Definition Applicative__Down_op_ztzg__ +#[local] Definition Applicative__Down_op_ztzg__ : forall {a : Type}, forall {b : Type}, Down a -> Down b -> Down b := fun {a : Type} {b : Type} => fun a1 a2 => Applicative__Down_op_zlztzg__ (GHC.Base.id GHC.Base.<$ a1) a2. -Local Definition Applicative__Down_pure : forall {a : Type}, a -> Down a := +#[local] Definition Applicative__Down_pure : forall {a : Type}, a -> Down a := fun {a : Type} => Mk_Down. +#[global] Program Instance Applicative__Down : GHC.Base.Applicative Down := fun _ k__ => k__ {| GHC.Base.liftA2__ := fun {a : Type} {b : Type} {c : Type} => @@ -164,19 +138,20 @@ Program Instance Applicative__Down : GHC.Base.Applicative Down := Applicative__Down_op_ztzg__ ; GHC.Base.pure__ := fun {a : Type} => Applicative__Down_pure |}. -Local Definition Monad__Down_op_zgzgze__ +#[local] Definition Monad__Down_op_zgzgze__ : forall {a : Type}, forall {b : Type}, Down a -> (a -> Down b) -> Down b := fun {a : Type} {b : Type} => fun arg_0__ arg_1__ => match arg_0__, arg_1__ with | Mk_Down a, k => k a end. -Local Definition Monad__Down_op_zgzg__ +#[local] Definition Monad__Down_op_zgzg__ : forall {a : Type}, forall {b : Type}, Down a -> Down b -> Down b := fun {a : Type} {b : Type} => fun m k => Monad__Down_op_zgzgze__ m (fun arg_0__ => k). -Local Definition Monad__Down_return_ : forall {a : Type}, a -> Down a := +#[local] Definition Monad__Down_return_ : forall {a : Type}, a -> Down a := fun {a : Type} => GHC.Base.pure. +#[global] Program Instance Monad__Down : GHC.Base.Monad Down := fun _ k__ => k__ {| GHC.Base.op_zgzg____ := fun {a : Type} {b : Type} => @@ -184,22 +159,21 @@ Program Instance Monad__Down : GHC.Base.Monad Down := GHC.Base.op_zgzgze____ := fun {a : Type} {b : Type} => Monad__Down_op_zgzgze__ ; GHC.Base.return___ := fun {a : Type} => Monad__Down_return_ |}. -Definition comparing {a : Type} {b : Type} `{GHC.Base.Ord a} +#[global] Definition comparing {a : Type} {b : Type} `{GHC.Base.Ord a} : (b -> a) -> b -> b -> comparison := fun p x y => GHC.Base.compare (p x) (p y). +Instance Unpeel_Down a : HsToCoq.Unpeel.Unpeel (Down a) a := + HsToCoq.Unpeel.Build_Unpeel _ _ (fun '(Mk_Down x) => x) Mk_Down. + (* External variables: - Gt Lt Type bool comparison list GHC.Base.Applicative GHC.Base.Eq_ - GHC.Base.Functor GHC.Base.Monad GHC.Base.Monoid GHC.Base.Ord GHC.Base.Semigroup - GHC.Base.compare GHC.Base.compare__ GHC.Base.const GHC.Base.fmap GHC.Base.fmap__ - GHC.Base.id GHC.Base.liftA2__ GHC.Base.mappend GHC.Base.mappend__ GHC.Base.max__ - GHC.Base.mconcat GHC.Base.mconcat__ GHC.Base.mempty GHC.Base.mempty__ - GHC.Base.min__ GHC.Base.op_z2218U__ GHC.Base.op_zeze__ GHC.Base.op_zeze____ - GHC.Base.op_zg____ GHC.Base.op_zgze____ GHC.Base.op_zgzg____ - GHC.Base.op_zgzgze____ GHC.Base.op_zl____ GHC.Base.op_zlzd__ - GHC.Base.op_zlzd____ GHC.Base.op_zlze____ GHC.Base.op_zlzlzgzg__ - GHC.Base.op_zlzlzgzg____ GHC.Base.op_zlztzg____ GHC.Base.op_zsze__ - GHC.Base.op_zsze____ GHC.Base.op_ztzg____ GHC.Base.pure GHC.Base.pure__ - GHC.Base.return___ GHC.Prim.coerce HsToCoq.Unpeel.Build_Unpeel + Gt Lt Type bool comparison GHC.Base.Applicative GHC.Base.Functor GHC.Base.Monad + GHC.Base.Ord GHC.Base.compare GHC.Base.compare__ GHC.Base.const GHC.Base.fmap + GHC.Base.fmap__ GHC.Base.id GHC.Base.liftA2__ GHC.Base.max__ GHC.Base.min__ + GHC.Base.op_z2218U__ GHC.Base.op_zeze__ GHC.Base.op_zg____ GHC.Base.op_zgze____ + GHC.Base.op_zgzg____ GHC.Base.op_zgzgze____ GHC.Base.op_zl____ + GHC.Base.op_zlzd__ GHC.Base.op_zlzd____ GHC.Base.op_zlze____ + GHC.Base.op_zlztzg____ GHC.Base.op_zsze__ GHC.Base.op_ztzg____ GHC.Base.pure + GHC.Base.pure__ GHC.Base.return___ GHC.Prim.coerce HsToCoq.Unpeel.Build_Unpeel HsToCoq.Unpeel.Unpeel *) diff --git a/base/Data/Proxy.h2ci b/base/Data/Proxy.h2ci index ff0af233c..d20ca22d5 100644 --- a/base/Data/Proxy.h2ci +++ b/base/Data/Proxy.h2ci @@ -1,9 +1,9 @@ -constructors: - Data.Proxy.Proxy: ! '[Qualified "Data.Proxy" "Mk_Proxy"]' - Data.Proxy.KProxy: ! '[Qualified "Data.Proxy" "Mk_KProxy"]' constructorFields: Data.Proxy.Mk_KProxy: NonRecordFields 0 Data.Proxy.Mk_Proxy: NonRecordFields 0 constructorTypes: Data.Proxy.Mk_KProxy: Qualified "Data.Proxy" "KProxy" Data.Proxy.Mk_Proxy: Qualified "Data.Proxy" "Proxy" +constructors: + Data.Proxy.Proxy: '[Qualified "Data.Proxy" "Mk_Proxy"]' + Data.Proxy.KProxy: '[Qualified "Data.Proxy" "Mk_KProxy"]' diff --git a/base/Data/Proxy.v b/base/Data/Proxy.v index 70f915d60..ffecbd86e 100644 --- a/base/Data/Proxy.v +++ b/base/Data/Proxy.v @@ -31,53 +31,49 @@ Arguments Mk_KProxy {_}. (* Converted value declarations: *) -(* Skipping all instances of class `GHC.Enum.Bounded', including - `Data.Proxy.Bounded__Proxy' *) - -(* Skipping all instances of class `GHC.Read.Read', including - `Data.Proxy.Read__Proxy' *) - -Local Definition Eq___Proxy_op_zeze__ {inst_k : Type} {inst_s : inst_k} +#[local] Definition Eq___Proxy_op_zeze__ {inst_k : Type} {inst_s : inst_k} : Proxy inst_s -> Proxy inst_s -> bool := fun arg_0__ arg_1__ => true. -Local Definition Eq___Proxy_op_zsze__ {inst_k : Type} {inst_s : inst_k} +#[local] Definition Eq___Proxy_op_zsze__ {inst_k : Type} {inst_s : inst_k} : Proxy inst_s -> Proxy inst_s -> bool := fun x y => negb (Eq___Proxy_op_zeze__ x y). +#[global] Program Instance Eq___Proxy {k : Type} {s : k} : GHC.Base.Eq_ (Proxy s) := fun _ k__ => k__ {| GHC.Base.op_zeze____ := Eq___Proxy_op_zeze__ ; GHC.Base.op_zsze____ := Eq___Proxy_op_zsze__ |}. -Local Definition Ord__Proxy_compare {inst_k : Type} {inst_s : inst_k} +#[local] Definition Ord__Proxy_compare {inst_k : Type} {inst_s : inst_k} : Proxy inst_s -> Proxy inst_s -> comparison := fun arg_0__ arg_1__ => Eq. -Local Definition Ord__Proxy_op_zl__ {inst_k : Type} {inst_s : inst_k} +#[local] Definition Ord__Proxy_op_zl__ {inst_k : Type} {inst_s : inst_k} : Proxy inst_s -> Proxy inst_s -> bool := fun x y => Ord__Proxy_compare x y GHC.Base.== Lt. -Local Definition Ord__Proxy_op_zlze__ {inst_k : Type} {inst_s : inst_k} +#[local] Definition Ord__Proxy_op_zlze__ {inst_k : Type} {inst_s : inst_k} : Proxy inst_s -> Proxy inst_s -> bool := fun x y => Ord__Proxy_compare x y GHC.Base./= Gt. -Local Definition Ord__Proxy_op_zg__ {inst_k : Type} {inst_s : inst_k} +#[local] Definition Ord__Proxy_op_zg__ {inst_k : Type} {inst_s : inst_k} : Proxy inst_s -> Proxy inst_s -> bool := fun x y => Ord__Proxy_compare x y GHC.Base.== Gt. -Local Definition Ord__Proxy_op_zgze__ {inst_k : Type} {inst_s : inst_k} +#[local] Definition Ord__Proxy_op_zgze__ {inst_k : Type} {inst_s : inst_k} : Proxy inst_s -> Proxy inst_s -> bool := fun x y => Ord__Proxy_compare x y GHC.Base./= Lt. -Local Definition Ord__Proxy_max {inst_k : Type} {inst_s : inst_k} +#[local] Definition Ord__Proxy_max {inst_k : Type} {inst_s : inst_k} : Proxy inst_s -> Proxy inst_s -> Proxy inst_s := fun x y => if Ord__Proxy_op_zlze__ x y : bool then y else x. -Local Definition Ord__Proxy_min {inst_k : Type} {inst_s : inst_k} +#[local] Definition Ord__Proxy_min {inst_k : Type} {inst_s : inst_k} : Proxy inst_s -> Proxy inst_s -> Proxy inst_s := fun x y => if Ord__Proxy_op_zlze__ x y : bool then x else y. +#[global] Program Instance Ord__Proxy {k : Type} {s : k} : GHC.Base.Ord (Proxy s) := fun _ k__ => k__ {| GHC.Base.op_zl____ := Ord__Proxy_op_zl__ ; @@ -94,70 +90,74 @@ Program Instance Ord__Proxy {k : Type} {s : k} : GHC.Base.Ord (Proxy s) := (* Skipping all instances of class `GHC.Enum.Enum', including `Data.Proxy.Enum__Proxy' *) -(* Skipping all instances of class `GHC.Arr.Ix', including +(* Skipping all instances of class `GHC.Ix.Ix', including `Data.Proxy.Ix__Proxy' *) -Local Definition Semigroup__Proxy_op_zlzlzgzg__ {inst_k : Type} {inst_s +#[local] Definition Semigroup__Proxy_op_zlzlzgzg__ {inst_k : Type} {inst_s : inst_k} : Proxy inst_s -> Proxy inst_s -> Proxy inst_s := fun arg_0__ arg_1__ => Mk_Proxy. +#[global] Program Instance Semigroup__Proxy {k : Type} {s : k} : GHC.Base.Semigroup (Proxy s) := fun _ k__ => k__ {| GHC.Base.op_zlzlzgzg____ := Semigroup__Proxy_op_zlzlzgzg__ |}. -Local Definition Monoid__Proxy_mappend {inst_k : Type} {inst_s : inst_k} +#[local] Definition Monoid__Proxy_mappend {inst_k : Type} {inst_s : inst_k} : Proxy inst_s -> Proxy inst_s -> Proxy inst_s := _GHC.Base.<<>>_. -Local Definition Monoid__Proxy_mconcat {inst_k : Type} {inst_s : inst_k} +#[local] Definition Monoid__Proxy_mconcat {inst_k : Type} {inst_s : inst_k} : list (Proxy inst_s) -> Proxy inst_s := fun arg_0__ => Mk_Proxy. -Local Definition Monoid__Proxy_mempty {inst_k : Type} {inst_s : inst_k} +#[local] Definition Monoid__Proxy_mempty {inst_k : Type} {inst_s : inst_k} : Proxy inst_s := Mk_Proxy. +#[global] Program Instance Monoid__Proxy {k : Type} {s : k} : GHC.Base.Monoid (Proxy s) := fun _ k__ => k__ {| GHC.Base.mappend__ := Monoid__Proxy_mappend ; GHC.Base.mconcat__ := Monoid__Proxy_mconcat ; GHC.Base.mempty__ := Monoid__Proxy_mempty |}. -Local Definition Functor__Proxy_fmap +#[local] Definition Functor__Proxy_fmap : forall {a : Type}, forall {b : Type}, (a -> b) -> Proxy a -> Proxy b := fun {a : Type} {b : Type} => fun arg_0__ arg_1__ => Mk_Proxy. -Local Definition Functor__Proxy_op_zlzd__ +#[local] Definition Functor__Proxy_op_zlzd__ : forall {a : Type}, forall {b : Type}, a -> Proxy b -> Proxy a := fun {a : Type} {b : Type} => Functor__Proxy_fmap GHC.Base.∘ GHC.Base.const. +#[global] Program Instance Functor__Proxy : GHC.Base.Functor Proxy := fun _ k__ => k__ {| GHC.Base.fmap__ := fun {a : Type} {b : Type} => Functor__Proxy_fmap ; GHC.Base.op_zlzd____ := fun {a : Type} {b : Type} => Functor__Proxy_op_zlzd__ |}. -Local Definition Applicative__Proxy_op_zlztzg__ +#[local] Definition Applicative__Proxy_op_zlztzg__ : forall {a : Type}, forall {b : Type}, Proxy (a -> b) -> Proxy a -> Proxy b := fun {a : Type} {b : Type} => fun arg_0__ arg_1__ => Mk_Proxy. -Local Definition Applicative__Proxy_liftA2 +#[local] Definition Applicative__Proxy_liftA2 : forall {a : Type}, forall {b : Type}, forall {c : Type}, (a -> b -> c) -> Proxy a -> Proxy b -> Proxy c := fun {a : Type} {b : Type} {c : Type} => fun f x => Applicative__Proxy_op_zlztzg__ (GHC.Base.fmap f x). -Local Definition Applicative__Proxy_op_ztzg__ +#[local] Definition Applicative__Proxy_op_ztzg__ : forall {a : Type}, forall {b : Type}, Proxy a -> Proxy b -> Proxy b := fun {a : Type} {b : Type} => fun a1 a2 => Applicative__Proxy_op_zlztzg__ (GHC.Base.id GHC.Base.<$ a1) a2. -Local Definition Applicative__Proxy_pure : forall {a : Type}, a -> Proxy a := +#[local] Definition Applicative__Proxy_pure : forall {a : Type}, a -> Proxy a := fun {a : Type} => fun arg_0__ => Mk_Proxy. +#[global] Program Instance Applicative__Proxy : GHC.Base.Applicative Proxy := fun _ k__ => k__ {| GHC.Base.liftA2__ := fun {a : Type} {b : Type} {c : Type} => @@ -171,18 +171,19 @@ Program Instance Applicative__Proxy : GHC.Base.Applicative Proxy := (* Skipping all instances of class `GHC.Base.Alternative', including `Data.Proxy.Alternative__Proxy' *) -Local Definition Monad__Proxy_op_zgzgze__ +#[local] Definition Monad__Proxy_op_zgzgze__ : forall {a : Type}, forall {b : Type}, Proxy a -> (a -> Proxy b) -> Proxy b := fun {a : Type} {b : Type} => fun arg_0__ arg_1__ => Mk_Proxy. -Local Definition Monad__Proxy_op_zgzg__ +#[local] Definition Monad__Proxy_op_zgzg__ : forall {a : Type}, forall {b : Type}, Proxy a -> Proxy b -> Proxy b := fun {a : Type} {b : Type} => fun m k => Monad__Proxy_op_zgzgze__ m (fun arg_0__ => k). -Local Definition Monad__Proxy_return_ : forall {a : Type}, a -> Proxy a := +#[local] Definition Monad__Proxy_return_ : forall {a : Type}, a -> Proxy a := fun {a : Type} => GHC.Base.pure. +#[global] Program Instance Monad__Proxy : GHC.Base.Monad Proxy := fun _ k__ => k__ {| GHC.Base.op_zgzg____ := fun {a : Type} {b : Type} => @@ -194,7 +195,7 @@ Program Instance Monad__Proxy : GHC.Base.Monad Proxy := (* Skipping all instances of class `GHC.Base.MonadPlus', including `Data.Proxy.MonadPlus__Proxy' *) -Definition asProxyTypeOf {a : Type} {proxy : Type -> Type} +#[global] Definition asProxyTypeOf {a : Type} {proxy : Type -> Type} : a -> proxy a -> a := GHC.Base.const. diff --git a/base/Data/Semigroup.h2ci b/base/Data/Semigroup.h2ci index 341c220f3..d24089f1d 100644 --- a/base/Data/Semigroup.h2ci +++ b/base/Data/Semigroup.h2ci @@ -1,31 +1,31 @@ -constructors: - Data.Semigroup.Min: ! '[Qualified "Data.Semigroup" "Mk_Min"]' - Data.Semigroup.Option: ! '[Qualified "Data.Semigroup" "Mk_Option"]' - Data.Semigroup.Arg: ! '[Qualified "Data.Semigroup" "Mk_Arg"]' - Data.Semigroup.Last: ! '[Qualified "Data.Semigroup" "Mk_Last"]' - Data.Semigroup.First: ! '[Qualified "Data.Semigroup" "Mk_First"]' - Data.Semigroup.WrappedMonoid: ! '[Qualified "Data.Semigroup" "WrapMonoid"]' - Data.Semigroup.Max: ! '[Qualified "Data.Semigroup" "Mk_Max"]' constructorFields: Data.Semigroup.WrapMonoid: RecordFields [Qualified "Data.Semigroup" "unwrapMonoid"] + Data.Semigroup.Mk_Last: RecordFields [Qualified "Data.Semigroup" "getLast"] Data.Semigroup.Mk_Option: RecordFields [Qualified "Data.Semigroup" "getOption"] Data.Semigroup.Mk_Arg: NonRecordFields 2 Data.Semigroup.Mk_First: RecordFields [Qualified "Data.Semigroup" "getFirst"] Data.Semigroup.Mk_Max: RecordFields [Qualified "Data.Semigroup" "getMax"] Data.Semigroup.Mk_Min: RecordFields [Qualified "Data.Semigroup" "getMin"] - Data.Semigroup.Mk_Last: RecordFields [Qualified "Data.Semigroup" "getLast"] -recordFieldTypes: - Data.Semigroup.getMin: Qualified "Data.Semigroup" "Min" - Data.Semigroup.unwrapMonoid: Qualified "Data.Semigroup" "WrappedMonoid" - Data.Semigroup.getMax: Qualified "Data.Semigroup" "Max" - Data.Semigroup.getOption: Qualified "Data.Semigroup" "Option" - Data.Semigroup.getLast: Qualified "Data.Semigroup" "Last" - Data.Semigroup.getFirst: Qualified "Data.Semigroup" "First" constructorTypes: Data.Semigroup.WrapMonoid: Qualified "Data.Semigroup" "WrappedMonoid" + Data.Semigroup.Mk_Last: Qualified "Data.Semigroup" "Last" Data.Semigroup.Mk_Option: Qualified "Data.Semigroup" "Option" Data.Semigroup.Mk_Arg: Qualified "Data.Semigroup" "Arg" Data.Semigroup.Mk_First: Qualified "Data.Semigroup" "First" Data.Semigroup.Mk_Max: Qualified "Data.Semigroup" "Max" Data.Semigroup.Mk_Min: Qualified "Data.Semigroup" "Min" - Data.Semigroup.Mk_Last: Qualified "Data.Semigroup" "Last" +constructors: + Data.Semigroup.Option: '[Qualified "Data.Semigroup" "Mk_Option"]' + Data.Semigroup.Arg: '[Qualified "Data.Semigroup" "Mk_Arg"]' + Data.Semigroup.Last: '[Qualified "Data.Semigroup" "Mk_Last"]' + Data.Semigroup.First: '[Qualified "Data.Semigroup" "Mk_First"]' + Data.Semigroup.WrappedMonoid: '[Qualified "Data.Semigroup" "WrapMonoid"]' + Data.Semigroup.Min: '[Qualified "Data.Semigroup" "Mk_Min"]' + Data.Semigroup.Max: '[Qualified "Data.Semigroup" "Mk_Max"]' +recordFieldTypes: + Data.Semigroup.getMin: Qualified "Data.Semigroup" "Min" + Data.Semigroup.getMax: Qualified "Data.Semigroup" "Max" + Data.Semigroup.getOption: Qualified "Data.Semigroup" "Option" + Data.Semigroup.getLast: Qualified "Data.Semigroup" "Last" + Data.Semigroup.unwrapMonoid: Qualified "Data.Semigroup" "WrappedMonoid" + Data.Semigroup.getFirst: Qualified "Data.Semigroup" "First" diff --git a/base/Data/Semigroup.v b/base/Data/Semigroup.v index 97f84b05a..33c1a2c01 100644 --- a/base/Data/Semigroup.v +++ b/base/Data/Semigroup.v @@ -46,10 +46,10 @@ Inductive First a : Type := | Mk_First (getFirst : a) : First a. Inductive Arg a b : Type := | Mk_Arg : a -> b -> Arg a b. -Definition ArgMax a b := +#[global] Definition ArgMax a b := (Max (Arg a b))%type. -Definition ArgMin a b := +#[global] Definition ArgMin a b := (Min (Arg a b))%type. Arguments WrapMonoid {_} _. @@ -66,27 +66,27 @@ Arguments Mk_First {_} _. Arguments Mk_Arg {_} {_} _ _. -Definition unwrapMonoid {m} (arg_0__ : WrappedMonoid m) := +#[global] Definition unwrapMonoid {m} (arg_0__ : WrappedMonoid m) := let 'WrapMonoid unwrapMonoid := arg_0__ in unwrapMonoid. -Definition getOption {a} (arg_0__ : Option a) := +#[global] Definition getOption {a} (arg_0__ : Option a) := let 'Mk_Option getOption := arg_0__ in getOption. -Definition getMin {a} (arg_0__ : Min a) := +#[global] Definition getMin {a} (arg_0__ : Min a) := let 'Mk_Min getMin := arg_0__ in getMin. -Definition getMax {a} (arg_0__ : Max a) := +#[global] Definition getMax {a} (arg_0__ : Max a) := let 'Mk_Max getMax := arg_0__ in getMax. -Definition getLast {a} (arg_0__ : Last a) := +#[global] Definition getLast {a} (arg_0__ : Last a) := let 'Mk_Last getLast := arg_0__ in getLast. -Definition getFirst {a} (arg_0__ : First a) := +#[global] Definition getFirst {a} (arg_0__ : First a) := let 'Mk_First getFirst := arg_0__ in getFirst. @@ -149,480 +149,22 @@ Program Instance Semigroup__SLast {a} : GHC.Base.Semigroup (Last a) := fun _ k = (* Converted value declarations: *) -(* Skipping all instances of class `GHC.Enum.Bounded', including - `Data.Semigroup.Bounded__Min' *) - -Instance Unpeel_Min a : HsToCoq.Unpeel.Unpeel (Min a) a := - HsToCoq.Unpeel.Build_Unpeel _ _ getMin Mk_Min. - -Local Definition Eq___Min_op_zeze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} - : Min inst_a -> Min inst_a -> bool := - GHC.Prim.coerce _GHC.Base.==_. - -Local Definition Eq___Min_op_zsze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} - : Min inst_a -> Min inst_a -> bool := - GHC.Prim.coerce _GHC.Base./=_. - -Program Instance Eq___Min {a : Type} `{GHC.Base.Eq_ a} : GHC.Base.Eq_ (Min a) := - fun _ k__ => - k__ {| GHC.Base.op_zeze____ := Eq___Min_op_zeze__ ; - GHC.Base.op_zsze____ := Eq___Min_op_zsze__ |}. - -Local Definition Ord__Min_op_zl__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Min inst_a -> Min inst_a -> bool := - GHC.Prim.coerce _GHC.Base.<_. - -Local Definition Ord__Min_op_zlze__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Min inst_a -> Min inst_a -> bool := - GHC.Prim.coerce _GHC.Base.<=_. - -Local Definition Ord__Min_op_zg__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Min inst_a -> Min inst_a -> bool := - GHC.Prim.coerce _GHC.Base.>_. - -Local Definition Ord__Min_op_zgze__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Min inst_a -> Min inst_a -> bool := - GHC.Prim.coerce _GHC.Base.>=_. - -Local Definition Ord__Min_compare {inst_a : Type} `{GHC.Base.Ord inst_a} - : Min inst_a -> Min inst_a -> comparison := - GHC.Prim.coerce GHC.Base.compare. - -Local Definition Ord__Min_max {inst_a : Type} `{GHC.Base.Ord inst_a} - : Min inst_a -> Min inst_a -> Min inst_a := - GHC.Prim.coerce GHC.Base.max. - -Local Definition Ord__Min_min {inst_a : Type} `{GHC.Base.Ord inst_a} - : Min inst_a -> Min inst_a -> Min inst_a := - GHC.Prim.coerce GHC.Base.min. - -Program Instance Ord__Min {a : Type} `{GHC.Base.Ord a} : GHC.Base.Ord (Min a) := - fun _ k__ => - k__ {| GHC.Base.op_zl____ := Ord__Min_op_zl__ ; - GHC.Base.op_zlze____ := Ord__Min_op_zlze__ ; - GHC.Base.op_zg____ := Ord__Min_op_zg__ ; - GHC.Base.op_zgze____ := Ord__Min_op_zgze__ ; - GHC.Base.compare__ := Ord__Min_compare ; - GHC.Base.max__ := Ord__Min_max ; - GHC.Base.min__ := Ord__Min_min |}. - -(* Skipping all instances of class `GHC.Show.Show', including - `Data.Semigroup.Show__Min' *) - -(* Skipping all instances of class `GHC.Read.Read', including - `Data.Semigroup.Read__Min' *) - -(* Skipping all instances of class `Data.Data.Data', including - `Data.Semigroup.Data__Min' *) - -(* Skipping all instances of class `GHC.Generics.Generic', including - `Data.Semigroup.Generic__Min' *) - -(* Skipping all instances of class `GHC.Generics.Generic1', including - `Data.Semigroup.Generic1__TYPE__Min__LiftedRep' *) - -(* Skipping all instances of class `GHC.Enum.Bounded', including - `Data.Semigroup.Bounded__Max' *) - -Instance Unpeel_Max a : HsToCoq.Unpeel.Unpeel (Max a) a := - HsToCoq.Unpeel.Build_Unpeel _ _ getMax Mk_Max. - -Local Definition Eq___Max_op_zeze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} - : Max inst_a -> Max inst_a -> bool := - GHC.Prim.coerce _GHC.Base.==_. - -Local Definition Eq___Max_op_zsze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} - : Max inst_a -> Max inst_a -> bool := - GHC.Prim.coerce _GHC.Base./=_. - -Program Instance Eq___Max {a : Type} `{GHC.Base.Eq_ a} : GHC.Base.Eq_ (Max a) := - fun _ k__ => - k__ {| GHC.Base.op_zeze____ := Eq___Max_op_zeze__ ; - GHC.Base.op_zsze____ := Eq___Max_op_zsze__ |}. - -Local Definition Ord__Max_op_zl__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Max inst_a -> Max inst_a -> bool := - GHC.Prim.coerce _GHC.Base.<_. - -Local Definition Ord__Max_op_zlze__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Max inst_a -> Max inst_a -> bool := - GHC.Prim.coerce _GHC.Base.<=_. - -Local Definition Ord__Max_op_zg__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Max inst_a -> Max inst_a -> bool := - GHC.Prim.coerce _GHC.Base.>_. - -Local Definition Ord__Max_op_zgze__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Max inst_a -> Max inst_a -> bool := - GHC.Prim.coerce _GHC.Base.>=_. - -Local Definition Ord__Max_compare {inst_a : Type} `{GHC.Base.Ord inst_a} - : Max inst_a -> Max inst_a -> comparison := - GHC.Prim.coerce GHC.Base.compare. - -Local Definition Ord__Max_max {inst_a : Type} `{GHC.Base.Ord inst_a} - : Max inst_a -> Max inst_a -> Max inst_a := - GHC.Prim.coerce GHC.Base.max. - -Local Definition Ord__Max_min {inst_a : Type} `{GHC.Base.Ord inst_a} - : Max inst_a -> Max inst_a -> Max inst_a := - GHC.Prim.coerce GHC.Base.min. - -Program Instance Ord__Max {a : Type} `{GHC.Base.Ord a} : GHC.Base.Ord (Max a) := - fun _ k__ => - k__ {| GHC.Base.op_zl____ := Ord__Max_op_zl__ ; - GHC.Base.op_zlze____ := Ord__Max_op_zlze__ ; - GHC.Base.op_zg____ := Ord__Max_op_zg__ ; - GHC.Base.op_zgze____ := Ord__Max_op_zgze__ ; - GHC.Base.compare__ := Ord__Max_compare ; - GHC.Base.max__ := Ord__Max_max ; - GHC.Base.min__ := Ord__Max_min |}. - -(* Skipping all instances of class `GHC.Show.Show', including - `Data.Semigroup.Show__Max' *) - -(* Skipping all instances of class `GHC.Read.Read', including - `Data.Semigroup.Read__Max' *) - -(* Skipping all instances of class `Data.Data.Data', including - `Data.Semigroup.Data__Max' *) - -(* Skipping all instances of class `GHC.Generics.Generic', including - `Data.Semigroup.Generic__Max' *) - -(* Skipping all instances of class `GHC.Generics.Generic1', including - `Data.Semigroup.Generic1__TYPE__Max__LiftedRep' *) - -(* Skipping all instances of class `GHC.Show.Show', including - `Data.Semigroup.Show__Arg' *) - -(* Skipping all instances of class `GHC.Read.Read', including - `Data.Semigroup.Read__Arg' *) - -(* Skipping all instances of class `Data.Data.Data', including - `Data.Semigroup.Data__Arg' *) - -(* Skipping all instances of class `GHC.Generics.Generic', including - `Data.Semigroup.Generic__Arg' *) - -(* Skipping all instances of class `GHC.Generics.Generic1', including - `Data.Semigroup.Generic1__TYPE__Arg__LiftedRep' *) - -(* Skipping all instances of class `GHC.Enum.Bounded', including - `Data.Semigroup.Bounded__First' *) - -Instance Unpeel_First a : HsToCoq.Unpeel.Unpeel (First a) a := - HsToCoq.Unpeel.Build_Unpeel _ _ getFirst Mk_First. - -Local Definition Eq___First_op_zeze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} - : First inst_a -> First inst_a -> bool := - GHC.Prim.coerce _GHC.Base.==_. - -Local Definition Eq___First_op_zsze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} - : First inst_a -> First inst_a -> bool := - GHC.Prim.coerce _GHC.Base./=_. - -Program Instance Eq___First {a : Type} `{GHC.Base.Eq_ a} - : GHC.Base.Eq_ (First a) := - fun _ k__ => - k__ {| GHC.Base.op_zeze____ := Eq___First_op_zeze__ ; - GHC.Base.op_zsze____ := Eq___First_op_zsze__ |}. - -Local Definition Ord__First_op_zl__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : First inst_a -> First inst_a -> bool := - GHC.Prim.coerce _GHC.Base.<_. - -Local Definition Ord__First_op_zlze__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : First inst_a -> First inst_a -> bool := - GHC.Prim.coerce _GHC.Base.<=_. - -Local Definition Ord__First_op_zg__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : First inst_a -> First inst_a -> bool := - GHC.Prim.coerce _GHC.Base.>_. - -Local Definition Ord__First_op_zgze__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : First inst_a -> First inst_a -> bool := - GHC.Prim.coerce _GHC.Base.>=_. - -Local Definition Ord__First_compare {inst_a : Type} `{GHC.Base.Ord inst_a} - : First inst_a -> First inst_a -> comparison := - GHC.Prim.coerce GHC.Base.compare. - -Local Definition Ord__First_max {inst_a : Type} `{GHC.Base.Ord inst_a} - : First inst_a -> First inst_a -> First inst_a := - GHC.Prim.coerce GHC.Base.max. - -Local Definition Ord__First_min {inst_a : Type} `{GHC.Base.Ord inst_a} - : First inst_a -> First inst_a -> First inst_a := - GHC.Prim.coerce GHC.Base.min. - -Program Instance Ord__First {a : Type} `{GHC.Base.Ord a} - : GHC.Base.Ord (First a) := - fun _ k__ => - k__ {| GHC.Base.op_zl____ := Ord__First_op_zl__ ; - GHC.Base.op_zlze____ := Ord__First_op_zlze__ ; - GHC.Base.op_zg____ := Ord__First_op_zg__ ; - GHC.Base.op_zgze____ := Ord__First_op_zgze__ ; - GHC.Base.compare__ := Ord__First_compare ; - GHC.Base.max__ := Ord__First_max ; - GHC.Base.min__ := Ord__First_min |}. - -(* Skipping all instances of class `GHC.Show.Show', including - `Data.Semigroup.Show__First' *) - -(* Skipping all instances of class `GHC.Read.Read', including - `Data.Semigroup.Read__First' *) - -(* Skipping all instances of class `Data.Data.Data', including - `Data.Semigroup.Data__First' *) - -(* Skipping all instances of class `GHC.Generics.Generic', including - `Data.Semigroup.Generic__First' *) - -(* Skipping all instances of class `GHC.Generics.Generic1', including - `Data.Semigroup.Generic1__TYPE__First__LiftedRep' *) - -(* Skipping all instances of class `GHC.Enum.Bounded', including - `Data.Semigroup.Bounded__Last' *) - -Instance Unpeel_Last a : HsToCoq.Unpeel.Unpeel (Last a) a := - HsToCoq.Unpeel.Build_Unpeel _ _ getLast Mk_Last. - -Local Definition Eq___Last_op_zeze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} - : Last inst_a -> Last inst_a -> bool := - GHC.Prim.coerce _GHC.Base.==_. - -Local Definition Eq___Last_op_zsze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} - : Last inst_a -> Last inst_a -> bool := - GHC.Prim.coerce _GHC.Base./=_. - -Program Instance Eq___Last {a : Type} `{GHC.Base.Eq_ a} - : GHC.Base.Eq_ (Last a) := - fun _ k__ => - k__ {| GHC.Base.op_zeze____ := Eq___Last_op_zeze__ ; - GHC.Base.op_zsze____ := Eq___Last_op_zsze__ |}. - -Local Definition Ord__Last_op_zl__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Last inst_a -> Last inst_a -> bool := - GHC.Prim.coerce _GHC.Base.<_. - -Local Definition Ord__Last_op_zlze__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Last inst_a -> Last inst_a -> bool := - GHC.Prim.coerce _GHC.Base.<=_. - -Local Definition Ord__Last_op_zg__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Last inst_a -> Last inst_a -> bool := - GHC.Prim.coerce _GHC.Base.>_. - -Local Definition Ord__Last_op_zgze__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Last inst_a -> Last inst_a -> bool := - GHC.Prim.coerce _GHC.Base.>=_. - -Local Definition Ord__Last_compare {inst_a : Type} `{GHC.Base.Ord inst_a} - : Last inst_a -> Last inst_a -> comparison := - GHC.Prim.coerce GHC.Base.compare. - -Local Definition Ord__Last_max {inst_a : Type} `{GHC.Base.Ord inst_a} - : Last inst_a -> Last inst_a -> Last inst_a := - GHC.Prim.coerce GHC.Base.max. - -Local Definition Ord__Last_min {inst_a : Type} `{GHC.Base.Ord inst_a} - : Last inst_a -> Last inst_a -> Last inst_a := - GHC.Prim.coerce GHC.Base.min. - -Program Instance Ord__Last {a : Type} `{GHC.Base.Ord a} - : GHC.Base.Ord (Last a) := - fun _ k__ => - k__ {| GHC.Base.op_zl____ := Ord__Last_op_zl__ ; - GHC.Base.op_zlze____ := Ord__Last_op_zlze__ ; - GHC.Base.op_zg____ := Ord__Last_op_zg__ ; - GHC.Base.op_zgze____ := Ord__Last_op_zgze__ ; - GHC.Base.compare__ := Ord__Last_compare ; - GHC.Base.max__ := Ord__Last_max ; - GHC.Base.min__ := Ord__Last_min |}. - -(* Skipping all instances of class `GHC.Show.Show', including - `Data.Semigroup.Show__Last' *) - -(* Skipping all instances of class `GHC.Read.Read', including - `Data.Semigroup.Read__Last' *) - -(* Skipping all instances of class `Data.Data.Data', including - `Data.Semigroup.Data__Last' *) - -(* Skipping all instances of class `GHC.Generics.Generic', including - `Data.Semigroup.Generic__Last' *) - -(* Skipping all instances of class `GHC.Generics.Generic1', including - `Data.Semigroup.Generic1__TYPE__Last__LiftedRep' *) - -(* Skipping all instances of class `GHC.Enum.Bounded', including - `Data.Semigroup.Bounded__WrappedMonoid' *) - -Instance Unpeel_WrappedMonoid a : HsToCoq.Unpeel.Unpeel (WrappedMonoid a) a := - HsToCoq.Unpeel.Build_Unpeel _ _ unwrapMonoid WrapMonoid. - -Local Definition Eq___WrappedMonoid_op_zeze__ {inst_m : Type} `{GHC.Base.Eq_ - inst_m} - : WrappedMonoid inst_m -> WrappedMonoid inst_m -> bool := - GHC.Prim.coerce _GHC.Base.==_. - -Local Definition Eq___WrappedMonoid_op_zsze__ {inst_m : Type} `{GHC.Base.Eq_ - inst_m} - : WrappedMonoid inst_m -> WrappedMonoid inst_m -> bool := - GHC.Prim.coerce _GHC.Base./=_. - -Program Instance Eq___WrappedMonoid {m : Type} `{GHC.Base.Eq_ m} - : GHC.Base.Eq_ (WrappedMonoid m) := - fun _ k__ => - k__ {| GHC.Base.op_zeze____ := Eq___WrappedMonoid_op_zeze__ ; - GHC.Base.op_zsze____ := Eq___WrappedMonoid_op_zsze__ |}. - -Local Definition Ord__WrappedMonoid_op_zl__ {inst_m : Type} `{GHC.Base.Ord - inst_m} - : WrappedMonoid inst_m -> WrappedMonoid inst_m -> bool := - GHC.Prim.coerce _GHC.Base.<_. - -Local Definition Ord__WrappedMonoid_op_zlze__ {inst_m : Type} `{GHC.Base.Ord - inst_m} - : WrappedMonoid inst_m -> WrappedMonoid inst_m -> bool := - GHC.Prim.coerce _GHC.Base.<=_. - -Local Definition Ord__WrappedMonoid_op_zg__ {inst_m : Type} `{GHC.Base.Ord - inst_m} - : WrappedMonoid inst_m -> WrappedMonoid inst_m -> bool := - GHC.Prim.coerce _GHC.Base.>_. - -Local Definition Ord__WrappedMonoid_op_zgze__ {inst_m : Type} `{GHC.Base.Ord - inst_m} - : WrappedMonoid inst_m -> WrappedMonoid inst_m -> bool := - GHC.Prim.coerce _GHC.Base.>=_. - -Local Definition Ord__WrappedMonoid_compare {inst_m : Type} `{GHC.Base.Ord - inst_m} - : WrappedMonoid inst_m -> WrappedMonoid inst_m -> comparison := - GHC.Prim.coerce GHC.Base.compare. - -Local Definition Ord__WrappedMonoid_max {inst_m : Type} `{GHC.Base.Ord inst_m} - : WrappedMonoid inst_m -> WrappedMonoid inst_m -> WrappedMonoid inst_m := - GHC.Prim.coerce GHC.Base.max. - -Local Definition Ord__WrappedMonoid_min {inst_m : Type} `{GHC.Base.Ord inst_m} - : WrappedMonoid inst_m -> WrappedMonoid inst_m -> WrappedMonoid inst_m := - GHC.Prim.coerce GHC.Base.min. - -Program Instance Ord__WrappedMonoid {m : Type} `{GHC.Base.Ord m} - : GHC.Base.Ord (WrappedMonoid m) := - fun _ k__ => - k__ {| GHC.Base.op_zl____ := Ord__WrappedMonoid_op_zl__ ; - GHC.Base.op_zlze____ := Ord__WrappedMonoid_op_zlze__ ; - GHC.Base.op_zg____ := Ord__WrappedMonoid_op_zg__ ; - GHC.Base.op_zgze____ := Ord__WrappedMonoid_op_zgze__ ; - GHC.Base.compare__ := Ord__WrappedMonoid_compare ; - GHC.Base.max__ := Ord__WrappedMonoid_max ; - GHC.Base.min__ := Ord__WrappedMonoid_min |}. - -(* Skipping all instances of class `GHC.Show.Show', including - `Data.Semigroup.Show__WrappedMonoid' *) - -(* Skipping all instances of class `GHC.Read.Read', including - `Data.Semigroup.Read__WrappedMonoid' *) - -(* Skipping all instances of class `Data.Data.Data', including - `Data.Semigroup.Data__WrappedMonoid' *) - -(* Skipping all instances of class `GHC.Generics.Generic', including - `Data.Semigroup.Generic__WrappedMonoid' *) - -(* Skipping all instances of class `GHC.Generics.Generic1', including - `Data.Semigroup.Generic1__TYPE__WrappedMonoid__LiftedRep' *) - -Instance Unpeel_Option a : HsToCoq.Unpeel.Unpeel (Option a) (option a) := - HsToCoq.Unpeel.Build_Unpeel _ _ getOption Mk_Option. - -Local Definition Eq___Option_op_zeze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} - : Option inst_a -> Option inst_a -> bool := - GHC.Prim.coerce _GHC.Base.==_. - -Local Definition Eq___Option_op_zsze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} - : Option inst_a -> Option inst_a -> bool := - GHC.Prim.coerce _GHC.Base./=_. - -Program Instance Eq___Option {a : Type} `{GHC.Base.Eq_ a} - : GHC.Base.Eq_ (Option a) := - fun _ k__ => - k__ {| GHC.Base.op_zeze____ := Eq___Option_op_zeze__ ; - GHC.Base.op_zsze____ := Eq___Option_op_zsze__ |}. - -Local Definition Ord__Option_op_zl__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Option inst_a -> Option inst_a -> bool := - GHC.Prim.coerce _GHC.Base.<_. - -Local Definition Ord__Option_op_zlze__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Option inst_a -> Option inst_a -> bool := - GHC.Prim.coerce _GHC.Base.<=_. - -Local Definition Ord__Option_op_zg__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Option inst_a -> Option inst_a -> bool := - GHC.Prim.coerce _GHC.Base.>_. - -Local Definition Ord__Option_op_zgze__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Option inst_a -> Option inst_a -> bool := - GHC.Prim.coerce _GHC.Base.>=_. - -Local Definition Ord__Option_compare {inst_a : Type} `{GHC.Base.Ord inst_a} - : Option inst_a -> Option inst_a -> comparison := - GHC.Prim.coerce GHC.Base.compare. - -Local Definition Ord__Option_max {inst_a : Type} `{GHC.Base.Ord inst_a} - : Option inst_a -> Option inst_a -> Option inst_a := - GHC.Prim.coerce GHC.Base.max. - -Local Definition Ord__Option_min {inst_a : Type} `{GHC.Base.Ord inst_a} - : Option inst_a -> Option inst_a -> Option inst_a := - GHC.Prim.coerce GHC.Base.min. - -Program Instance Ord__Option {a : Type} `{GHC.Base.Ord a} - : GHC.Base.Ord (Option a) := - fun _ k__ => - k__ {| GHC.Base.op_zl____ := Ord__Option_op_zl__ ; - GHC.Base.op_zlze____ := Ord__Option_op_zlze__ ; - GHC.Base.op_zg____ := Ord__Option_op_zg__ ; - GHC.Base.op_zgze____ := Ord__Option_op_zgze__ ; - GHC.Base.compare__ := Ord__Option_compare ; - GHC.Base.max__ := Ord__Option_max ; - GHC.Base.min__ := Ord__Option_min |}. - -(* Skipping all instances of class `GHC.Show.Show', including - `Data.Semigroup.Show__Option' *) - -(* Skipping all instances of class `GHC.Read.Read', including - `Data.Semigroup.Read__Option' *) - -(* Skipping all instances of class `Data.Data.Data', including - `Data.Semigroup.Data__Option' *) - -(* Skipping all instances of class `GHC.Generics.Generic', including - `Data.Semigroup.Generic__Option' *) - -(* Skipping all instances of class `GHC.Generics.Generic1', including - `Data.Semigroup.Generic1__TYPE__Option__LiftedRep' *) - (* Skipping all instances of class `GHC.Enum.Enum', including `Data.Semigroup.Enum__Min' *) -Local Definition Semigroup__Min_op_zlzlzgzg__ {inst_a : Type} `{GHC.Base.Ord +#[local] Definition Semigroup__Min_op_zlzlzgzg__ {inst_a : Type} `{GHC.Base.Ord inst_a} : Min inst_a -> Min inst_a -> Min inst_a := GHC.Prim.coerce (GHC.Base.min : inst_a -> inst_a -> inst_a). +#[global] Program Instance Semigroup__Min {a : Type} `{GHC.Base.Ord a} : GHC.Base.Semigroup (Min a) := fun _ k__ => k__ {| GHC.Base.op_zlzlzgzg____ := Semigroup__Min_op_zlzlzgzg__ |}. (* Skipping instance `Data.Semigroup.Monoid__Min' of class `GHC.Base.Monoid' *) -Local Definition Functor__Min_fmap +#[local] Definition Functor__Min_fmap : forall {a : Type}, forall {b : Type}, (a -> b) -> Min a -> Min b := fun {a : Type} {b : Type} => fun arg_0__ arg_1__ => @@ -630,54 +172,62 @@ Local Definition Functor__Min_fmap | f, Mk_Min x => Mk_Min (f x) end. -Local Definition Functor__Min_op_zlzd__ +#[local] Definition Functor__Min_op_zlzd__ : forall {a : Type}, forall {b : Type}, a -> Min b -> Min a := fun {a : Type} {b : Type} => Functor__Min_fmap GHC.Base.∘ GHC.Base.const. +#[global] Program Instance Functor__Min : GHC.Base.Functor Min := fun _ k__ => k__ {| GHC.Base.fmap__ := fun {a : Type} {b : Type} => Functor__Min_fmap ; GHC.Base.op_zlzd____ := fun {a : Type} {b : Type} => Functor__Min_op_zlzd__ |}. -Local Definition Foldable__Min_foldMap +#[local] Definition Foldable__Min_foldMap : forall {m : Type}, forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> Min a -> m := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => fun arg_0__ arg_1__ => match arg_0__, arg_1__ with | f, Mk_Min a => f a end. -Local Definition Foldable__Min_fold +#[local] Definition Foldable__Min_fold : forall {m : Type}, forall `{GHC.Base.Monoid m}, Min m -> m := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Min_foldMap GHC.Base.id. -Local Definition Foldable__Min_foldl - : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> Min a -> b := - fun {b : Type} {a : Type} => - fun f z t => - Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual - (Foldable__Min_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ - (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ - GHC.Base.flip f)) t)) z. - -Local Definition Foldable__Min_foldr +#[local] Definition Foldable__Min_foldr : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> Min a -> b := fun {a : Type} {b : Type} => fun f z t => Data.SemigroupInternal.appEndo (Foldable__Min_foldMap (Coq.Program.Basics.compose Data.SemigroupInternal.Mk_Endo f) t) z. -Local Definition Foldable__Min_foldl' +#[local] Definition Foldable__Min_foldl' : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> Min a -> b := fun {b : Type} {a : Type} => fun f z0 xs => let f' := fun x k z => k (f z x) in Foldable__Min_foldr f' GHC.Base.id xs z0. -Local Definition Foldable__Min_foldr' +#[local] Definition Foldable__Min_foldMap' + : forall {m : Type}, + forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> Min a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun f => + Foldable__Min_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. + +#[local] Definition Foldable__Min_foldl + : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> Min a -> b := + fun {b : Type} {a : Type} => + fun f z t => + Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual + (Foldable__Min_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ + (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ + GHC.Base.flip f)) t)) z. + +#[local] Definition Foldable__Min_foldr' : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> Min a -> b := fun {a : Type} {b : Type} => fun f z0 xs => let f' := fun k x z => k (f x z) in Foldable__Min_foldl f' GHC.Base.id xs z0. -Local Definition Foldable__Min_length +#[local] Definition Foldable__Min_length : forall {a : Type}, Min a -> GHC.Num.Int := fun {a : Type} => Foldable__Min_foldl' (fun arg_0__ arg_1__ => @@ -685,31 +235,34 @@ Local Definition Foldable__Min_length | c, _ => c GHC.Num.+ #1 end) #0. -Local Definition Foldable__Min_null : forall {a : Type}, Min a -> bool := +#[local] Definition Foldable__Min_null : forall {a : Type}, Min a -> bool := fun {a : Type} => Foldable__Min_foldr (fun arg_0__ arg_1__ => false) true. -Local Definition Foldable__Min_product +#[local] Definition Foldable__Min_product : forall {a : Type}, forall `{GHC.Num.Num a}, Min a -> a := fun {a : Type} `{GHC.Num.Num a} => Coq.Program.Basics.compose Data.SemigroupInternal.getProduct (Foldable__Min_foldMap Data.SemigroupInternal.Mk_Product). -Local Definition Foldable__Min_sum +#[local] Definition Foldable__Min_sum : forall {a : Type}, forall `{GHC.Num.Num a}, Min a -> a := fun {a : Type} `{GHC.Num.Num a} => Coq.Program.Basics.compose Data.SemigroupInternal.getSum (Foldable__Min_foldMap Data.SemigroupInternal.Mk_Sum). -Local Definition Foldable__Min_toList : forall {a : Type}, Min a -> list a := +#[local] Definition Foldable__Min_toList : forall {a : Type}, Min a -> list a := fun {a : Type} => fun t => GHC.Base.build' (fun _ => (fun c n => Foldable__Min_foldr c n t)). +#[global] Program Instance Foldable__Min : Data.Foldable.Foldable Min := fun _ k__ => k__ {| Data.Foldable.fold__ := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Min_fold ; Data.Foldable.foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => Foldable__Min_foldMap ; + Data.Foldable.foldMap'__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__Min_foldMap' ; Data.Foldable.foldl__ := fun {b : Type} {a : Type} => Foldable__Min_foldl ; Data.Foldable.foldl'__ := fun {b : Type} {a : Type} => Foldable__Min_foldl' ; Data.Foldable.foldr__ := fun {a : Type} {b : Type} => Foldable__Min_foldr ; @@ -721,7 +274,7 @@ Program Instance Foldable__Min : Data.Foldable.Foldable Min := Data.Foldable.sum__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__Min_sum ; Data.Foldable.toList__ := fun {a : Type} => Foldable__Min_toList |}. -Local Definition Traversable__Min_traverse +#[local] Definition Traversable__Min_traverse : forall {f : Type -> Type}, forall {a : Type}, forall {b : Type}, @@ -732,7 +285,7 @@ Local Definition Traversable__Min_traverse | f, Mk_Min a => Mk_Min Data.Functor.<$> f a end. -Local Definition Traversable__Min_mapM +#[local] Definition Traversable__Min_mapM : forall {m : Type -> Type}, forall {a : Type}, forall {b : Type}, @@ -740,18 +293,19 @@ Local Definition Traversable__Min_mapM fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => Traversable__Min_traverse. -Local Definition Traversable__Min_sequenceA +#[local] Definition Traversable__Min_sequenceA : forall {f : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Applicative f}, Min (f a) -> f (Min a) := fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => Traversable__Min_traverse GHC.Base.id. -Local Definition Traversable__Min_sequence +#[local] Definition Traversable__Min_sequence : forall {m : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Monad m}, Min (m a) -> m (Min a) := fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => Traversable__Min_sequenceA. +#[global] Program Instance Traversable__Min : Data.Traversable.Traversable Min := fun _ k__ => k__ {| Data.Traversable.mapM__ := fun {m : Type -> Type} @@ -773,24 +327,25 @@ Program Instance Traversable__Min : Data.Traversable.Traversable Min := `{GHC.Base.Applicative f} => Traversable__Min_traverse |}. -Local Definition Applicative__Min_liftA2 +#[local] Definition Applicative__Min_liftA2 : forall {a : Type}, forall {b : Type}, forall {c : Type}, (a -> b -> c) -> Min a -> Min b -> Min c := fun {a : Type} {b : Type} {c : Type} => GHC.Prim.coerce. -Local Definition Applicative__Min_op_zlztzg__ +#[local] Definition Applicative__Min_op_zlztzg__ : forall {a : Type}, forall {b : Type}, Min (a -> b) -> Min a -> Min b := fun {a : Type} {b : Type} => GHC.Prim.coerce. -Local Definition Applicative__Min_op_ztzg__ +#[local] Definition Applicative__Min_op_ztzg__ : forall {a : Type}, forall {b : Type}, Min a -> Min b -> Min b := fun {a : Type} {b : Type} => fun arg_0__ arg_1__ => match arg_0__, arg_1__ with | _, a => a end. -Local Definition Applicative__Min_pure : forall {a : Type}, a -> Min a := +#[local] Definition Applicative__Min_pure : forall {a : Type}, a -> Min a := fun {a : Type} => Mk_Min. +#[global] Program Instance Applicative__Min : GHC.Base.Applicative Min := fun _ k__ => k__ {| GHC.Base.liftA2__ := fun {a : Type} {b : Type} {c : Type} => @@ -801,18 +356,19 @@ Program Instance Applicative__Min : GHC.Base.Applicative Min := Applicative__Min_op_ztzg__ ; GHC.Base.pure__ := fun {a : Type} => Applicative__Min_pure |}. -Local Definition Monad__Min_op_zgzg__ +#[local] Definition Monad__Min_op_zgzg__ : forall {a : Type}, forall {b : Type}, Min a -> Min b -> Min b := fun {a : Type} {b : Type} => _GHC.Base.*>_. -Local Definition Monad__Min_op_zgzgze__ +#[local] Definition Monad__Min_op_zgzgze__ : forall {a : Type}, forall {b : Type}, Min a -> (a -> Min b) -> Min b := fun {a : Type} {b : Type} => fun arg_0__ arg_1__ => match arg_0__, arg_1__ with | Mk_Min a, f => f a end. -Local Definition Monad__Min_return_ : forall {a : Type}, a -> Min a := +#[local] Definition Monad__Min_return_ : forall {a : Type}, a -> Min a := fun {a : Type} => GHC.Base.pure. +#[global] Program Instance Monad__Min : GHC.Base.Monad Min := fun _ k__ => k__ {| GHC.Base.op_zgzg____ := fun {a : Type} {b : Type} => @@ -829,18 +385,19 @@ Program Instance Monad__Min : GHC.Base.Monad Min := (* Skipping all instances of class `GHC.Enum.Enum', including `Data.Semigroup.Enum__Max' *) -Local Definition Semigroup__Max_op_zlzlzgzg__ {inst_a : Type} `{GHC.Base.Ord +#[local] Definition Semigroup__Max_op_zlzlzgzg__ {inst_a : Type} `{GHC.Base.Ord inst_a} : Max inst_a -> Max inst_a -> Max inst_a := GHC.Prim.coerce (GHC.Base.max : inst_a -> inst_a -> inst_a). +#[global] Program Instance Semigroup__Max {a : Type} `{GHC.Base.Ord a} : GHC.Base.Semigroup (Max a) := fun _ k__ => k__ {| GHC.Base.op_zlzlzgzg____ := Semigroup__Max_op_zlzlzgzg__ |}. (* Skipping instance `Data.Semigroup.Monoid__Max' of class `GHC.Base.Monoid' *) -Local Definition Functor__Max_fmap +#[local] Definition Functor__Max_fmap : forall {a : Type}, forall {b : Type}, (a -> b) -> Max a -> Max b := fun {a : Type} {b : Type} => fun arg_0__ arg_1__ => @@ -848,54 +405,62 @@ Local Definition Functor__Max_fmap | f, Mk_Max x => Mk_Max (f x) end. -Local Definition Functor__Max_op_zlzd__ +#[local] Definition Functor__Max_op_zlzd__ : forall {a : Type}, forall {b : Type}, a -> Max b -> Max a := fun {a : Type} {b : Type} => Functor__Max_fmap GHC.Base.∘ GHC.Base.const. +#[global] Program Instance Functor__Max : GHC.Base.Functor Max := fun _ k__ => k__ {| GHC.Base.fmap__ := fun {a : Type} {b : Type} => Functor__Max_fmap ; GHC.Base.op_zlzd____ := fun {a : Type} {b : Type} => Functor__Max_op_zlzd__ |}. -Local Definition Foldable__Max_foldMap +#[local] Definition Foldable__Max_foldMap : forall {m : Type}, forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> Max a -> m := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => fun arg_0__ arg_1__ => match arg_0__, arg_1__ with | f, Mk_Max a => f a end. -Local Definition Foldable__Max_fold +#[local] Definition Foldable__Max_fold : forall {m : Type}, forall `{GHC.Base.Monoid m}, Max m -> m := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Max_foldMap GHC.Base.id. -Local Definition Foldable__Max_foldl - : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> Max a -> b := - fun {b : Type} {a : Type} => - fun f z t => - Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual - (Foldable__Max_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ - (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ - GHC.Base.flip f)) t)) z. - -Local Definition Foldable__Max_foldr +#[local] Definition Foldable__Max_foldr : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> Max a -> b := fun {a : Type} {b : Type} => fun f z t => Data.SemigroupInternal.appEndo (Foldable__Max_foldMap (Coq.Program.Basics.compose Data.SemigroupInternal.Mk_Endo f) t) z. -Local Definition Foldable__Max_foldl' +#[local] Definition Foldable__Max_foldl' : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> Max a -> b := fun {b : Type} {a : Type} => fun f z0 xs => let f' := fun x k z => k (f z x) in Foldable__Max_foldr f' GHC.Base.id xs z0. -Local Definition Foldable__Max_foldr' +#[local] Definition Foldable__Max_foldMap' + : forall {m : Type}, + forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> Max a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun f => + Foldable__Max_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. + +#[local] Definition Foldable__Max_foldl + : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> Max a -> b := + fun {b : Type} {a : Type} => + fun f z t => + Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual + (Foldable__Max_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ + (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ + GHC.Base.flip f)) t)) z. + +#[local] Definition Foldable__Max_foldr' : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> Max a -> b := fun {a : Type} {b : Type} => fun f z0 xs => let f' := fun k x z => k (f x z) in Foldable__Max_foldl f' GHC.Base.id xs z0. -Local Definition Foldable__Max_length +#[local] Definition Foldable__Max_length : forall {a : Type}, Max a -> GHC.Num.Int := fun {a : Type} => Foldable__Max_foldl' (fun arg_0__ arg_1__ => @@ -903,31 +468,34 @@ Local Definition Foldable__Max_length | c, _ => c GHC.Num.+ #1 end) #0. -Local Definition Foldable__Max_null : forall {a : Type}, Max a -> bool := +#[local] Definition Foldable__Max_null : forall {a : Type}, Max a -> bool := fun {a : Type} => Foldable__Max_foldr (fun arg_0__ arg_1__ => false) true. -Local Definition Foldable__Max_product +#[local] Definition Foldable__Max_product : forall {a : Type}, forall `{GHC.Num.Num a}, Max a -> a := fun {a : Type} `{GHC.Num.Num a} => Coq.Program.Basics.compose Data.SemigroupInternal.getProduct (Foldable__Max_foldMap Data.SemigroupInternal.Mk_Product). -Local Definition Foldable__Max_sum +#[local] Definition Foldable__Max_sum : forall {a : Type}, forall `{GHC.Num.Num a}, Max a -> a := fun {a : Type} `{GHC.Num.Num a} => Coq.Program.Basics.compose Data.SemigroupInternal.getSum (Foldable__Max_foldMap Data.SemigroupInternal.Mk_Sum). -Local Definition Foldable__Max_toList : forall {a : Type}, Max a -> list a := +#[local] Definition Foldable__Max_toList : forall {a : Type}, Max a -> list a := fun {a : Type} => fun t => GHC.Base.build' (fun _ => (fun c n => Foldable__Max_foldr c n t)). +#[global] Program Instance Foldable__Max : Data.Foldable.Foldable Max := fun _ k__ => k__ {| Data.Foldable.fold__ := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Max_fold ; Data.Foldable.foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => Foldable__Max_foldMap ; + Data.Foldable.foldMap'__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__Max_foldMap' ; Data.Foldable.foldl__ := fun {b : Type} {a : Type} => Foldable__Max_foldl ; Data.Foldable.foldl'__ := fun {b : Type} {a : Type} => Foldable__Max_foldl' ; Data.Foldable.foldr__ := fun {a : Type} {b : Type} => Foldable__Max_foldr ; @@ -939,7 +507,7 @@ Program Instance Foldable__Max : Data.Foldable.Foldable Max := Data.Foldable.sum__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__Max_sum ; Data.Foldable.toList__ := fun {a : Type} => Foldable__Max_toList |}. -Local Definition Traversable__Max_traverse +#[local] Definition Traversable__Max_traverse : forall {f : Type -> Type}, forall {a : Type}, forall {b : Type}, @@ -950,7 +518,7 @@ Local Definition Traversable__Max_traverse | f, Mk_Max a => Mk_Max Data.Functor.<$> f a end. -Local Definition Traversable__Max_mapM +#[local] Definition Traversable__Max_mapM : forall {m : Type -> Type}, forall {a : Type}, forall {b : Type}, @@ -958,18 +526,19 @@ Local Definition Traversable__Max_mapM fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => Traversable__Max_traverse. -Local Definition Traversable__Max_sequenceA +#[local] Definition Traversable__Max_sequenceA : forall {f : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Applicative f}, Max (f a) -> f (Max a) := fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => Traversable__Max_traverse GHC.Base.id. -Local Definition Traversable__Max_sequence +#[local] Definition Traversable__Max_sequence : forall {m : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Monad m}, Max (m a) -> m (Max a) := fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => Traversable__Max_sequenceA. +#[global] Program Instance Traversable__Max : Data.Traversable.Traversable Max := fun _ k__ => k__ {| Data.Traversable.mapM__ := fun {m : Type -> Type} @@ -991,24 +560,25 @@ Program Instance Traversable__Max : Data.Traversable.Traversable Max := `{GHC.Base.Applicative f} => Traversable__Max_traverse |}. -Local Definition Applicative__Max_liftA2 +#[local] Definition Applicative__Max_liftA2 : forall {a : Type}, forall {b : Type}, forall {c : Type}, (a -> b -> c) -> Max a -> Max b -> Max c := fun {a : Type} {b : Type} {c : Type} => GHC.Prim.coerce. -Local Definition Applicative__Max_op_zlztzg__ +#[local] Definition Applicative__Max_op_zlztzg__ : forall {a : Type}, forall {b : Type}, Max (a -> b) -> Max a -> Max b := fun {a : Type} {b : Type} => GHC.Prim.coerce. -Local Definition Applicative__Max_op_ztzg__ +#[local] Definition Applicative__Max_op_ztzg__ : forall {a : Type}, forall {b : Type}, Max a -> Max b -> Max b := fun {a : Type} {b : Type} => fun arg_0__ arg_1__ => match arg_0__, arg_1__ with | _, a => a end. -Local Definition Applicative__Max_pure : forall {a : Type}, a -> Max a := +#[local] Definition Applicative__Max_pure : forall {a : Type}, a -> Max a := fun {a : Type} => Mk_Max. +#[global] Program Instance Applicative__Max : GHC.Base.Applicative Max := fun _ k__ => k__ {| GHC.Base.liftA2__ := fun {a : Type} {b : Type} {c : Type} => @@ -1019,18 +589,19 @@ Program Instance Applicative__Max : GHC.Base.Applicative Max := Applicative__Max_op_ztzg__ ; GHC.Base.pure__ := fun {a : Type} => Applicative__Max_pure |}. -Local Definition Monad__Max_op_zgzg__ +#[local] Definition Monad__Max_op_zgzg__ : forall {a : Type}, forall {b : Type}, Max a -> Max b -> Max b := fun {a : Type} {b : Type} => _GHC.Base.*>_. -Local Definition Monad__Max_op_zgzgze__ +#[local] Definition Monad__Max_op_zgzgze__ : forall {a : Type}, forall {b : Type}, Max a -> (a -> Max b) -> Max b := fun {a : Type} {b : Type} => fun arg_0__ arg_1__ => match arg_0__, arg_1__ with | Mk_Max a, f => f a end. -Local Definition Monad__Max_return_ : forall {a : Type}, a -> Max a := +#[local] Definition Monad__Max_return_ : forall {a : Type}, a -> Max a := fun {a : Type} => GHC.Base.pure. +#[global] Program Instance Monad__Max : GHC.Base.Monad Max := fun _ k__ => k__ {| GHC.Base.op_zgzg____ := fun {a : Type} {b : Type} => @@ -1044,7 +615,7 @@ Program Instance Monad__Max : GHC.Base.Monad Max := (* Skipping all instances of class `GHC.Num.Num', including `Data.Semigroup.Num__Max' *) -Local Definition Functor__Arg_fmap {inst_a : Type} +#[local] Definition Functor__Arg_fmap {inst_a : Type} : forall {a : Type}, forall {b : Type}, (a -> b) -> Arg inst_a a -> Arg inst_a b := fun {a : Type} {b : Type} => @@ -1053,36 +624,27 @@ Local Definition Functor__Arg_fmap {inst_a : Type} | f, Mk_Arg x a => Mk_Arg x (f a) end. -Local Definition Functor__Arg_op_zlzd__ {inst_a : Type} +#[local] Definition Functor__Arg_op_zlzd__ {inst_a : Type} : forall {a : Type}, forall {b : Type}, a -> Arg inst_a b -> Arg inst_a a := fun {a : Type} {b : Type} => Functor__Arg_fmap GHC.Base.∘ GHC.Base.const. +#[global] Program Instance Functor__Arg {a : Type} : GHC.Base.Functor (Arg a) := fun _ k__ => k__ {| GHC.Base.fmap__ := fun {a : Type} {b : Type} => Functor__Arg_fmap ; GHC.Base.op_zlzd____ := fun {a : Type} {b : Type} => Functor__Arg_op_zlzd__ |}. -Local Definition Foldable__Arg_foldMap {inst_a : Type} +#[local] Definition Foldable__Arg_foldMap {inst_a : Type} : forall {m : Type}, forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> Arg inst_a a -> m := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => fun arg_0__ arg_1__ => match arg_0__, arg_1__ with | f, Mk_Arg _ a => f a end. -Local Definition Foldable__Arg_fold {inst_a : Type} +#[local] Definition Foldable__Arg_fold {inst_a : Type} : forall {m : Type}, forall `{GHC.Base.Monoid m}, Arg inst_a m -> m := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Arg_foldMap GHC.Base.id. -Local Definition Foldable__Arg_foldl {inst_a : Type} - : forall {b : Type}, - forall {a : Type}, (b -> a -> b) -> b -> Arg inst_a a -> b := - fun {b : Type} {a : Type} => - fun f z t => - Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual - (Foldable__Arg_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ - (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ - GHC.Base.flip f)) t)) z. - -Local Definition Foldable__Arg_foldr {inst_a : Type} +#[local] Definition Foldable__Arg_foldr {inst_a : Type} : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> Arg inst_a a -> b := fun {a : Type} {b : Type} => @@ -1090,21 +652,38 @@ Local Definition Foldable__Arg_foldr {inst_a : Type} Data.SemigroupInternal.appEndo (Foldable__Arg_foldMap (Coq.Program.Basics.compose Data.SemigroupInternal.Mk_Endo f) t) z. -Local Definition Foldable__Arg_foldl' {inst_a : Type} +#[local] Definition Foldable__Arg_foldl' {inst_a : Type} : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> Arg inst_a a -> b := fun {b : Type} {a : Type} => fun f z0 xs => let f' := fun x k z => k (f z x) in Foldable__Arg_foldr f' GHC.Base.id xs z0. -Local Definition Foldable__Arg_foldr' {inst_a : Type} +#[local] Definition Foldable__Arg_foldMap' {inst_a : Type} + : forall {m : Type}, + forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> Arg inst_a a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun f => + Foldable__Arg_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. + +#[local] Definition Foldable__Arg_foldl {inst_a : Type} + : forall {b : Type}, + forall {a : Type}, (b -> a -> b) -> b -> Arg inst_a a -> b := + fun {b : Type} {a : Type} => + fun f z t => + Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual + (Foldable__Arg_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ + (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ + GHC.Base.flip f)) t)) z. + +#[local] Definition Foldable__Arg_foldr' {inst_a : Type} : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> Arg inst_a a -> b := fun {a : Type} {b : Type} => fun f z0 xs => let f' := fun k x z => k (f x z) in Foldable__Arg_foldl f' GHC.Base.id xs z0. -Local Definition Foldable__Arg_length {inst_a : Type} +#[local] Definition Foldable__Arg_length {inst_a : Type} : forall {a : Type}, Arg inst_a a -> GHC.Num.Int := fun {a : Type} => Foldable__Arg_foldl' (fun arg_0__ arg_1__ => @@ -1112,33 +691,36 @@ Local Definition Foldable__Arg_length {inst_a : Type} | c, _ => c GHC.Num.+ #1 end) #0. -Local Definition Foldable__Arg_null {inst_a : Type} +#[local] Definition Foldable__Arg_null {inst_a : Type} : forall {a : Type}, Arg inst_a a -> bool := fun {a : Type} => Foldable__Arg_foldr (fun arg_0__ arg_1__ => false) true. -Local Definition Foldable__Arg_product {inst_a : Type} +#[local] Definition Foldable__Arg_product {inst_a : Type} : forall {a : Type}, forall `{GHC.Num.Num a}, Arg inst_a a -> a := fun {a : Type} `{GHC.Num.Num a} => Coq.Program.Basics.compose Data.SemigroupInternal.getProduct (Foldable__Arg_foldMap Data.SemigroupInternal.Mk_Product). -Local Definition Foldable__Arg_sum {inst_a : Type} +#[local] Definition Foldable__Arg_sum {inst_a : Type} : forall {a : Type}, forall `{GHC.Num.Num a}, Arg inst_a a -> a := fun {a : Type} `{GHC.Num.Num a} => Coq.Program.Basics.compose Data.SemigroupInternal.getSum (Foldable__Arg_foldMap Data.SemigroupInternal.Mk_Sum). -Local Definition Foldable__Arg_toList {inst_a : Type} +#[local] Definition Foldable__Arg_toList {inst_a : Type} : forall {a : Type}, Arg inst_a a -> list a := fun {a : Type} => fun t => GHC.Base.build' (fun _ => (fun c n => Foldable__Arg_foldr c n t)). +#[global] Program Instance Foldable__Arg {a : Type} : Data.Foldable.Foldable (Arg a) := fun _ k__ => k__ {| Data.Foldable.fold__ := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Arg_fold ; Data.Foldable.foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => Foldable__Arg_foldMap ; + Data.Foldable.foldMap'__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__Arg_foldMap' ; Data.Foldable.foldl__ := fun {b : Type} {a : Type} => Foldable__Arg_foldl ; Data.Foldable.foldl'__ := fun {b : Type} {a : Type} => Foldable__Arg_foldl' ; Data.Foldable.foldr__ := fun {a : Type} {b : Type} => Foldable__Arg_foldr ; @@ -1150,7 +732,7 @@ Program Instance Foldable__Arg {a : Type} : Data.Foldable.Foldable (Arg a) := Data.Foldable.sum__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__Arg_sum ; Data.Foldable.toList__ := fun {a : Type} => Foldable__Arg_toList |}. -Local Definition Traversable__Arg_traverse {inst_a : Type} +#[local] Definition Traversable__Arg_traverse {inst_a : Type} : forall {f : Type -> Type}, forall {a : Type}, forall {b : Type}, @@ -1162,7 +744,7 @@ Local Definition Traversable__Arg_traverse {inst_a : Type} | f, Mk_Arg x a => Mk_Arg x Data.Functor.<$> f a end. -Local Definition Traversable__Arg_mapM {inst_a : Type} +#[local] Definition Traversable__Arg_mapM {inst_a : Type} : forall {m : Type -> Type}, forall {a : Type}, forall {b : Type}, @@ -1170,20 +752,21 @@ Local Definition Traversable__Arg_mapM {inst_a : Type} fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => Traversable__Arg_traverse. -Local Definition Traversable__Arg_sequenceA {inst_a : Type} +#[local] Definition Traversable__Arg_sequenceA {inst_a : Type} : forall {f : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Applicative f}, Arg inst_a (f a) -> f (Arg inst_a a) := fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => Traversable__Arg_traverse GHC.Base.id. -Local Definition Traversable__Arg_sequence {inst_a : Type} +#[local] Definition Traversable__Arg_sequence {inst_a : Type} : forall {m : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Monad m}, Arg inst_a (m a) -> m (Arg inst_a a) := fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => Traversable__Arg_sequenceA. +#[global] Program Instance Traversable__Arg {a : Type} : Data.Traversable.Traversable (Arg a) := fun _ k__ => @@ -1206,7 +789,7 @@ Program Instance Traversable__Arg {a : Type} `{GHC.Base.Applicative f} => Traversable__Arg_traverse |}. -Local Definition Eq___Arg_op_zeze__ {inst_a : Type} {inst_b : Type} +#[local] Definition Eq___Arg_op_zeze__ {inst_a : Type} {inst_b : Type} `{GHC.Base.Eq_ inst_a} : Arg inst_a inst_b -> Arg inst_a inst_b -> bool := fun arg_0__ arg_1__ => @@ -1214,11 +797,12 @@ Local Definition Eq___Arg_op_zeze__ {inst_a : Type} {inst_b : Type} | Mk_Arg a _, Mk_Arg b _ => a GHC.Base.== b end. -Local Definition Eq___Arg_op_zsze__ {inst_a : Type} {inst_b : Type} +#[local] Definition Eq___Arg_op_zsze__ {inst_a : Type} {inst_b : Type} `{GHC.Base.Eq_ inst_a} : Arg inst_a inst_b -> Arg inst_a inst_b -> bool := fun x y => negb (Eq___Arg_op_zeze__ x y). +#[global] Program Instance Eq___Arg {a : Type} {b : Type} `{GHC.Base.Eq_ a} : GHC.Base.Eq_ (Arg a b) := fun _ k__ => @@ -1227,7 +811,7 @@ Program Instance Eq___Arg {a : Type} {b : Type} `{GHC.Base.Eq_ a} (* Skipping instance `Data.Semigroup.Ord__Arg' of class `GHC.Base.Ord' *) -Local Definition Bifunctor__Arg_bimap +#[local] Definition Bifunctor__Arg_bimap : forall {a : Type}, forall {b : Type}, forall {c : Type}, @@ -1238,17 +822,18 @@ Local Definition Bifunctor__Arg_bimap | f, g, Mk_Arg a b => Mk_Arg (f a) (g b) end. -Local Definition Bifunctor__Arg_first +#[local] Definition Bifunctor__Arg_first : forall {a : Type}, forall {b : Type}, forall {c : Type}, (a -> b) -> Arg a c -> Arg b c := fun {a : Type} {b : Type} {c : Type} => fun f => Bifunctor__Arg_bimap f GHC.Base.id. -Local Definition Bifunctor__Arg_second +#[local] Definition Bifunctor__Arg_second : forall {b : Type}, forall {c : Type}, forall {a : Type}, (b -> c) -> Arg a b -> Arg a c := fun {b : Type} {c : Type} {a : Type} => Bifunctor__Arg_bimap GHC.Base.id. +#[global] Program Instance Bifunctor__Arg : Data.Bifunctor.Bifunctor Arg := fun _ k__ => k__ {| Data.Bifunctor.bimap__ := fun {a : Type} @@ -1261,7 +846,7 @@ Program Instance Bifunctor__Arg : Data.Bifunctor.Bifunctor Arg := Data.Bifunctor.second__ := fun {b : Type} {c : Type} {a : Type} => Bifunctor__Arg_second |}. -Local Definition Bifoldable__Arg_bifoldMap +#[local] Definition Bifoldable__Arg_bifoldMap : forall {m : Type}, forall {a : Type}, forall {b : Type}, @@ -1272,12 +857,12 @@ Local Definition Bifoldable__Arg_bifoldMap | f, g, Mk_Arg a b => f a GHC.Base.<<>> g b end. -Local Definition Bifoldable__Arg_bifold +#[local] Definition Bifoldable__Arg_bifold : forall {m : Type}, forall `{GHC.Base.Monoid m}, Arg m m -> m := fun {m : Type} `{GHC.Base.Monoid m} => Bifoldable__Arg_bifoldMap GHC.Base.id GHC.Base.id. -Local Definition Bifoldable__Arg_bifoldl +#[local] Definition Bifoldable__Arg_bifoldl : forall {c : Type}, forall {a : Type}, forall {b : Type}, (c -> a -> c) -> (c -> b -> c) -> c -> Arg a b -> c := @@ -1292,7 +877,7 @@ Local Definition Bifoldable__Arg_bifoldl GHC.Base.∘ GHC.Base.flip g)) t)) z. -Local Definition Bifoldable__Arg_bifoldr +#[local] Definition Bifoldable__Arg_bifoldr : forall {a : Type}, forall {c : Type}, forall {b : Type}, (a -> c -> c) -> (b -> c -> c) -> c -> Arg a b -> c := @@ -1302,6 +887,7 @@ Local Definition Bifoldable__Arg_bifoldr (Coq.Program.Basics.compose Data.SemigroupInternal.Mk_Endo f) (Coq.Program.Basics.compose Data.SemigroupInternal.Mk_Endo g) t) z. +#[global] Program Instance Bifoldable__Arg : Data.Bifoldable.Bifoldable Arg := fun _ k__ => k__ {| Data.Bifoldable.bifold__ := fun {m : Type} `{GHC.Base.Monoid m} => @@ -1316,7 +902,7 @@ Program Instance Bifoldable__Arg : Data.Bifoldable.Bifoldable Arg := Data.Bifoldable.bifoldr__ := fun {a : Type} {c : Type} {b : Type} => Bifoldable__Arg_bifoldr |}. -Local Definition Bitraversable__Arg_bitraverse +#[local] Definition Bitraversable__Arg_bitraverse : forall {f : Type -> Type}, forall {a : Type}, forall {c : Type}, @@ -1335,6 +921,7 @@ Local Definition Bitraversable__Arg_bitraverse | f, g, Mk_Arg a b => (Mk_Arg Data.Functor.<$> f a) GHC.Base.<*> g b end. +#[global] Program Instance Bitraversable__Arg : Data.Bitraversable.Bitraversable Arg := fun _ k__ => k__ {| Data.Bitraversable.bitraverse__ := fun {f : Type -> Type} @@ -1348,15 +935,16 @@ Program Instance Bitraversable__Arg : Data.Bitraversable.Bitraversable Arg := (* Skipping all instances of class `GHC.Enum.Enum', including `Data.Semigroup.Enum__First' *) -Local Definition Semigroup__First_op_zlzlzgzg__ {inst_a : Type} +#[local] Definition Semigroup__First_op_zlzlzgzg__ {inst_a : Type} : First inst_a -> First inst_a -> First inst_a := fun arg_0__ arg_1__ => match arg_0__, arg_1__ with | a, _ => a end. +#[global] Program Instance Semigroup__First {a : Type} : GHC.Base.Semigroup (First a) := fun _ k__ => k__ {| GHC.Base.op_zlzlzgzg____ := Semigroup__First_op_zlzlzgzg__ |}. -Local Definition Functor__First_fmap +#[local] Definition Functor__First_fmap : forall {a : Type}, forall {b : Type}, (a -> b) -> First a -> First b := fun {a : Type} {b : Type} => fun arg_0__ arg_1__ => @@ -1364,55 +952,63 @@ Local Definition Functor__First_fmap | f, Mk_First x => Mk_First (f x) end. -Local Definition Functor__First_op_zlzd__ +#[local] Definition Functor__First_op_zlzd__ : forall {a : Type}, forall {b : Type}, a -> First b -> First a := fun {a : Type} {b : Type} => Functor__First_fmap GHC.Base.∘ GHC.Base.const. +#[global] Program Instance Functor__First : GHC.Base.Functor First := fun _ k__ => k__ {| GHC.Base.fmap__ := fun {a : Type} {b : Type} => Functor__First_fmap ; GHC.Base.op_zlzd____ := fun {a : Type} {b : Type} => Functor__First_op_zlzd__ |}. -Local Definition Foldable__First_foldMap +#[local] Definition Foldable__First_foldMap : forall {m : Type}, forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> First a -> m := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => fun arg_0__ arg_1__ => match arg_0__, arg_1__ with | f, Mk_First a => f a end. -Local Definition Foldable__First_fold +#[local] Definition Foldable__First_fold : forall {m : Type}, forall `{GHC.Base.Monoid m}, First m -> m := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__First_foldMap GHC.Base.id. -Local Definition Foldable__First_foldl - : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> First a -> b := - fun {b : Type} {a : Type} => - fun f z t => - Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual - (Foldable__First_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ - (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ - GHC.Base.flip f)) t)) z. - -Local Definition Foldable__First_foldr +#[local] Definition Foldable__First_foldr : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> First a -> b := fun {a : Type} {b : Type} => fun f z t => Data.SemigroupInternal.appEndo (Foldable__First_foldMap (Coq.Program.Basics.compose Data.SemigroupInternal.Mk_Endo f) t) z. -Local Definition Foldable__First_foldl' +#[local] Definition Foldable__First_foldl' : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> First a -> b := fun {b : Type} {a : Type} => fun f z0 xs => let f' := fun x k z => k (f z x) in Foldable__First_foldr f' GHC.Base.id xs z0. -Local Definition Foldable__First_foldr' +#[local] Definition Foldable__First_foldMap' + : forall {m : Type}, + forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> First a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun f => + Foldable__First_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. + +#[local] Definition Foldable__First_foldl + : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> First a -> b := + fun {b : Type} {a : Type} => + fun f z t => + Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual + (Foldable__First_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ + (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ + GHC.Base.flip f)) t)) z. + +#[local] Definition Foldable__First_foldr' : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> First a -> b := fun {a : Type} {b : Type} => fun f z0 xs => let f' := fun k x z => k (f x z) in Foldable__First_foldl f' GHC.Base.id xs z0. -Local Definition Foldable__First_length +#[local] Definition Foldable__First_length : forall {a : Type}, First a -> GHC.Num.Int := fun {a : Type} => Foldable__First_foldl' (fun arg_0__ arg_1__ => @@ -1420,32 +1016,35 @@ Local Definition Foldable__First_length | c, _ => c GHC.Num.+ #1 end) #0. -Local Definition Foldable__First_null : forall {a : Type}, First a -> bool := +#[local] Definition Foldable__First_null : forall {a : Type}, First a -> bool := fun {a : Type} => Foldable__First_foldr (fun arg_0__ arg_1__ => false) true. -Local Definition Foldable__First_product +#[local] Definition Foldable__First_product : forall {a : Type}, forall `{GHC.Num.Num a}, First a -> a := fun {a : Type} `{GHC.Num.Num a} => Coq.Program.Basics.compose Data.SemigroupInternal.getProduct (Foldable__First_foldMap Data.SemigroupInternal.Mk_Product). -Local Definition Foldable__First_sum +#[local] Definition Foldable__First_sum : forall {a : Type}, forall `{GHC.Num.Num a}, First a -> a := fun {a : Type} `{GHC.Num.Num a} => Coq.Program.Basics.compose Data.SemigroupInternal.getSum (Foldable__First_foldMap Data.SemigroupInternal.Mk_Sum). -Local Definition Foldable__First_toList +#[local] Definition Foldable__First_toList : forall {a : Type}, First a -> list a := fun {a : Type} => fun t => GHC.Base.build' (fun _ => (fun c n => Foldable__First_foldr c n t)). +#[global] Program Instance Foldable__First : Data.Foldable.Foldable First := fun _ k__ => k__ {| Data.Foldable.fold__ := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__First_fold ; Data.Foldable.foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => Foldable__First_foldMap ; + Data.Foldable.foldMap'__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__First_foldMap' ; Data.Foldable.foldl__ := fun {b : Type} {a : Type} => Foldable__First_foldl ; Data.Foldable.foldl'__ := fun {b : Type} {a : Type} => Foldable__First_foldl' ; Data.Foldable.foldr__ := fun {a : Type} {b : Type} => Foldable__First_foldr ; @@ -1457,7 +1056,7 @@ Program Instance Foldable__First : Data.Foldable.Foldable First := Data.Foldable.sum__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__First_sum ; Data.Foldable.toList__ := fun {a : Type} => Foldable__First_toList |}. -Local Definition Traversable__First_traverse +#[local] Definition Traversable__First_traverse : forall {f : Type -> Type}, forall {a : Type}, forall {b : Type}, @@ -1468,7 +1067,7 @@ Local Definition Traversable__First_traverse | f, Mk_First a => Mk_First Data.Functor.<$> f a end. -Local Definition Traversable__First_mapM +#[local] Definition Traversable__First_mapM : forall {m : Type -> Type}, forall {a : Type}, forall {b : Type}, @@ -1476,19 +1075,20 @@ Local Definition Traversable__First_mapM fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => Traversable__First_traverse. -Local Definition Traversable__First_sequenceA +#[local] Definition Traversable__First_sequenceA : forall {f : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Applicative f}, First (f a) -> f (First a) := fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => Traversable__First_traverse GHC.Base.id. -Local Definition Traversable__First_sequence +#[local] Definition Traversable__First_sequence : forall {m : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Monad m}, First (m a) -> m (First a) := fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => Traversable__First_sequenceA. +#[global] Program Instance Traversable__First : Data.Traversable.Traversable First := fun _ k__ => k__ {| Data.Traversable.mapM__ := fun {m : Type -> Type} @@ -1510,24 +1110,25 @@ Program Instance Traversable__First : Data.Traversable.Traversable First := `{GHC.Base.Applicative f} => Traversable__First_traverse |}. -Local Definition Applicative__First_liftA2 +#[local] Definition Applicative__First_liftA2 : forall {a : Type}, forall {b : Type}, forall {c : Type}, (a -> b -> c) -> First a -> First b -> First c := fun {a : Type} {b : Type} {c : Type} => GHC.Prim.coerce. -Local Definition Applicative__First_op_zlztzg__ +#[local] Definition Applicative__First_op_zlztzg__ : forall {a : Type}, forall {b : Type}, First (a -> b) -> First a -> First b := fun {a : Type} {b : Type} => GHC.Prim.coerce. -Local Definition Applicative__First_op_ztzg__ +#[local] Definition Applicative__First_op_ztzg__ : forall {a : Type}, forall {b : Type}, First a -> First b -> First b := fun {a : Type} {b : Type} => fun arg_0__ arg_1__ => match arg_0__, arg_1__ with | _, a => a end. -Local Definition Applicative__First_pure : forall {a : Type}, a -> First a := +#[local] Definition Applicative__First_pure : forall {a : Type}, a -> First a := fun {a : Type} => fun x => Mk_First x. +#[global] Program Instance Applicative__First : GHC.Base.Applicative First := fun _ k__ => k__ {| GHC.Base.liftA2__ := fun {a : Type} {b : Type} {c : Type} => @@ -1538,18 +1139,19 @@ Program Instance Applicative__First : GHC.Base.Applicative First := Applicative__First_op_ztzg__ ; GHC.Base.pure__ := fun {a : Type} => Applicative__First_pure |}. -Local Definition Monad__First_op_zgzg__ +#[local] Definition Monad__First_op_zgzg__ : forall {a : Type}, forall {b : Type}, First a -> First b -> First b := fun {a : Type} {b : Type} => _GHC.Base.*>_. -Local Definition Monad__First_op_zgzgze__ +#[local] Definition Monad__First_op_zgzgze__ : forall {a : Type}, forall {b : Type}, First a -> (a -> First b) -> First b := fun {a : Type} {b : Type} => fun arg_0__ arg_1__ => match arg_0__, arg_1__ with | Mk_First a, f => f a end. -Local Definition Monad__First_return_ : forall {a : Type}, a -> First a := +#[local] Definition Monad__First_return_ : forall {a : Type}, a -> First a := fun {a : Type} => GHC.Base.pure. +#[global] Program Instance Monad__First : GHC.Base.Monad First := fun _ k__ => k__ {| GHC.Base.op_zgzg____ := fun {a : Type} {b : Type} => @@ -1564,15 +1166,16 @@ Program Instance Monad__First : GHC.Base.Monad First := (* Skipping all instances of class `GHC.Enum.Enum', including `Data.Semigroup.Enum__Last' *) -Local Definition Semigroup__Last_op_zlzlzgzg__ {inst_a : Type} +#[local] Definition Semigroup__Last_op_zlzlzgzg__ {inst_a : Type} : Last inst_a -> Last inst_a -> Last inst_a := fun arg_0__ arg_1__ => match arg_0__, arg_1__ with | _, b => b end. +#[global] Program Instance Semigroup__Last {a : Type} : GHC.Base.Semigroup (Last a) := fun _ k__ => k__ {| GHC.Base.op_zlzlzgzg____ := Semigroup__Last_op_zlzlzgzg__ |}. -Local Definition Functor__Last_fmap +#[local] Definition Functor__Last_fmap : forall {a : Type}, forall {b : Type}, (a -> b) -> Last a -> Last b := fun {a : Type} {b : Type} => fun arg_0__ arg_1__ => @@ -1580,55 +1183,63 @@ Local Definition Functor__Last_fmap | f, Mk_Last x => Mk_Last (f x) end. -Local Definition Functor__Last_op_zlzd__ +#[local] Definition Functor__Last_op_zlzd__ : forall {a : Type}, forall {b : Type}, a -> Last b -> Last a := fun {a : Type} {b : Type} => fun arg_0__ arg_1__ => match arg_0__, arg_1__ with | a, _ => Mk_Last a end. +#[global] Program Instance Functor__Last : GHC.Base.Functor Last := fun _ k__ => k__ {| GHC.Base.fmap__ := fun {a : Type} {b : Type} => Functor__Last_fmap ; GHC.Base.op_zlzd____ := fun {a : Type} {b : Type} => Functor__Last_op_zlzd__ |}. -Local Definition Foldable__Last_foldMap +#[local] Definition Foldable__Last_foldMap : forall {m : Type}, forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> Last a -> m := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => fun arg_0__ arg_1__ => match arg_0__, arg_1__ with | f, Mk_Last a => f a end. -Local Definition Foldable__Last_fold +#[local] Definition Foldable__Last_fold : forall {m : Type}, forall `{GHC.Base.Monoid m}, Last m -> m := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Last_foldMap GHC.Base.id. -Local Definition Foldable__Last_foldl - : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> Last a -> b := - fun {b : Type} {a : Type} => - fun f z t => - Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual - (Foldable__Last_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ - (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ - GHC.Base.flip f)) t)) z. - -Local Definition Foldable__Last_foldr +#[local] Definition Foldable__Last_foldr : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> Last a -> b := fun {a : Type} {b : Type} => fun f z t => Data.SemigroupInternal.appEndo (Foldable__Last_foldMap (Coq.Program.Basics.compose Data.SemigroupInternal.Mk_Endo f) t) z. -Local Definition Foldable__Last_foldl' +#[local] Definition Foldable__Last_foldl' : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> Last a -> b := fun {b : Type} {a : Type} => fun f z0 xs => let f' := fun x k z => k (f z x) in Foldable__Last_foldr f' GHC.Base.id xs z0. -Local Definition Foldable__Last_foldr' +#[local] Definition Foldable__Last_foldMap' + : forall {m : Type}, + forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> Last a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun f => + Foldable__Last_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. + +#[local] Definition Foldable__Last_foldl + : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> Last a -> b := + fun {b : Type} {a : Type} => + fun f z t => + Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual + (Foldable__Last_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ + (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ + GHC.Base.flip f)) t)) z. + +#[local] Definition Foldable__Last_foldr' : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> Last a -> b := fun {a : Type} {b : Type} => fun f z0 xs => let f' := fun k x z => k (f x z) in Foldable__Last_foldl f' GHC.Base.id xs z0. -Local Definition Foldable__Last_length +#[local] Definition Foldable__Last_length : forall {a : Type}, Last a -> GHC.Num.Int := fun {a : Type} => Foldable__Last_foldl' (fun arg_0__ arg_1__ => @@ -1636,31 +1247,35 @@ Local Definition Foldable__Last_length | c, _ => c GHC.Num.+ #1 end) #0. -Local Definition Foldable__Last_null : forall {a : Type}, Last a -> bool := +#[local] Definition Foldable__Last_null : forall {a : Type}, Last a -> bool := fun {a : Type} => Foldable__Last_foldr (fun arg_0__ arg_1__ => false) true. -Local Definition Foldable__Last_product +#[local] Definition Foldable__Last_product : forall {a : Type}, forall `{GHC.Num.Num a}, Last a -> a := fun {a : Type} `{GHC.Num.Num a} => Coq.Program.Basics.compose Data.SemigroupInternal.getProduct (Foldable__Last_foldMap Data.SemigroupInternal.Mk_Product). -Local Definition Foldable__Last_sum +#[local] Definition Foldable__Last_sum : forall {a : Type}, forall `{GHC.Num.Num a}, Last a -> a := fun {a : Type} `{GHC.Num.Num a} => Coq.Program.Basics.compose Data.SemigroupInternal.getSum (Foldable__Last_foldMap Data.SemigroupInternal.Mk_Sum). -Local Definition Foldable__Last_toList : forall {a : Type}, Last a -> list a := +#[local] Definition Foldable__Last_toList + : forall {a : Type}, Last a -> list a := fun {a : Type} => fun t => GHC.Base.build' (fun _ => (fun c n => Foldable__Last_foldr c n t)). +#[global] Program Instance Foldable__Last : Data.Foldable.Foldable Last := fun _ k__ => k__ {| Data.Foldable.fold__ := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Last_fold ; Data.Foldable.foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => Foldable__Last_foldMap ; + Data.Foldable.foldMap'__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__Last_foldMap' ; Data.Foldable.foldl__ := fun {b : Type} {a : Type} => Foldable__Last_foldl ; Data.Foldable.foldl'__ := fun {b : Type} {a : Type} => Foldable__Last_foldl' ; Data.Foldable.foldr__ := fun {a : Type} {b : Type} => Foldable__Last_foldr ; @@ -1672,7 +1287,7 @@ Program Instance Foldable__Last : Data.Foldable.Foldable Last := Data.Foldable.sum__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__Last_sum ; Data.Foldable.toList__ := fun {a : Type} => Foldable__Last_toList |}. -Local Definition Traversable__Last_traverse +#[local] Definition Traversable__Last_traverse : forall {f : Type -> Type}, forall {a : Type}, forall {b : Type}, @@ -1683,7 +1298,7 @@ Local Definition Traversable__Last_traverse | f, Mk_Last a => Mk_Last Data.Functor.<$> f a end. -Local Definition Traversable__Last_mapM +#[local] Definition Traversable__Last_mapM : forall {m : Type -> Type}, forall {a : Type}, forall {b : Type}, @@ -1691,18 +1306,19 @@ Local Definition Traversable__Last_mapM fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => Traversable__Last_traverse. -Local Definition Traversable__Last_sequenceA +#[local] Definition Traversable__Last_sequenceA : forall {f : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Applicative f}, Last (f a) -> f (Last a) := fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => Traversable__Last_traverse GHC.Base.id. -Local Definition Traversable__Last_sequence +#[local] Definition Traversable__Last_sequence : forall {m : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Monad m}, Last (m a) -> m (Last a) := fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => Traversable__Last_sequenceA. +#[global] Program Instance Traversable__Last : Data.Traversable.Traversable Last := fun _ k__ => k__ {| Data.Traversable.mapM__ := fun {m : Type -> Type} @@ -1724,24 +1340,25 @@ Program Instance Traversable__Last : Data.Traversable.Traversable Last := `{GHC.Base.Applicative f} => Traversable__Last_traverse |}. -Local Definition Applicative__Last_liftA2 +#[local] Definition Applicative__Last_liftA2 : forall {a : Type}, forall {b : Type}, forall {c : Type}, (a -> b -> c) -> Last a -> Last b -> Last c := fun {a : Type} {b : Type} {c : Type} => GHC.Prim.coerce. -Local Definition Applicative__Last_op_zlztzg__ +#[local] Definition Applicative__Last_op_zlztzg__ : forall {a : Type}, forall {b : Type}, Last (a -> b) -> Last a -> Last b := fun {a : Type} {b : Type} => GHC.Prim.coerce. -Local Definition Applicative__Last_op_ztzg__ +#[local] Definition Applicative__Last_op_ztzg__ : forall {a : Type}, forall {b : Type}, Last a -> Last b -> Last b := fun {a : Type} {b : Type} => fun arg_0__ arg_1__ => match arg_0__, arg_1__ with | _, a => a end. -Local Definition Applicative__Last_pure : forall {a : Type}, a -> Last a := +#[local] Definition Applicative__Last_pure : forall {a : Type}, a -> Last a := fun {a : Type} => Mk_Last. +#[global] Program Instance Applicative__Last : GHC.Base.Applicative Last := fun _ k__ => k__ {| GHC.Base.liftA2__ := fun {a : Type} {b : Type} {c : Type} => @@ -1752,18 +1369,19 @@ Program Instance Applicative__Last : GHC.Base.Applicative Last := Applicative__Last_op_ztzg__ ; GHC.Base.pure__ := fun {a : Type} => Applicative__Last_pure |}. -Local Definition Monad__Last_op_zgzg__ +#[local] Definition Monad__Last_op_zgzg__ : forall {a : Type}, forall {b : Type}, Last a -> Last b -> Last b := fun {a : Type} {b : Type} => _GHC.Base.*>_. -Local Definition Monad__Last_op_zgzgze__ +#[local] Definition Monad__Last_op_zgzgze__ : forall {a : Type}, forall {b : Type}, Last a -> (a -> Last b) -> Last b := fun {a : Type} {b : Type} => fun arg_0__ arg_1__ => match arg_0__, arg_1__ with | Mk_Last a, f => f a end. -Local Definition Monad__Last_return_ : forall {a : Type}, a -> Last a := +#[local] Definition Monad__Last_return_ : forall {a : Type}, a -> Last a := fun {a : Type} => GHC.Base.pure. +#[global] Program Instance Monad__Last : GHC.Base.Monad Last := fun _ k__ => k__ {| GHC.Base.op_zgzg____ := fun {a : Type} {b : Type} => @@ -1774,31 +1392,33 @@ Program Instance Monad__Last : GHC.Base.Monad Last := (* Skipping all instances of class `Control.Monad.Fix.MonadFix', including `Data.Semigroup.MonadFix__Last' *) -Local Definition Semigroup__WrappedMonoid_op_zlzlzgzg__ {inst_m : Type} +#[local] Definition Semigroup__WrappedMonoid_op_zlzlzgzg__ {inst_m : Type} `{GHC.Base.Monoid inst_m} : WrappedMonoid inst_m -> WrappedMonoid inst_m -> WrappedMonoid inst_m := GHC.Prim.coerce (GHC.Base.mappend : inst_m -> inst_m -> inst_m). +#[global] Program Instance Semigroup__WrappedMonoid {m : Type} `{GHC.Base.Monoid m} : GHC.Base.Semigroup (WrappedMonoid m) := fun _ k__ => k__ {| GHC.Base.op_zlzlzgzg____ := Semigroup__WrappedMonoid_op_zlzlzgzg__ |}. -Local Definition Monoid__WrappedMonoid_mappend {inst_m : Type} `{GHC.Base.Monoid - inst_m} +#[local] Definition Monoid__WrappedMonoid_mappend {inst_m : Type} + `{GHC.Base.Monoid inst_m} : WrappedMonoid inst_m -> WrappedMonoid inst_m -> WrappedMonoid inst_m := _GHC.Base.<<>>_. -Local Definition Monoid__WrappedMonoid_mempty {inst_m : Type} `{GHC.Base.Monoid - inst_m} +#[local] Definition Monoid__WrappedMonoid_mempty {inst_m : Type} + `{GHC.Base.Monoid inst_m} : WrappedMonoid inst_m := WrapMonoid GHC.Base.mempty. -Local Definition Monoid__WrappedMonoid_mconcat {inst_m : Type} `{GHC.Base.Monoid - inst_m} +#[local] Definition Monoid__WrappedMonoid_mconcat {inst_m : Type} + `{GHC.Base.Monoid inst_m} : list (WrappedMonoid inst_m) -> WrappedMonoid inst_m := GHC.Base.foldr Monoid__WrappedMonoid_mappend Monoid__WrappedMonoid_mempty. +#[global] Program Instance Monoid__WrappedMonoid {m : Type} `{GHC.Base.Monoid m} : GHC.Base.Monoid (WrappedMonoid m) := fun _ k__ => @@ -1809,7 +1429,7 @@ Program Instance Monoid__WrappedMonoid {m : Type} `{GHC.Base.Monoid m} (* Skipping all instances of class `GHC.Enum.Enum', including `Data.Semigroup.Enum__WrappedMonoid' *) -Local Definition Functor__Option_fmap +#[local] Definition Functor__Option_fmap : forall {a : Type}, forall {b : Type}, (a -> b) -> Option a -> Option b := fun {a : Type} {b : Type} => fun arg_0__ arg_1__ => @@ -1817,17 +1437,18 @@ Local Definition Functor__Option_fmap | f, Mk_Option a => Mk_Option (GHC.Base.fmap f a) end. -Local Definition Functor__Option_op_zlzd__ +#[local] Definition Functor__Option_op_zlzd__ : forall {a : Type}, forall {b : Type}, a -> Option b -> Option a := fun {a : Type} {b : Type} => Functor__Option_fmap GHC.Base.∘ GHC.Base.const. +#[global] Program Instance Functor__Option : GHC.Base.Functor Option := fun _ k__ => k__ {| GHC.Base.fmap__ := fun {a : Type} {b : Type} => Functor__Option_fmap ; GHC.Base.op_zlzd____ := fun {a : Type} {b : Type} => Functor__Option_op_zlzd__ |}. -Local Definition Applicative__Option_liftA2 +#[local] Definition Applicative__Option_liftA2 : forall {a : Type}, forall {b : Type}, forall {c : Type}, (a -> b -> c) -> Option a -> Option b -> Option c := @@ -1837,7 +1458,7 @@ Local Definition Applicative__Option_liftA2 | f, Mk_Option x, Mk_Option y => Mk_Option (GHC.Base.liftA2 f x y) end. -Local Definition Applicative__Option_op_zlztzg__ +#[local] Definition Applicative__Option_op_zlztzg__ : forall {a : Type}, forall {b : Type}, Option (a -> b) -> Option a -> Option b := fun {a : Type} {b : Type} => @@ -1846,7 +1467,7 @@ Local Definition Applicative__Option_op_zlztzg__ | Mk_Option a, Mk_Option b => Mk_Option (a GHC.Base.<*> b) end. -Local Definition Applicative__Option_op_ztzg__ +#[local] Definition Applicative__Option_op_ztzg__ : forall {a : Type}, forall {b : Type}, Option a -> Option b -> Option b := fun {a : Type} {b : Type} => fun arg_0__ arg_1__ => @@ -1855,9 +1476,11 @@ Local Definition Applicative__Option_op_ztzg__ | _, b => b end. -Local Definition Applicative__Option_pure : forall {a : Type}, a -> Option a := +#[local] Definition Applicative__Option_pure + : forall {a : Type}, a -> Option a := fun {a : Type} => fun a => Mk_Option (Some a). +#[global] Program Instance Applicative__Option : GHC.Base.Applicative Option := fun _ k__ => k__ {| GHC.Base.liftA2__ := fun {a : Type} {b : Type} {c : Type} => @@ -1868,11 +1491,11 @@ Program Instance Applicative__Option : GHC.Base.Applicative Option := Applicative__Option_op_ztzg__ ; GHC.Base.pure__ := fun {a : Type} => Applicative__Option_pure |}. -Local Definition Monad__Option_op_zgzg__ +#[local] Definition Monad__Option_op_zgzg__ : forall {a : Type}, forall {b : Type}, Option a -> Option b -> Option b := fun {a : Type} {b : Type} => _GHC.Base.*>_. -Local Definition Monad__Option_op_zgzgze__ +#[local] Definition Monad__Option_op_zgzgze__ : forall {a : Type}, forall {b : Type}, Option a -> (a -> Option b) -> Option b := fun {a : Type} {b : Type} => @@ -1882,9 +1505,10 @@ Local Definition Monad__Option_op_zgzgze__ | _, _ => Mk_Option None end. -Local Definition Monad__Option_return_ : forall {a : Type}, a -> Option a := +#[local] Definition Monad__Option_return_ : forall {a : Type}, a -> Option a := fun {a : Type} => GHC.Base.pure. +#[global] Program Instance Monad__Option : GHC.Base.Monad Option := fun _ k__ => k__ {| GHC.Base.op_zgzg____ := fun {a : Type} {b : Type} => @@ -1902,7 +1526,7 @@ Program Instance Monad__Option : GHC.Base.Monad Option := (* Skipping all instances of class `Control.Monad.Fix.MonadFix', including `Data.Semigroup.MonadFix__Option' *) -Local Definition Foldable__Option_foldMap +#[local] Definition Foldable__Option_foldMap : forall {m : Type}, forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> Option a -> m := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => @@ -1912,39 +1536,46 @@ Local Definition Foldable__Option_foldMap | _, Mk_Option None => GHC.Base.mempty end. -Local Definition Foldable__Option_fold +#[local] Definition Foldable__Option_fold : forall {m : Type}, forall `{GHC.Base.Monoid m}, Option m -> m := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Option_foldMap GHC.Base.id. -Local Definition Foldable__Option_foldl - : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> Option a -> b := - fun {b : Type} {a : Type} => - fun f z t => - Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual - (Foldable__Option_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ - (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ - GHC.Base.flip f)) t)) z. - -Local Definition Foldable__Option_foldr +#[local] Definition Foldable__Option_foldr : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> Option a -> b := fun {a : Type} {b : Type} => fun f z t => Data.SemigroupInternal.appEndo (Foldable__Option_foldMap (Coq.Program.Basics.compose Data.SemigroupInternal.Mk_Endo f) t) z. -Local Definition Foldable__Option_foldl' +#[local] Definition Foldable__Option_foldl' : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> Option a -> b := fun {b : Type} {a : Type} => fun f z0 xs => let f' := fun x k z => k (f z x) in Foldable__Option_foldr f' GHC.Base.id xs z0. -Local Definition Foldable__Option_foldr' +#[local] Definition Foldable__Option_foldMap' + : forall {m : Type}, + forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> Option a -> m := + fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + fun f => + Foldable__Option_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. + +#[local] Definition Foldable__Option_foldl + : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> Option a -> b := + fun {b : Type} {a : Type} => + fun f z t => + Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual + (Foldable__Option_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ + (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ + GHC.Base.flip f)) t)) z. + +#[local] Definition Foldable__Option_foldr' : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> Option a -> b := fun {a : Type} {b : Type} => fun f z0 xs => let f' := fun k x z => k (f x z) in Foldable__Option_foldl f' GHC.Base.id xs z0. -Local Definition Foldable__Option_length +#[local] Definition Foldable__Option_length : forall {a : Type}, Option a -> GHC.Num.Int := fun {a : Type} => Foldable__Option_foldl' (fun arg_0__ arg_1__ => @@ -1952,32 +1583,36 @@ Local Definition Foldable__Option_length | c, _ => c GHC.Num.+ #1 end) #0. -Local Definition Foldable__Option_null : forall {a : Type}, Option a -> bool := +#[local] Definition Foldable__Option_null + : forall {a : Type}, Option a -> bool := fun {a : Type} => Foldable__Option_foldr (fun arg_0__ arg_1__ => false) true. -Local Definition Foldable__Option_product +#[local] Definition Foldable__Option_product : forall {a : Type}, forall `{GHC.Num.Num a}, Option a -> a := fun {a : Type} `{GHC.Num.Num a} => Coq.Program.Basics.compose Data.SemigroupInternal.getProduct (Foldable__Option_foldMap Data.SemigroupInternal.Mk_Product). -Local Definition Foldable__Option_sum +#[local] Definition Foldable__Option_sum : forall {a : Type}, forall `{GHC.Num.Num a}, Option a -> a := fun {a : Type} `{GHC.Num.Num a} => Coq.Program.Basics.compose Data.SemigroupInternal.getSum (Foldable__Option_foldMap Data.SemigroupInternal.Mk_Sum). -Local Definition Foldable__Option_toList +#[local] Definition Foldable__Option_toList : forall {a : Type}, Option a -> list a := fun {a : Type} => fun t => GHC.Base.build' (fun _ => (fun c n => Foldable__Option_foldr c n t)). +#[global] Program Instance Foldable__Option : Data.Foldable.Foldable Option := fun _ k__ => k__ {| Data.Foldable.fold__ := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Option_fold ; Data.Foldable.foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => Foldable__Option_foldMap ; + Data.Foldable.foldMap'__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => + Foldable__Option_foldMap' ; Data.Foldable.foldl__ := fun {b : Type} {a : Type} => Foldable__Option_foldl ; Data.Foldable.foldl'__ := fun {b : Type} {a : Type} => Foldable__Option_foldl' ; Data.Foldable.foldr__ := fun {a : Type} {b : Type} => Foldable__Option_foldr ; @@ -1989,7 +1624,7 @@ Program Instance Foldable__Option : Data.Foldable.Foldable Option := Data.Foldable.sum__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__Option_sum ; Data.Foldable.toList__ := fun {a : Type} => Foldable__Option_toList |}. -Local Definition Traversable__Option_traverse +#[local] Definition Traversable__Option_traverse : forall {f : Type -> Type}, forall {a : Type}, forall {b : Type}, @@ -2001,7 +1636,7 @@ Local Definition Traversable__Option_traverse | _, Mk_Option None => GHC.Base.pure (Mk_Option None) end. -Local Definition Traversable__Option_mapM +#[local] Definition Traversable__Option_mapM : forall {m : Type -> Type}, forall {a : Type}, forall {b : Type}, @@ -2009,19 +1644,20 @@ Local Definition Traversable__Option_mapM fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => Traversable__Option_traverse. -Local Definition Traversable__Option_sequenceA +#[local] Definition Traversable__Option_sequenceA : forall {f : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Applicative f}, Option (f a) -> f (Option a) := fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => Traversable__Option_traverse GHC.Base.id. -Local Definition Traversable__Option_sequence +#[local] Definition Traversable__Option_sequence : forall {m : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Monad m}, Option (m a) -> m (Option a) := fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => Traversable__Option_sequenceA. +#[global] Program Instance Traversable__Option : Data.Traversable.Traversable Option := fun _ k__ => k__ {| Data.Traversable.mapM__ := fun {m : Type -> Type} @@ -2043,32 +1679,34 @@ Program Instance Traversable__Option : Data.Traversable.Traversable Option := `{GHC.Base.Applicative f} => Traversable__Option_traverse |}. -Local Definition Semigroup__Option_op_zlzlzgzg__ {inst_a : Type} +#[local] Definition Semigroup__Option_op_zlzlzgzg__ {inst_a : Type} `{GHC.Base.Semigroup inst_a} : Option inst_a -> Option inst_a -> Option inst_a := GHC.Prim.coerce (_GHC.Base.<<>>_ : option inst_a -> option inst_a -> option inst_a). +#[global] Program Instance Semigroup__Option {a : Type} `{GHC.Base.Semigroup a} : GHC.Base.Semigroup (Option a) := fun _ k__ => k__ {| GHC.Base.op_zlzlzgzg____ := Semigroup__Option_op_zlzlzgzg__ |}. -Local Definition Monoid__Option_mappend {inst_a : Type} `{GHC.Base.Semigroup +#[local] Definition Monoid__Option_mappend {inst_a : Type} `{GHC.Base.Semigroup inst_a} : Option inst_a -> Option inst_a -> Option inst_a := _GHC.Base.<<>>_. -Local Definition Monoid__Option_mempty {inst_a : Type} `{GHC.Base.Semigroup +#[local] Definition Monoid__Option_mempty {inst_a : Type} `{GHC.Base.Semigroup inst_a} : Option inst_a := Mk_Option None. -Local Definition Monoid__Option_mconcat {inst_a : Type} `{GHC.Base.Semigroup +#[local] Definition Monoid__Option_mconcat {inst_a : Type} `{GHC.Base.Semigroup inst_a} : list (Option inst_a) -> Option inst_a := GHC.Base.foldr Monoid__Option_mappend Monoid__Option_mempty. +#[global] Program Instance Monoid__Option {a : Type} `{GHC.Base.Semigroup a} : GHC.Base.Monoid (Option a) := fun _ k__ => @@ -2078,26 +1716,44 @@ Program Instance Monoid__Option {a : Type} `{GHC.Base.Semigroup a} (* Skipping definition `Data.Semigroup.cycle1' *) -Definition diff {m : Type} `{GHC.Base.Semigroup m} +#[global] Definition diff {m : Type} `{GHC.Base.Semigroup m} : m -> Data.SemigroupInternal.Endo m := Data.SemigroupInternal.Mk_Endo GHC.Base.∘ _GHC.Base.<<>>_. (* Skipping definition `Data.Semigroup.mtimesDefault' *) -Definition destruct_option {b : Type} {a : Type} +#[global] Definition destruct_option {b : Type} {a : Type} : b -> (a -> b) -> Option a -> b := fun arg_0__ arg_1__ arg_2__ => match arg_0__, arg_1__, arg_2__ with | n, j, Mk_Option m => Data.Maybe.maybe n j m end. +Instance Unpeel_Min a : HsToCoq.Unpeel.Unpeel (Min a) a := + HsToCoq.Unpeel.Build_Unpeel _ _ getMin Mk_Min. + +Instance Unpeel_Max a : HsToCoq.Unpeel.Unpeel (Max a) a := + HsToCoq.Unpeel.Build_Unpeel _ _ getMax Mk_Max. + +Instance Unpeel_First a : HsToCoq.Unpeel.Unpeel (First a) a := + HsToCoq.Unpeel.Build_Unpeel _ _ getFirst Mk_First. + +Instance Unpeel_Last a : HsToCoq.Unpeel.Unpeel (Last a) a := + HsToCoq.Unpeel.Build_Unpeel _ _ getLast Mk_Last. + +Instance Unpeel_WrappedMonoid a : HsToCoq.Unpeel.Unpeel (WrappedMonoid a) a := + HsToCoq.Unpeel.Build_Unpeel _ _ unwrapMonoid WrapMonoid. + +Instance Unpeel_Option a : HsToCoq.Unpeel.Unpeel (Option a) (option a) := + HsToCoq.Unpeel.Build_Unpeel _ _ getOption Mk_Option. + (* External variables: - None Some Type bool comparison false list negb option true - Coq.Program.Basics.compose Data.Bifoldable.Bifoldable - Data.Bifoldable.bifoldMap__ Data.Bifoldable.bifold__ Data.Bifoldable.bifoldl__ - Data.Bifoldable.bifoldr__ Data.Bifunctor.Bifunctor Data.Bifunctor.bimap__ - Data.Bifunctor.first__ Data.Bifunctor.second__ Data.Bitraversable.Bitraversable - Data.Bitraversable.bitraverse__ Data.Foldable.Foldable Data.Foldable.foldMap__ + None Some Type bool false list negb option true Coq.Program.Basics.compose + Data.Bifoldable.Bifoldable Data.Bifoldable.bifoldMap__ Data.Bifoldable.bifold__ + Data.Bifoldable.bifoldl__ Data.Bifoldable.bifoldr__ Data.Bifunctor.Bifunctor + Data.Bifunctor.bimap__ Data.Bifunctor.first__ Data.Bifunctor.second__ + Data.Bitraversable.Bitraversable Data.Bitraversable.bitraverse__ + Data.Foldable.Foldable Data.Foldable.foldMap'__ Data.Foldable.foldMap__ Data.Foldable.fold__ Data.Foldable.foldl'__ Data.Foldable.foldl__ Data.Foldable.foldr'__ Data.Foldable.foldr__ Data.Foldable.length__ Data.Foldable.null__ Data.Foldable.product__ Data.Foldable.sum__ @@ -2110,17 +1766,14 @@ Definition destruct_option {b : Type} {a : Type} Data.Traversable.mapM__ Data.Traversable.sequenceA__ Data.Traversable.sequence__ Data.Traversable.traverse__ GHC.Base.Applicative GHC.Base.Eq_ GHC.Base.Functor GHC.Base.Monad GHC.Base.Monoid GHC.Base.Ord GHC.Base.Semigroup GHC.Base.build' - GHC.Base.compare GHC.Base.compare__ GHC.Base.const GHC.Base.flip GHC.Base.fmap - GHC.Base.fmap__ GHC.Base.foldr GHC.Base.id GHC.Base.liftA2 GHC.Base.liftA2__ - GHC.Base.mappend GHC.Base.mappend__ GHC.Base.max GHC.Base.max__ - GHC.Base.mconcat__ GHC.Base.mempty GHC.Base.mempty__ GHC.Base.min GHC.Base.min__ - GHC.Base.op_z2218U__ GHC.Base.op_zeze__ GHC.Base.op_zeze____ GHC.Base.op_zg__ - GHC.Base.op_zg____ GHC.Base.op_zgze__ GHC.Base.op_zgze____ GHC.Base.op_zgzg____ - GHC.Base.op_zgzgze____ GHC.Base.op_zl__ GHC.Base.op_zl____ GHC.Base.op_zlzd____ - GHC.Base.op_zlze__ GHC.Base.op_zlze____ GHC.Base.op_zlzlzgzg__ - GHC.Base.op_zlzlzgzg____ GHC.Base.op_zlztzg__ GHC.Base.op_zlztzg____ - GHC.Base.op_zsze__ GHC.Base.op_zsze____ GHC.Base.op_ztzg__ GHC.Base.op_ztzg____ - GHC.Base.pure GHC.Base.pure__ GHC.Base.return___ GHC.Num.Int GHC.Num.Num - GHC.Num.fromInteger GHC.Num.op_zp__ GHC.Prim.coerce HsToCoq.Unpeel.Build_Unpeel - HsToCoq.Unpeel.Unpeel + GHC.Base.const GHC.Base.flip GHC.Base.fmap GHC.Base.fmap__ GHC.Base.foldr + GHC.Base.id GHC.Base.liftA2 GHC.Base.liftA2__ GHC.Base.mappend + GHC.Base.mappend__ GHC.Base.max GHC.Base.mconcat__ GHC.Base.mempty + GHC.Base.mempty__ GHC.Base.min GHC.Base.op_z2218U__ GHC.Base.op_zeze__ + GHC.Base.op_zeze____ GHC.Base.op_zgzg____ GHC.Base.op_zgzgze____ + GHC.Base.op_zlzd____ GHC.Base.op_zlzlzgzg__ GHC.Base.op_zlzlzgzg____ + GHC.Base.op_zlztzg__ GHC.Base.op_zlztzg____ GHC.Base.op_zsze____ + GHC.Base.op_ztzg__ GHC.Base.op_ztzg____ GHC.Base.pure GHC.Base.pure__ + GHC.Base.return___ GHC.Num.Int GHC.Num.Num GHC.Num.fromInteger GHC.Num.op_zp__ + GHC.Prim.coerce HsToCoq.Unpeel.Build_Unpeel HsToCoq.Unpeel.Unpeel *) diff --git a/base/Data/SemigroupInternal.h2ci b/base/Data/SemigroupInternal.h2ci index d7b809e66..f55adc351 100644 --- a/base/Data/SemigroupInternal.h2ci +++ b/base/Data/SemigroupInternal.h2ci @@ -1,14 +1,4 @@ -constructors: - Data.SemigroupInternal.Endo: ! '[Qualified "Data.SemigroupInternal" "Mk_Endo"]' - Data.SemigroupInternal.Alt: ! '[Qualified "Data.SemigroupInternal" "Mk_Alt"]' - Data.SemigroupInternal.Product: ! '[Qualified "Data.SemigroupInternal" "Mk_Product"]' - Data.SemigroupInternal.Sum: ! '[Qualified "Data.SemigroupInternal" "Mk_Sum"]' - Data.SemigroupInternal.Any: ! '[Qualified "Data.SemigroupInternal" "Mk_Any"]' - Data.SemigroupInternal.All: ! '[Qualified "Data.SemigroupInternal" "Mk_All"]' - Data.SemigroupInternal.Dual: ! '[Qualified "Data.SemigroupInternal" "Mk_Dual"]' constructorFields: - Data.SemigroupInternal.Mk_Dual: RecordFields [Qualified "Data.SemigroupInternal" - "getDual"] Data.SemigroupInternal.Mk_All: RecordFields [Qualified "Data.SemigroupInternal" "getAll"] Data.SemigroupInternal.Mk_Any: RecordFields [Qualified "Data.SemigroupInternal" @@ -17,23 +7,33 @@ constructorFields: "appEndo"] Data.SemigroupInternal.Mk_Alt: RecordFields [Qualified "Data.SemigroupInternal" "getAlt"] + Data.SemigroupInternal.Mk_Dual: RecordFields [Qualified "Data.SemigroupInternal" + "getDual"] Data.SemigroupInternal.Mk_Product: RecordFields [Qualified "Data.SemigroupInternal" "getProduct"] Data.SemigroupInternal.Mk_Sum: RecordFields [Qualified "Data.SemigroupInternal" "getSum"] -recordFieldTypes: - Data.SemigroupInternal.getAny: Qualified "Data.SemigroupInternal" "Any" - Data.SemigroupInternal.getAll: Qualified "Data.SemigroupInternal" "All" - Data.SemigroupInternal.appEndo: Qualified "Data.SemigroupInternal" "Endo" - Data.SemigroupInternal.getProduct: Qualified "Data.SemigroupInternal" "Product" - Data.SemigroupInternal.getSum: Qualified "Data.SemigroupInternal" "Sum" - Data.SemigroupInternal.getAlt: Qualified "Data.SemigroupInternal" "Alt" - Data.SemigroupInternal.getDual: Qualified "Data.SemigroupInternal" "Dual" constructorTypes: - Data.SemigroupInternal.Mk_Dual: Qualified "Data.SemigroupInternal" "Dual" Data.SemigroupInternal.Mk_All: Qualified "Data.SemigroupInternal" "All" Data.SemigroupInternal.Mk_Any: Qualified "Data.SemigroupInternal" "Any" Data.SemigroupInternal.Mk_Endo: Qualified "Data.SemigroupInternal" "Endo" Data.SemigroupInternal.Mk_Alt: Qualified "Data.SemigroupInternal" "Alt" + Data.SemigroupInternal.Mk_Dual: Qualified "Data.SemigroupInternal" "Dual" Data.SemigroupInternal.Mk_Product: Qualified "Data.SemigroupInternal" "Product" Data.SemigroupInternal.Mk_Sum: Qualified "Data.SemigroupInternal" "Sum" +constructors: + Data.SemigroupInternal.Alt: '[Qualified "Data.SemigroupInternal" "Mk_Alt"]' + Data.SemigroupInternal.Any: '[Qualified "Data.SemigroupInternal" "Mk_Any"]' + Data.SemigroupInternal.All: '[Qualified "Data.SemigroupInternal" "Mk_All"]' + Data.SemigroupInternal.Endo: '[Qualified "Data.SemigroupInternal" "Mk_Endo"]' + Data.SemigroupInternal.Product: '[Qualified "Data.SemigroupInternal" "Mk_Product"]' + Data.SemigroupInternal.Sum: '[Qualified "Data.SemigroupInternal" "Mk_Sum"]' + Data.SemigroupInternal.Dual: '[Qualified "Data.SemigroupInternal" "Mk_Dual"]' +recordFieldTypes: + Data.SemigroupInternal.getAny: Qualified "Data.SemigroupInternal" "Any" + Data.SemigroupInternal.getAll: Qualified "Data.SemigroupInternal" "All" + Data.SemigroupInternal.getSum: Qualified "Data.SemigroupInternal" "Sum" + Data.SemigroupInternal.getProduct: Qualified "Data.SemigroupInternal" "Product" + Data.SemigroupInternal.getAlt: Qualified "Data.SemigroupInternal" "Alt" + Data.SemigroupInternal.getDual: Qualified "Data.SemigroupInternal" "Dual" + Data.SemigroupInternal.appEndo: Qualified "Data.SemigroupInternal" "Endo" diff --git a/base/Data/SemigroupInternal.v b/base/Data/SemigroupInternal.v index 7a2f2ae19..1cde8c30b 100644 --- a/base/Data/SemigroupInternal.v +++ b/base/Data/SemigroupInternal.v @@ -62,31 +62,32 @@ Instance Default__Any : HsToCoq.Err.Default Any := Instance Default__All : HsToCoq.Err.Default All := HsToCoq.Err.Build_Default _ (Mk_All HsToCoq.Err.default). -Definition getSum {a} (arg_0__ : Sum a) := +#[global] Definition getSum {a} (arg_0__ : Sum a) := let 'Mk_Sum getSum := arg_0__ in getSum. -Definition getProduct {a} (arg_0__ : Product a) := +#[global] Definition getProduct {a} (arg_0__ : Product a) := let 'Mk_Product getProduct := arg_0__ in getProduct. -Definition appEndo {a} (arg_0__ : Endo a) := +#[global] Definition appEndo {a} (arg_0__ : Endo a) := let 'Mk_Endo appEndo := arg_0__ in appEndo. -Definition getDual {a} (arg_0__ : Dual a) := +#[global] Definition getDual {a} (arg_0__ : Dual a) := let 'Mk_Dual getDual := arg_0__ in getDual. -Definition getAny (arg_0__ : Any) := +#[global] Definition getAny (arg_0__ : Any) := let 'Mk_Any getAny := arg_0__ in getAny. -Definition getAlt {k : Type} {f : k -> Type} {a : k} (arg_0__ : Alt f a) := +#[global] Definition getAlt {k : Type} {f : k -> Type} {a : k} (arg_0__ + : Alt f a) := let 'Mk_Alt getAlt := arg_0__ in getAlt. -Definition getAll (arg_0__ : All) := +#[global] Definition getAll (arg_0__ : All) := let 'Mk_All getAll := arg_0__ in getAll. @@ -97,507 +98,7 @@ Instance Unpeel_Alt (k : Type) (f : k -> Type) (a : k) : HsToCoq.Unpeel.Unpeel ( (* Converted value declarations: *) -Instance Unpeel_Dual a : HsToCoq.Unpeel.Unpeel (Dual a) a := - HsToCoq.Unpeel.Build_Unpeel _ _ getDual Mk_Dual. - -Local Definition Eq___Dual_op_zeze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} - : Dual inst_a -> Dual inst_a -> bool := - GHC.Prim.coerce _GHC.Base.==_. - -Local Definition Eq___Dual_op_zsze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} - : Dual inst_a -> Dual inst_a -> bool := - GHC.Prim.coerce _GHC.Base./=_. - -Program Instance Eq___Dual {a : Type} `{GHC.Base.Eq_ a} - : GHC.Base.Eq_ (Dual a) := - fun _ k__ => - k__ {| GHC.Base.op_zeze____ := Eq___Dual_op_zeze__ ; - GHC.Base.op_zsze____ := Eq___Dual_op_zsze__ |}. - -Local Definition Ord__Dual_op_zl__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Dual inst_a -> Dual inst_a -> bool := - GHC.Prim.coerce _GHC.Base.<_. - -Local Definition Ord__Dual_op_zlze__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Dual inst_a -> Dual inst_a -> bool := - GHC.Prim.coerce _GHC.Base.<=_. - -Local Definition Ord__Dual_op_zg__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Dual inst_a -> Dual inst_a -> bool := - GHC.Prim.coerce _GHC.Base.>_. - -Local Definition Ord__Dual_op_zgze__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Dual inst_a -> Dual inst_a -> bool := - GHC.Prim.coerce _GHC.Base.>=_. - -Local Definition Ord__Dual_compare {inst_a : Type} `{GHC.Base.Ord inst_a} - : Dual inst_a -> Dual inst_a -> comparison := - GHC.Prim.coerce GHC.Base.compare. - -Local Definition Ord__Dual_max {inst_a : Type} `{GHC.Base.Ord inst_a} - : Dual inst_a -> Dual inst_a -> Dual inst_a := - GHC.Prim.coerce GHC.Base.max. - -Local Definition Ord__Dual_min {inst_a : Type} `{GHC.Base.Ord inst_a} - : Dual inst_a -> Dual inst_a -> Dual inst_a := - GHC.Prim.coerce GHC.Base.min. - -Program Instance Ord__Dual {a : Type} `{GHC.Base.Ord a} - : GHC.Base.Ord (Dual a) := - fun _ k__ => - k__ {| GHC.Base.op_zl____ := Ord__Dual_op_zl__ ; - GHC.Base.op_zlze____ := Ord__Dual_op_zlze__ ; - GHC.Base.op_zg____ := Ord__Dual_op_zg__ ; - GHC.Base.op_zgze____ := Ord__Dual_op_zgze__ ; - GHC.Base.compare__ := Ord__Dual_compare ; - GHC.Base.max__ := Ord__Dual_max ; - GHC.Base.min__ := Ord__Dual_min |}. - -(* Skipping all instances of class `GHC.Read.Read', including - `Data.SemigroupInternal.Read__Dual' *) - -(* Skipping all instances of class `GHC.Show.Show', including - `Data.SemigroupInternal.Show__Dual' *) - -(* Skipping all instances of class `GHC.Enum.Bounded', including - `Data.SemigroupInternal.Bounded__Dual' *) - -(* Skipping all instances of class `GHC.Generics.Generic', including - `Data.SemigroupInternal.Generic__Dual' *) - -(* Skipping all instances of class `GHC.Generics.Generic1', including - `Data.SemigroupInternal.Generic1__TYPE__Dual__LiftedRep' *) - -(* Skipping all instances of class `GHC.Generics.Generic', including - `Data.SemigroupInternal.Generic__Endo' *) - -Instance Unpeel_All : HsToCoq.Unpeel.Unpeel All bool := - HsToCoq.Unpeel.Build_Unpeel _ _ getAll Mk_All. - -Local Definition Eq___All_op_zeze__ : All -> All -> bool := - GHC.Prim.coerce _GHC.Base.==_. - -Local Definition Eq___All_op_zsze__ : All -> All -> bool := - GHC.Prim.coerce _GHC.Base./=_. - -Program Instance Eq___All : GHC.Base.Eq_ All := - fun _ k__ => - k__ {| GHC.Base.op_zeze____ := Eq___All_op_zeze__ ; - GHC.Base.op_zsze____ := Eq___All_op_zsze__ |}. - -Local Definition Ord__All_op_zl__ : All -> All -> bool := - GHC.Prim.coerce _GHC.Base.<_. - -Local Definition Ord__All_op_zlze__ : All -> All -> bool := - GHC.Prim.coerce _GHC.Base.<=_. - -Local Definition Ord__All_op_zg__ : All -> All -> bool := - GHC.Prim.coerce _GHC.Base.>_. - -Local Definition Ord__All_op_zgze__ : All -> All -> bool := - GHC.Prim.coerce _GHC.Base.>=_. - -Local Definition Ord__All_compare : All -> All -> comparison := - GHC.Prim.coerce GHC.Base.compare. - -Local Definition Ord__All_max : All -> All -> All := - GHC.Prim.coerce GHC.Base.max. - -Local Definition Ord__All_min : All -> All -> All := - GHC.Prim.coerce GHC.Base.min. - -Program Instance Ord__All : GHC.Base.Ord All := - fun _ k__ => - k__ {| GHC.Base.op_zl____ := Ord__All_op_zl__ ; - GHC.Base.op_zlze____ := Ord__All_op_zlze__ ; - GHC.Base.op_zg____ := Ord__All_op_zg__ ; - GHC.Base.op_zgze____ := Ord__All_op_zgze__ ; - GHC.Base.compare__ := Ord__All_compare ; - GHC.Base.max__ := Ord__All_max ; - GHC.Base.min__ := Ord__All_min |}. - -(* Skipping all instances of class `GHC.Read.Read', including - `Data.SemigroupInternal.Read__All' *) - -(* Skipping all instances of class `GHC.Show.Show', including - `Data.SemigroupInternal.Show__All' *) - -(* Skipping all instances of class `GHC.Enum.Bounded', including - `Data.SemigroupInternal.Bounded__All' *) - -(* Skipping all instances of class `GHC.Generics.Generic', including - `Data.SemigroupInternal.Generic__All' *) - -Instance Unpeel_Any : HsToCoq.Unpeel.Unpeel Any bool := - HsToCoq.Unpeel.Build_Unpeel _ _ getAny Mk_Any. - -Local Definition Eq___Any_op_zeze__ : Any -> Any -> bool := - GHC.Prim.coerce _GHC.Base.==_. - -Local Definition Eq___Any_op_zsze__ : Any -> Any -> bool := - GHC.Prim.coerce _GHC.Base./=_. - -Program Instance Eq___Any : GHC.Base.Eq_ Any := - fun _ k__ => - k__ {| GHC.Base.op_zeze____ := Eq___Any_op_zeze__ ; - GHC.Base.op_zsze____ := Eq___Any_op_zsze__ |}. - -Local Definition Ord__Any_op_zl__ : Any -> Any -> bool := - GHC.Prim.coerce _GHC.Base.<_. - -Local Definition Ord__Any_op_zlze__ : Any -> Any -> bool := - GHC.Prim.coerce _GHC.Base.<=_. - -Local Definition Ord__Any_op_zg__ : Any -> Any -> bool := - GHC.Prim.coerce _GHC.Base.>_. - -Local Definition Ord__Any_op_zgze__ : Any -> Any -> bool := - GHC.Prim.coerce _GHC.Base.>=_. - -Local Definition Ord__Any_compare : Any -> Any -> comparison := - GHC.Prim.coerce GHC.Base.compare. - -Local Definition Ord__Any_max : Any -> Any -> Any := - GHC.Prim.coerce GHC.Base.max. - -Local Definition Ord__Any_min : Any -> Any -> Any := - GHC.Prim.coerce GHC.Base.min. - -Program Instance Ord__Any : GHC.Base.Ord Any := - fun _ k__ => - k__ {| GHC.Base.op_zl____ := Ord__Any_op_zl__ ; - GHC.Base.op_zlze____ := Ord__Any_op_zlze__ ; - GHC.Base.op_zg____ := Ord__Any_op_zg__ ; - GHC.Base.op_zgze____ := Ord__Any_op_zgze__ ; - GHC.Base.compare__ := Ord__Any_compare ; - GHC.Base.max__ := Ord__Any_max ; - GHC.Base.min__ := Ord__Any_min |}. - -(* Skipping all instances of class `GHC.Read.Read', including - `Data.SemigroupInternal.Read__Any' *) - -(* Skipping all instances of class `GHC.Show.Show', including - `Data.SemigroupInternal.Show__Any' *) - -(* Skipping all instances of class `GHC.Enum.Bounded', including - `Data.SemigroupInternal.Bounded__Any' *) - -(* Skipping all instances of class `GHC.Generics.Generic', including - `Data.SemigroupInternal.Generic__Any' *) - -Instance Unpeel_Sum a : HsToCoq.Unpeel.Unpeel (Sum a) a := - HsToCoq.Unpeel.Build_Unpeel _ _ getSum Mk_Sum. - -Local Definition Eq___Sum_op_zeze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} - : Sum inst_a -> Sum inst_a -> bool := - GHC.Prim.coerce _GHC.Base.==_. - -Local Definition Eq___Sum_op_zsze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} - : Sum inst_a -> Sum inst_a -> bool := - GHC.Prim.coerce _GHC.Base./=_. - -Program Instance Eq___Sum {a : Type} `{GHC.Base.Eq_ a} : GHC.Base.Eq_ (Sum a) := - fun _ k__ => - k__ {| GHC.Base.op_zeze____ := Eq___Sum_op_zeze__ ; - GHC.Base.op_zsze____ := Eq___Sum_op_zsze__ |}. - -Local Definition Ord__Sum_op_zl__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Sum inst_a -> Sum inst_a -> bool := - GHC.Prim.coerce _GHC.Base.<_. - -Local Definition Ord__Sum_op_zlze__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Sum inst_a -> Sum inst_a -> bool := - GHC.Prim.coerce _GHC.Base.<=_. - -Local Definition Ord__Sum_op_zg__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Sum inst_a -> Sum inst_a -> bool := - GHC.Prim.coerce _GHC.Base.>_. - -Local Definition Ord__Sum_op_zgze__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Sum inst_a -> Sum inst_a -> bool := - GHC.Prim.coerce _GHC.Base.>=_. - -Local Definition Ord__Sum_compare {inst_a : Type} `{GHC.Base.Ord inst_a} - : Sum inst_a -> Sum inst_a -> comparison := - GHC.Prim.coerce GHC.Base.compare. - -Local Definition Ord__Sum_max {inst_a : Type} `{GHC.Base.Ord inst_a} - : Sum inst_a -> Sum inst_a -> Sum inst_a := - GHC.Prim.coerce GHC.Base.max. - -Local Definition Ord__Sum_min {inst_a : Type} `{GHC.Base.Ord inst_a} - : Sum inst_a -> Sum inst_a -> Sum inst_a := - GHC.Prim.coerce GHC.Base.min. - -Program Instance Ord__Sum {a : Type} `{GHC.Base.Ord a} : GHC.Base.Ord (Sum a) := - fun _ k__ => - k__ {| GHC.Base.op_zl____ := Ord__Sum_op_zl__ ; - GHC.Base.op_zlze____ := Ord__Sum_op_zlze__ ; - GHC.Base.op_zg____ := Ord__Sum_op_zg__ ; - GHC.Base.op_zgze____ := Ord__Sum_op_zgze__ ; - GHC.Base.compare__ := Ord__Sum_compare ; - GHC.Base.max__ := Ord__Sum_max ; - GHC.Base.min__ := Ord__Sum_min |}. - -(* Skipping all instances of class `GHC.Read.Read', including - `Data.SemigroupInternal.Read__Sum' *) - -(* Skipping all instances of class `GHC.Show.Show', including - `Data.SemigroupInternal.Show__Sum' *) - -(* Skipping all instances of class `GHC.Enum.Bounded', including - `Data.SemigroupInternal.Bounded__Sum' *) - -(* Skipping all instances of class `GHC.Generics.Generic', including - `Data.SemigroupInternal.Generic__Sum' *) - -(* Skipping all instances of class `GHC.Generics.Generic1', including - `Data.SemigroupInternal.Generic1__TYPE__Sum__LiftedRep' *) - -(* Skipping all instances of class `GHC.Num.Num', including - `Data.SemigroupInternal.Num__Sum' *) - -Instance Unpeel_Product a : HsToCoq.Unpeel.Unpeel (Product a) a := - HsToCoq.Unpeel.Build_Unpeel _ _ getProduct Mk_Product. - -Local Definition Eq___Product_op_zeze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} - : Product inst_a -> Product inst_a -> bool := - GHC.Prim.coerce _GHC.Base.==_. - -Local Definition Eq___Product_op_zsze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} - : Product inst_a -> Product inst_a -> bool := - GHC.Prim.coerce _GHC.Base./=_. - -Program Instance Eq___Product {a : Type} `{GHC.Base.Eq_ a} - : GHC.Base.Eq_ (Product a) := - fun _ k__ => - k__ {| GHC.Base.op_zeze____ := Eq___Product_op_zeze__ ; - GHC.Base.op_zsze____ := Eq___Product_op_zsze__ |}. - -Local Definition Ord__Product_op_zl__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Product inst_a -> Product inst_a -> bool := - GHC.Prim.coerce _GHC.Base.<_. - -Local Definition Ord__Product_op_zlze__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Product inst_a -> Product inst_a -> bool := - GHC.Prim.coerce _GHC.Base.<=_. - -Local Definition Ord__Product_op_zg__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Product inst_a -> Product inst_a -> bool := - GHC.Prim.coerce _GHC.Base.>_. - -Local Definition Ord__Product_op_zgze__ {inst_a : Type} `{GHC.Base.Ord inst_a} - : Product inst_a -> Product inst_a -> bool := - GHC.Prim.coerce _GHC.Base.>=_. - -Local Definition Ord__Product_compare {inst_a : Type} `{GHC.Base.Ord inst_a} - : Product inst_a -> Product inst_a -> comparison := - GHC.Prim.coerce GHC.Base.compare. - -Local Definition Ord__Product_max {inst_a : Type} `{GHC.Base.Ord inst_a} - : Product inst_a -> Product inst_a -> Product inst_a := - GHC.Prim.coerce GHC.Base.max. - -Local Definition Ord__Product_min {inst_a : Type} `{GHC.Base.Ord inst_a} - : Product inst_a -> Product inst_a -> Product inst_a := - GHC.Prim.coerce GHC.Base.min. - -Program Instance Ord__Product {a : Type} `{GHC.Base.Ord a} - : GHC.Base.Ord (Product a) := - fun _ k__ => - k__ {| GHC.Base.op_zl____ := Ord__Product_op_zl__ ; - GHC.Base.op_zlze____ := Ord__Product_op_zlze__ ; - GHC.Base.op_zg____ := Ord__Product_op_zg__ ; - GHC.Base.op_zgze____ := Ord__Product_op_zgze__ ; - GHC.Base.compare__ := Ord__Product_compare ; - GHC.Base.max__ := Ord__Product_max ; - GHC.Base.min__ := Ord__Product_min |}. - -(* Skipping all instances of class `GHC.Read.Read', including - `Data.SemigroupInternal.Read__Product' *) - -(* Skipping all instances of class `GHC.Show.Show', including - `Data.SemigroupInternal.Show__Product' *) - -(* Skipping all instances of class `GHC.Enum.Bounded', including - `Data.SemigroupInternal.Bounded__Product' *) - -(* Skipping all instances of class `GHC.Generics.Generic', including - `Data.SemigroupInternal.Generic__Product' *) - -(* Skipping all instances of class `GHC.Generics.Generic1', including - `Data.SemigroupInternal.Generic1__TYPE__Product__LiftedRep' *) - -(* Skipping all instances of class `GHC.Num.Num', including - `Data.SemigroupInternal.Num__Product' *) - -(* Skipping all instances of class `GHC.Generics.Generic', including - `Data.SemigroupInternal.Generic__Alt' *) - -(* Skipping all instances of class `GHC.Generics.Generic1', including - `Data.SemigroupInternal.Generic1__Alt__5' *) - -(* Skipping all instances of class `GHC.Read.Read', including - `Data.SemigroupInternal.Read__Alt' *) - -(* Skipping all instances of class `GHC.Show.Show', including - `Data.SemigroupInternal.Show__Alt' *) - -Local Definition Eq___Alt_op_zeze__ {inst_k : Type} {inst_f : inst_k -> Type} - {inst_a : inst_k} `{GHC.Base.Eq_ (inst_f inst_a)} - : Alt inst_f inst_a -> Alt inst_f inst_a -> bool := - GHC.Prim.coerce _GHC.Base.==_. - -Local Definition Eq___Alt_op_zsze__ {inst_k : Type} {inst_f : inst_k -> Type} - {inst_a : inst_k} `{GHC.Base.Eq_ (inst_f inst_a)} - : Alt inst_f inst_a -> Alt inst_f inst_a -> bool := - GHC.Prim.coerce _GHC.Base./=_. - -Program Instance Eq___Alt {k : Type} {f : k -> Type} {a : k} `{GHC.Base.Eq_ (f - a)} - : GHC.Base.Eq_ (Alt f a) := - fun _ k__ => - k__ {| GHC.Base.op_zeze____ := Eq___Alt_op_zeze__ ; - GHC.Base.op_zsze____ := Eq___Alt_op_zsze__ |}. - -Local Definition Ord__Alt_op_zl__ {inst_k : Type} {inst_f : inst_k -> Type} - {inst_a : inst_k} `{GHC.Base.Ord (inst_f inst_a)} - : Alt inst_f inst_a -> Alt inst_f inst_a -> bool := - GHC.Prim.coerce _GHC.Base.<_. - -Local Definition Ord__Alt_op_zlze__ {inst_k : Type} {inst_f : inst_k -> Type} - {inst_a : inst_k} `{GHC.Base.Ord (inst_f inst_a)} - : Alt inst_f inst_a -> Alt inst_f inst_a -> bool := - GHC.Prim.coerce _GHC.Base.<=_. - -Local Definition Ord__Alt_op_zg__ {inst_k : Type} {inst_f : inst_k -> Type} - {inst_a : inst_k} `{GHC.Base.Ord (inst_f inst_a)} - : Alt inst_f inst_a -> Alt inst_f inst_a -> bool := - GHC.Prim.coerce _GHC.Base.>_. - -Local Definition Ord__Alt_op_zgze__ {inst_k : Type} {inst_f : inst_k -> Type} - {inst_a : inst_k} `{GHC.Base.Ord (inst_f inst_a)} - : Alt inst_f inst_a -> Alt inst_f inst_a -> bool := - GHC.Prim.coerce _GHC.Base.>=_. - -Local Definition Ord__Alt_compare {inst_k : Type} {inst_f : inst_k -> Type} - {inst_a : inst_k} `{GHC.Base.Ord (inst_f inst_a)} - : Alt inst_f inst_a -> Alt inst_f inst_a -> comparison := - GHC.Prim.coerce GHC.Base.compare. - -Local Definition Ord__Alt_max {inst_k : Type} {inst_f : inst_k -> Type} {inst_a - : inst_k} `{GHC.Base.Ord (inst_f inst_a)} - : Alt inst_f inst_a -> Alt inst_f inst_a -> Alt inst_f inst_a := - GHC.Prim.coerce GHC.Base.max. - -Local Definition Ord__Alt_min {inst_k : Type} {inst_f : inst_k -> Type} {inst_a - : inst_k} `{GHC.Base.Ord (inst_f inst_a)} - : Alt inst_f inst_a -> Alt inst_f inst_a -> Alt inst_f inst_a := - GHC.Prim.coerce GHC.Base.min. - -Program Instance Ord__Alt {k : Type} {f : k -> Type} {a : k} `{GHC.Base.Ord (f - a)} - : GHC.Base.Ord (Alt f a) := - fun _ k__ => - k__ {| GHC.Base.op_zl____ := Ord__Alt_op_zl__ ; - GHC.Base.op_zlze____ := Ord__Alt_op_zlze__ ; - GHC.Base.op_zg____ := Ord__Alt_op_zg__ ; - GHC.Base.op_zgze____ := Ord__Alt_op_zgze__ ; - GHC.Base.compare__ := Ord__Alt_compare ; - GHC.Base.max__ := Ord__Alt_max ; - GHC.Base.min__ := Ord__Alt_min |}. - -(* Skipping all instances of class `GHC.Num.Num', including - `Data.SemigroupInternal.Num__Alt' *) - -(* Skipping all instances of class `GHC.Enum.Enum', including - `Data.SemigroupInternal.Enum__Alt' *) - -Local Definition Monad__Alt_op_zgzg__ {inst_f : Type -> Type} `{GHC.Base.Monad - inst_f} - : forall {a : Type}, - forall {b : Type}, Alt inst_f a -> Alt inst_f b -> Alt inst_f b := - fun {a : Type} {b : Type} => GHC.Prim.coerce _GHC.Base.>>_. - -Local Definition Monad__Alt_op_zgzgze__ {inst_f : Type -> Type} `{GHC.Base.Monad - inst_f} - : forall {a : Type}, - forall {b : Type}, Alt inst_f a -> (a -> Alt inst_f b) -> Alt inst_f b := - fun {a : Type} {b : Type} => GHC.Prim.coerce _GHC.Base.>>=_. - -Local Definition Monad__Alt_return_ {inst_f : Type -> Type} `{GHC.Base.Monad - inst_f} - : forall {a : Type}, a -> Alt inst_f a := - fun {a : Type} => GHC.Prim.coerce GHC.Base.return_. - -Local Definition Applicative__Alt_liftA2 {inst_f : Type -> Type} - `{GHC.Base.Applicative inst_f} - : forall {a : Type}, - forall {b : Type}, - forall {c : Type}, - (a -> b -> c) -> Alt inst_f a -> Alt inst_f b -> Alt inst_f c := - fun {a : Type} {b : Type} {c : Type} => GHC.Prim.coerce GHC.Base.liftA2. - -Local Definition Applicative__Alt_op_zlztzg__ {inst_f : Type -> Type} - `{GHC.Base.Applicative inst_f} - : forall {a : Type}, - forall {b : Type}, Alt inst_f (a -> b) -> Alt inst_f a -> Alt inst_f b := - fun {a : Type} {b : Type} => GHC.Prim.coerce _GHC.Base.<*>_. - -Local Definition Applicative__Alt_op_ztzg__ {inst_f : Type -> Type} - `{GHC.Base.Applicative inst_f} - : forall {a : Type}, - forall {b : Type}, Alt inst_f a -> Alt inst_f b -> Alt inst_f b := - fun {a : Type} {b : Type} => GHC.Prim.coerce _GHC.Base.*>_. - -Local Definition Applicative__Alt_pure {inst_f : Type -> Type} - `{GHC.Base.Applicative inst_f} - : forall {a : Type}, a -> Alt inst_f a := - fun {a : Type} => GHC.Prim.coerce GHC.Base.pure. - -Local Definition Functor__Alt_fmap {inst_f : Type -> Type} `{GHC.Base.Functor - inst_f} - : forall {a : Type}, - forall {b : Type}, (a -> b) -> Alt inst_f a -> Alt inst_f b := - fun {a : Type} {b : Type} => GHC.Prim.coerce GHC.Base.fmap. - -Local Definition Functor__Alt_op_zlzd__ {inst_f : Type -> Type} - `{GHC.Base.Functor inst_f} - : forall {a : Type}, forall {b : Type}, a -> Alt inst_f b -> Alt inst_f a := - fun {a : Type} {b : Type} => GHC.Prim.coerce _GHC.Base.<$_. - -Program Instance Functor__Alt {f : Type -> Type} `{GHC.Base.Functor f} - : GHC.Base.Functor (Alt f) := - fun _ k__ => - k__ {| GHC.Base.fmap__ := fun {a : Type} {b : Type} => Functor__Alt_fmap ; - GHC.Base.op_zlzd____ := fun {a : Type} {b : Type} => Functor__Alt_op_zlzd__ |}. - -Program Instance Applicative__Alt {f : Type -> Type} `{GHC.Base.Applicative f} - : GHC.Base.Applicative (Alt f) := - fun _ k__ => - k__ {| GHC.Base.liftA2__ := fun {a : Type} {b : Type} {c : Type} => - Applicative__Alt_liftA2 ; - GHC.Base.op_zlztzg____ := fun {a : Type} {b : Type} => - Applicative__Alt_op_zlztzg__ ; - GHC.Base.op_ztzg____ := fun {a : Type} {b : Type} => - Applicative__Alt_op_ztzg__ ; - GHC.Base.pure__ := fun {a : Type} => Applicative__Alt_pure |}. - -Program Instance Monad__Alt {f : Type -> Type} `{GHC.Base.Monad f} - : GHC.Base.Monad (Alt f) := - fun _ k__ => - k__ {| GHC.Base.op_zgzg____ := fun {a : Type} {b : Type} => - Monad__Alt_op_zgzg__ ; - GHC.Base.op_zgzgze____ := fun {a : Type} {b : Type} => Monad__Alt_op_zgzgze__ ; - GHC.Base.return___ := fun {a : Type} => Monad__Alt_return_ |}. - -(* Skipping all instances of class `GHC.Base.MonadPlus', including - `Data.SemigroupInternal.MonadPlus__Alt' *) - -(* Skipping all instances of class `GHC.Base.Alternative', including - `Data.SemigroupInternal.Alternative__Alt' *) - -Local Definition Semigroup__Dual_op_zlzlzgzg__ {inst_a : Type} +#[local] Definition Semigroup__Dual_op_zlzlzgzg__ {inst_a : Type} `{GHC.Base.Semigroup inst_a} : Dual inst_a -> Dual inst_a -> Dual inst_a := fun arg_0__ arg_1__ => @@ -605,23 +106,28 @@ Local Definition Semigroup__Dual_op_zlzlzgzg__ {inst_a : Type} | Mk_Dual a, Mk_Dual b => Mk_Dual (b GHC.Base.<<>> a) end. +#[global] Program Instance Semigroup__Dual {a : Type} `{GHC.Base.Semigroup a} : GHC.Base.Semigroup (Dual a) := fun _ k__ => k__ {| GHC.Base.op_zlzlzgzg____ := Semigroup__Dual_op_zlzlzgzg__ |}. -Local Definition Monoid__Dual_mappend {inst_a : Type} `{GHC.Base.Monoid inst_a} +#[local] Definition Monoid__Dual_mappend {inst_a : Type} `{GHC.Base.Monoid + inst_a} : Dual inst_a -> Dual inst_a -> Dual inst_a := _GHC.Base.<<>>_. -Local Definition Monoid__Dual_mempty {inst_a : Type} `{GHC.Base.Monoid inst_a} +#[local] Definition Monoid__Dual_mempty {inst_a : Type} `{GHC.Base.Monoid + inst_a} : Dual inst_a := Mk_Dual GHC.Base.mempty. -Local Definition Monoid__Dual_mconcat {inst_a : Type} `{GHC.Base.Monoid inst_a} +#[local] Definition Monoid__Dual_mconcat {inst_a : Type} `{GHC.Base.Monoid + inst_a} : list (Dual inst_a) -> Dual inst_a := GHC.Base.foldr Monoid__Dual_mappend Monoid__Dual_mempty. +#[global] Program Instance Monoid__Dual {a : Type} `{GHC.Base.Monoid a} : GHC.Base.Monoid (Dual a) := fun _ k__ => @@ -629,38 +135,40 @@ Program Instance Monoid__Dual {a : Type} `{GHC.Base.Monoid a} GHC.Base.mconcat__ := Monoid__Dual_mconcat ; GHC.Base.mempty__ := Monoid__Dual_mempty |}. -Local Definition Functor__Dual_fmap +#[local] Definition Functor__Dual_fmap : forall {a : Type}, forall {b : Type}, (a -> b) -> Dual a -> Dual b := fun {a : Type} {b : Type} => GHC.Prim.coerce. -Local Definition Functor__Dual_op_zlzd__ +#[local] Definition Functor__Dual_op_zlzd__ : forall {a : Type}, forall {b : Type}, a -> Dual b -> Dual a := fun {a : Type} {b : Type} => Functor__Dual_fmap GHC.Base.∘ GHC.Base.const. +#[global] Program Instance Functor__Dual : GHC.Base.Functor Dual := fun _ k__ => k__ {| GHC.Base.fmap__ := fun {a : Type} {b : Type} => Functor__Dual_fmap ; GHC.Base.op_zlzd____ := fun {a : Type} {b : Type} => Functor__Dual_op_zlzd__ |}. -Local Definition Applicative__Dual_op_zlztzg__ +#[local] Definition Applicative__Dual_op_zlztzg__ : forall {a : Type}, forall {b : Type}, Dual (a -> b) -> Dual a -> Dual b := fun {a : Type} {b : Type} => GHC.Prim.coerce. -Local Definition Applicative__Dual_liftA2 +#[local] Definition Applicative__Dual_liftA2 : forall {a : Type}, forall {b : Type}, forall {c : Type}, (a -> b -> c) -> Dual a -> Dual b -> Dual c := fun {a : Type} {b : Type} {c : Type} => fun f x => Applicative__Dual_op_zlztzg__ (GHC.Base.fmap f x). -Local Definition Applicative__Dual_op_ztzg__ +#[local] Definition Applicative__Dual_op_ztzg__ : forall {a : Type}, forall {b : Type}, Dual a -> Dual b -> Dual b := fun {a : Type} {b : Type} => fun a1 a2 => Applicative__Dual_op_zlztzg__ (GHC.Base.id GHC.Base.<$ a1) a2. -Local Definition Applicative__Dual_pure : forall {a : Type}, a -> Dual a := +#[local] Definition Applicative__Dual_pure : forall {a : Type}, a -> Dual a := fun {a : Type} => Mk_Dual. +#[global] Program Instance Applicative__Dual : GHC.Base.Applicative Dual := fun _ k__ => k__ {| GHC.Base.liftA2__ := fun {a : Type} {b : Type} {c : Type} => @@ -671,18 +179,19 @@ Program Instance Applicative__Dual : GHC.Base.Applicative Dual := Applicative__Dual_op_ztzg__ ; GHC.Base.pure__ := fun {a : Type} => Applicative__Dual_pure |}. -Local Definition Monad__Dual_op_zgzgze__ +#[local] Definition Monad__Dual_op_zgzgze__ : forall {a : Type}, forall {b : Type}, Dual a -> (a -> Dual b) -> Dual b := fun {a : Type} {b : Type} => fun m k => k (getDual m). -Local Definition Monad__Dual_op_zgzg__ +#[local] Definition Monad__Dual_op_zgzg__ : forall {a : Type}, forall {b : Type}, Dual a -> Dual b -> Dual b := fun {a : Type} {b : Type} => fun m k => Monad__Dual_op_zgzgze__ m (fun arg_0__ => k). -Local Definition Monad__Dual_return_ : forall {a : Type}, a -> Dual a := +#[local] Definition Monad__Dual_return_ : forall {a : Type}, a -> Dual a := fun {a : Type} => GHC.Base.pure. +#[global] Program Instance Monad__Dual : GHC.Base.Monad Dual := fun _ k__ => k__ {| GHC.Base.op_zgzg____ := fun {a : Type} {b : Type} => @@ -693,95 +202,103 @@ Program Instance Monad__Dual : GHC.Base.Monad Dual := Instance Unpeel_Endo a : HsToCoq.Unpeel.Unpeel (Endo a) (a -> a) := HsToCoq.Unpeel.Build_Unpeel _ _ appEndo Mk_Endo. -Local Definition Semigroup__Endo_op_zlzlzgzg__ {inst_a : Type} +#[local] Definition Semigroup__Endo_op_zlzlzgzg__ {inst_a : Type} : Endo inst_a -> Endo inst_a -> Endo inst_a := GHC.Prim.coerce (_GHC.Base.∘_ : (inst_a -> inst_a) -> (inst_a -> inst_a) -> (inst_a -> inst_a)). +#[global] Program Instance Semigroup__Endo {a : Type} : GHC.Base.Semigroup (Endo a) := fun _ k__ => k__ {| GHC.Base.op_zlzlzgzg____ := Semigroup__Endo_op_zlzlzgzg__ |}. -Local Definition Monoid__Endo_mappend {inst_a : Type} +#[local] Definition Monoid__Endo_mappend {inst_a : Type} : Endo inst_a -> Endo inst_a -> Endo inst_a := _GHC.Base.<<>>_. -Local Definition Monoid__Endo_mempty {inst_a : Type} : Endo inst_a := +#[local] Definition Monoid__Endo_mempty {inst_a : Type} : Endo inst_a := Mk_Endo GHC.Base.id. -Local Definition Monoid__Endo_mconcat {inst_a : Type} +#[local] Definition Monoid__Endo_mconcat {inst_a : Type} : list (Endo inst_a) -> Endo inst_a := GHC.Base.foldr Monoid__Endo_mappend Monoid__Endo_mempty. +#[global] Program Instance Monoid__Endo {a : Type} : GHC.Base.Monoid (Endo a) := fun _ k__ => k__ {| GHC.Base.mappend__ := Monoid__Endo_mappend ; GHC.Base.mconcat__ := Monoid__Endo_mconcat ; GHC.Base.mempty__ := Monoid__Endo_mempty |}. -Local Definition Semigroup__All_op_zlzlzgzg__ : All -> All -> All := +#[local] Definition Semigroup__All_op_zlzlzgzg__ : All -> All -> All := GHC.Prim.coerce andb. +#[global] Program Instance Semigroup__All : GHC.Base.Semigroup All := fun _ k__ => k__ {| GHC.Base.op_zlzlzgzg____ := Semigroup__All_op_zlzlzgzg__ |}. -Local Definition Monoid__All_mappend : All -> All -> All := +#[local] Definition Monoid__All_mappend : All -> All -> All := _GHC.Base.<<>>_. -Local Definition Monoid__All_mempty : All := +#[local] Definition Monoid__All_mempty : All := Mk_All true. -Local Definition Monoid__All_mconcat : list All -> All := +#[local] Definition Monoid__All_mconcat : list All -> All := GHC.Base.foldr Monoid__All_mappend Monoid__All_mempty. +#[global] Program Instance Monoid__All : GHC.Base.Monoid All := fun _ k__ => k__ {| GHC.Base.mappend__ := Monoid__All_mappend ; GHC.Base.mconcat__ := Monoid__All_mconcat ; GHC.Base.mempty__ := Monoid__All_mempty |}. -Local Definition Semigroup__Any_op_zlzlzgzg__ : Any -> Any -> Any := +#[local] Definition Semigroup__Any_op_zlzlzgzg__ : Any -> Any -> Any := GHC.Prim.coerce orb. +#[global] Program Instance Semigroup__Any : GHC.Base.Semigroup Any := fun _ k__ => k__ {| GHC.Base.op_zlzlzgzg____ := Semigroup__Any_op_zlzlzgzg__ |}. -Local Definition Monoid__Any_mappend : Any -> Any -> Any := +#[local] Definition Monoid__Any_mappend : Any -> Any -> Any := _GHC.Base.<<>>_. -Local Definition Monoid__Any_mempty : Any := +#[local] Definition Monoid__Any_mempty : Any := Mk_Any false. -Local Definition Monoid__Any_mconcat : list Any -> Any := +#[local] Definition Monoid__Any_mconcat : list Any -> Any := GHC.Base.foldr Monoid__Any_mappend Monoid__Any_mempty. +#[global] Program Instance Monoid__Any : GHC.Base.Monoid Any := fun _ k__ => k__ {| GHC.Base.mappend__ := Monoid__Any_mappend ; GHC.Base.mconcat__ := Monoid__Any_mconcat ; GHC.Base.mempty__ := Monoid__Any_mempty |}. -Local Definition Semigroup__Sum_op_zlzlzgzg__ {inst_a : Type} `{GHC.Num.Num +#[local] Definition Semigroup__Sum_op_zlzlzgzg__ {inst_a : Type} `{GHC.Num.Num inst_a} : Sum inst_a -> Sum inst_a -> Sum inst_a := GHC.Prim.coerce (_GHC.Num.+_ : inst_a -> inst_a -> inst_a). +#[global] Program Instance Semigroup__Sum {a : Type} `{GHC.Num.Num a} : GHC.Base.Semigroup (Sum a) := fun _ k__ => k__ {| GHC.Base.op_zlzlzgzg____ := Semigroup__Sum_op_zlzlzgzg__ |}. -Local Definition Monoid__Sum_mappend {inst_a : Type} `{GHC.Num.Num inst_a} +#[local] Definition Monoid__Sum_mappend {inst_a : Type} `{GHC.Num.Num inst_a} : Sum inst_a -> Sum inst_a -> Sum inst_a := _GHC.Base.<<>>_. -Local Definition Monoid__Sum_mempty {inst_a : Type} `{GHC.Num.Num inst_a} +#[local] Definition Monoid__Sum_mempty {inst_a : Type} `{GHC.Num.Num inst_a} : Sum inst_a := Mk_Sum #0. -Local Definition Monoid__Sum_mconcat {inst_a : Type} `{GHC.Num.Num inst_a} +#[local] Definition Monoid__Sum_mconcat {inst_a : Type} `{GHC.Num.Num inst_a} : list (Sum inst_a) -> Sum inst_a := GHC.Base.foldr Monoid__Sum_mappend Monoid__Sum_mempty. +#[global] Program Instance Monoid__Sum {a : Type} `{GHC.Num.Num a} : GHC.Base.Monoid (Sum a) := fun _ k__ => @@ -789,38 +306,40 @@ Program Instance Monoid__Sum {a : Type} `{GHC.Num.Num a} GHC.Base.mconcat__ := Monoid__Sum_mconcat ; GHC.Base.mempty__ := Monoid__Sum_mempty |}. -Local Definition Functor__Sum_fmap +#[local] Definition Functor__Sum_fmap : forall {a : Type}, forall {b : Type}, (a -> b) -> Sum a -> Sum b := fun {a : Type} {b : Type} => GHC.Prim.coerce. -Local Definition Functor__Sum_op_zlzd__ +#[local] Definition Functor__Sum_op_zlzd__ : forall {a : Type}, forall {b : Type}, a -> Sum b -> Sum a := fun {a : Type} {b : Type} => Functor__Sum_fmap GHC.Base.∘ GHC.Base.const. +#[global] Program Instance Functor__Sum : GHC.Base.Functor Sum := fun _ k__ => k__ {| GHC.Base.fmap__ := fun {a : Type} {b : Type} => Functor__Sum_fmap ; GHC.Base.op_zlzd____ := fun {a : Type} {b : Type} => Functor__Sum_op_zlzd__ |}. -Local Definition Applicative__Sum_op_zlztzg__ +#[local] Definition Applicative__Sum_op_zlztzg__ : forall {a : Type}, forall {b : Type}, Sum (a -> b) -> Sum a -> Sum b := fun {a : Type} {b : Type} => GHC.Prim.coerce. -Local Definition Applicative__Sum_liftA2 +#[local] Definition Applicative__Sum_liftA2 : forall {a : Type}, forall {b : Type}, forall {c : Type}, (a -> b -> c) -> Sum a -> Sum b -> Sum c := fun {a : Type} {b : Type} {c : Type} => fun f x => Applicative__Sum_op_zlztzg__ (GHC.Base.fmap f x). -Local Definition Applicative__Sum_op_ztzg__ +#[local] Definition Applicative__Sum_op_ztzg__ : forall {a : Type}, forall {b : Type}, Sum a -> Sum b -> Sum b := fun {a : Type} {b : Type} => fun a1 a2 => Applicative__Sum_op_zlztzg__ (GHC.Base.id GHC.Base.<$ a1) a2. -Local Definition Applicative__Sum_pure : forall {a : Type}, a -> Sum a := +#[local] Definition Applicative__Sum_pure : forall {a : Type}, a -> Sum a := fun {a : Type} => Mk_Sum. +#[global] Program Instance Applicative__Sum : GHC.Base.Applicative Sum := fun _ k__ => k__ {| GHC.Base.liftA2__ := fun {a : Type} {b : Type} {c : Type} => @@ -831,18 +350,19 @@ Program Instance Applicative__Sum : GHC.Base.Applicative Sum := Applicative__Sum_op_ztzg__ ; GHC.Base.pure__ := fun {a : Type} => Applicative__Sum_pure |}. -Local Definition Monad__Sum_op_zgzgze__ +#[local] Definition Monad__Sum_op_zgzgze__ : forall {a : Type}, forall {b : Type}, Sum a -> (a -> Sum b) -> Sum b := fun {a : Type} {b : Type} => fun m k => k (getSum m). -Local Definition Monad__Sum_op_zgzg__ +#[local] Definition Monad__Sum_op_zgzg__ : forall {a : Type}, forall {b : Type}, Sum a -> Sum b -> Sum b := fun {a : Type} {b : Type} => fun m k => Monad__Sum_op_zgzgze__ m (fun arg_0__ => k). -Local Definition Monad__Sum_return_ : forall {a : Type}, a -> Sum a := +#[local] Definition Monad__Sum_return_ : forall {a : Type}, a -> Sum a := fun {a : Type} => GHC.Base.pure. +#[global] Program Instance Monad__Sum : GHC.Base.Monad Sum := fun _ k__ => k__ {| GHC.Base.op_zgzg____ := fun {a : Type} {b : Type} => @@ -850,28 +370,32 @@ Program Instance Monad__Sum : GHC.Base.Monad Sum := GHC.Base.op_zgzgze____ := fun {a : Type} {b : Type} => Monad__Sum_op_zgzgze__ ; GHC.Base.return___ := fun {a : Type} => Monad__Sum_return_ |}. -Local Definition Semigroup__Product_op_zlzlzgzg__ {inst_a : Type} `{GHC.Num.Num - inst_a} +#[local] Definition Semigroup__Product_op_zlzlzgzg__ {inst_a : Type} + `{GHC.Num.Num inst_a} : Product inst_a -> Product inst_a -> Product inst_a := GHC.Prim.coerce (_GHC.Num.*_ : inst_a -> inst_a -> inst_a). +#[global] Program Instance Semigroup__Product {a : Type} `{GHC.Num.Num a} : GHC.Base.Semigroup (Product a) := fun _ k__ => k__ {| GHC.Base.op_zlzlzgzg____ := Semigroup__Product_op_zlzlzgzg__ |}. -Local Definition Monoid__Product_mappend {inst_a : Type} `{GHC.Num.Num inst_a} +#[local] Definition Monoid__Product_mappend {inst_a : Type} `{GHC.Num.Num + inst_a} : Product inst_a -> Product inst_a -> Product inst_a := _GHC.Base.<<>>_. -Local Definition Monoid__Product_mempty {inst_a : Type} `{GHC.Num.Num inst_a} +#[local] Definition Monoid__Product_mempty {inst_a : Type} `{GHC.Num.Num inst_a} : Product inst_a := Mk_Product #1. -Local Definition Monoid__Product_mconcat {inst_a : Type} `{GHC.Num.Num inst_a} +#[local] Definition Monoid__Product_mconcat {inst_a : Type} `{GHC.Num.Num + inst_a} : list (Product inst_a) -> Product inst_a := GHC.Base.foldr Monoid__Product_mappend Monoid__Product_mempty. +#[global] Program Instance Monoid__Product {a : Type} `{GHC.Num.Num a} : GHC.Base.Monoid (Product a) := fun _ k__ => @@ -879,41 +403,43 @@ Program Instance Monoid__Product {a : Type} `{GHC.Num.Num a} GHC.Base.mconcat__ := Monoid__Product_mconcat ; GHC.Base.mempty__ := Monoid__Product_mempty |}. -Local Definition Functor__Product_fmap +#[local] Definition Functor__Product_fmap : forall {a : Type}, forall {b : Type}, (a -> b) -> Product a -> Product b := fun {a : Type} {b : Type} => GHC.Prim.coerce. -Local Definition Functor__Product_op_zlzd__ +#[local] Definition Functor__Product_op_zlzd__ : forall {a : Type}, forall {b : Type}, a -> Product b -> Product a := fun {a : Type} {b : Type} => Functor__Product_fmap GHC.Base.∘ GHC.Base.const. +#[global] Program Instance Functor__Product : GHC.Base.Functor Product := fun _ k__ => k__ {| GHC.Base.fmap__ := fun {a : Type} {b : Type} => Functor__Product_fmap ; GHC.Base.op_zlzd____ := fun {a : Type} {b : Type} => Functor__Product_op_zlzd__ |}. -Local Definition Applicative__Product_op_zlztzg__ +#[local] Definition Applicative__Product_op_zlztzg__ : forall {a : Type}, forall {b : Type}, Product (a -> b) -> Product a -> Product b := fun {a : Type} {b : Type} => GHC.Prim.coerce. -Local Definition Applicative__Product_liftA2 +#[local] Definition Applicative__Product_liftA2 : forall {a : Type}, forall {b : Type}, forall {c : Type}, (a -> b -> c) -> Product a -> Product b -> Product c := fun {a : Type} {b : Type} {c : Type} => fun f x => Applicative__Product_op_zlztzg__ (GHC.Base.fmap f x). -Local Definition Applicative__Product_op_ztzg__ +#[local] Definition Applicative__Product_op_ztzg__ : forall {a : Type}, forall {b : Type}, Product a -> Product b -> Product b := fun {a : Type} {b : Type} => fun a1 a2 => Applicative__Product_op_zlztzg__ (GHC.Base.id GHC.Base.<$ a1) a2. -Local Definition Applicative__Product_pure +#[local] Definition Applicative__Product_pure : forall {a : Type}, a -> Product a := fun {a : Type} => Mk_Product. +#[global] Program Instance Applicative__Product : GHC.Base.Applicative Product := fun _ k__ => k__ {| GHC.Base.liftA2__ := fun {a : Type} {b : Type} {c : Type} => @@ -924,19 +450,21 @@ Program Instance Applicative__Product : GHC.Base.Applicative Product := Applicative__Product_op_ztzg__ ; GHC.Base.pure__ := fun {a : Type} => Applicative__Product_pure |}. -Local Definition Monad__Product_op_zgzgze__ +#[local] Definition Monad__Product_op_zgzgze__ : forall {a : Type}, forall {b : Type}, Product a -> (a -> Product b) -> Product b := fun {a : Type} {b : Type} => fun m k => k (getProduct m). -Local Definition Monad__Product_op_zgzg__ +#[local] Definition Monad__Product_op_zgzg__ : forall {a : Type}, forall {b : Type}, Product a -> Product b -> Product b := fun {a : Type} {b : Type} => fun m k => Monad__Product_op_zgzgze__ m (fun arg_0__ => k). -Local Definition Monad__Product_return_ : forall {a : Type}, a -> Product a := +#[local] Definition Monad__Product_return_ + : forall {a : Type}, a -> Product a := fun {a : Type} => GHC.Base.pure. +#[global] Program Instance Monad__Product : GHC.Base.Monad Product := fun _ k__ => k__ {| GHC.Base.op_zgzg____ := fun {a : Type} {b : Type} => @@ -953,8 +481,8 @@ Program Instance Monad__Product : GHC.Base.Monad Product := (* Skipping definition `Data.SemigroupInternal.stimesIdempotent' *) -Definition stimesIdempotentMonoid {b : Type} {a : Type} `{GHC.Real.Integral b} - `{GHC.Base.Monoid a} +#[global] Definition stimesIdempotentMonoid {b : Type} {a : Type} + `{GHC.Real.Integral b} `{GHC.Base.Monoid a} : b -> a -> a := fun n x => match GHC.Base.compare n #0 with @@ -973,21 +501,30 @@ Definition stimesIdempotentMonoid {b : Type} {a : Type} `{GHC.Real.Integral b} (* Skipping definition `Data.SemigroupInternal.stimesList' *) +Instance Unpeel_Sum a : HsToCoq.Unpeel.Unpeel (Sum a) a := + HsToCoq.Unpeel.Build_Unpeel _ _ getSum Mk_Sum. + +Instance Unpeel_Product a : HsToCoq.Unpeel.Unpeel (Product a) a := + HsToCoq.Unpeel.Build_Unpeel _ _ getProduct Mk_Product. + +Instance Unpeel_All : HsToCoq.Unpeel.Unpeel All bool := + HsToCoq.Unpeel.Build_Unpeel _ _ getAll Mk_All. + +Instance Unpeel_Any : HsToCoq.Unpeel.Unpeel Any bool := + HsToCoq.Unpeel.Build_Unpeel _ _ getAny Mk_Any. + +Instance Unpeel_Dual a : HsToCoq.Unpeel.Unpeel (Dual a) a := + HsToCoq.Unpeel.Build_Unpeel _ _ getDual Mk_Dual. + (* External variables: - Eq Gt Lt Type andb bool comparison false list orb true GHC.Base.Applicative - GHC.Base.Eq_ GHC.Base.Functor GHC.Base.Monad GHC.Base.Monoid GHC.Base.Ord - GHC.Base.Semigroup GHC.Base.compare GHC.Base.compare__ GHC.Base.const - GHC.Base.fmap GHC.Base.fmap__ GHC.Base.foldr GHC.Base.id GHC.Base.liftA2 - GHC.Base.liftA2__ GHC.Base.mappend__ GHC.Base.max GHC.Base.max__ - GHC.Base.mconcat__ GHC.Base.mempty GHC.Base.mempty__ GHC.Base.min GHC.Base.min__ - GHC.Base.op_z2218U__ GHC.Base.op_zeze__ GHC.Base.op_zeze____ GHC.Base.op_zg__ - GHC.Base.op_zg____ GHC.Base.op_zgze__ GHC.Base.op_zgze____ GHC.Base.op_zgzg__ - GHC.Base.op_zgzg____ GHC.Base.op_zgzgze__ GHC.Base.op_zgzgze____ - GHC.Base.op_zl__ GHC.Base.op_zl____ GHC.Base.op_zlzd__ GHC.Base.op_zlzd____ - GHC.Base.op_zlze__ GHC.Base.op_zlze____ GHC.Base.op_zlzlzgzg__ - GHC.Base.op_zlzlzgzg____ GHC.Base.op_zlztzg__ GHC.Base.op_zlztzg____ - GHC.Base.op_zsze__ GHC.Base.op_zsze____ GHC.Base.op_ztzg__ GHC.Base.op_ztzg____ - GHC.Base.pure GHC.Base.pure__ GHC.Base.return_ GHC.Base.return___ + Eq Gt Lt Type andb bool false list orb true GHC.Base.Applicative + GHC.Base.Functor GHC.Base.Monad GHC.Base.Monoid GHC.Base.Semigroup + GHC.Base.compare GHC.Base.const GHC.Base.fmap GHC.Base.fmap__ GHC.Base.foldr + GHC.Base.id GHC.Base.liftA2__ GHC.Base.mappend__ GHC.Base.mconcat__ + GHC.Base.mempty GHC.Base.mempty__ GHC.Base.op_z2218U__ GHC.Base.op_zgzg____ + GHC.Base.op_zgzgze____ GHC.Base.op_zlzd__ GHC.Base.op_zlzd____ + GHC.Base.op_zlzlzgzg__ GHC.Base.op_zlzlzgzg____ GHC.Base.op_zlztzg____ + GHC.Base.op_ztzg____ GHC.Base.pure GHC.Base.pure__ GHC.Base.return___ GHC.Err.errorWithoutStackTrace GHC.Num.Num GHC.Num.fromInteger GHC.Num.op_zp__ GHC.Num.op_zt__ GHC.Prim.coerce GHC.Real.Integral HsToCoq.Err.Build_Default HsToCoq.Err.Default HsToCoq.Err.default HsToCoq.Unpeel.Build_Unpeel diff --git a/base/Data/Traversable.h2ci b/base/Data/Traversable.h2ci index 606c07cbe..72c54f6e3 100644 --- a/base/Data/Traversable.h2ci +++ b/base/Data/Traversable.h2ci @@ -1,14 +1,3 @@ -superclassCount: - Data.Traversable.Traversable: '2' -defaultMethods: - Data.Traversable.Traversable: fromList [(Qualified "Data.Traversable" "mapM",Qualid - (Qualified "Data.Traversable" "traverse")),(Qualified "Data.Traversable" "sequence",Qualid - (Qualified "Data.Traversable" "sequenceA")),(Qualified "Data.Traversable" "sequenceA",App - (Qualid (Qualified "Data.Traversable" "traverse")) (PosArg (Qualid (Qualified - "GHC.Base" "id")) :| [])),(Qualified "Data.Traversable" "traverse",Fun (ExplicitBinder - (Ident (Bare "f")) :| []) (App (Qualid (Qualified "GHC.Base" "op_z2218U__")) (PosArg - (Qualid (Qualified "Data.Traversable" "sequenceA")) :| [PosArg (App (Qualid (Qualified - "GHC.Base" "fmap")) (PosArg (Qualid (Bare "f")) :| []))])))] classTypes: Data.Traversable.Traversable: fromList [] classDefns: @@ -51,3 +40,14 @@ classDefns: (App (Qualid (Bare "t")) (PosArg (Qualid (Bare "a")) :| [])) (App (Qualid (Bare "f")) (PosArg (App (Qualid (Bare "t")) (PosArg (Qualid (Bare "b")) :| [])) :| []))))))))] +superclassCount: + Data.Traversable.Traversable: '2' +defaultMethods: + Data.Traversable.Traversable: fromList [(Qualified "Data.Traversable" "mapM",Qualid + (Qualified "Data.Traversable" "traverse")),(Qualified "Data.Traversable" "sequence",Qualid + (Qualified "Data.Traversable" "sequenceA")),(Qualified "Data.Traversable" "sequenceA",App + (Qualid (Qualified "Data.Traversable" "traverse")) (PosArg (Qualid (Qualified + "GHC.Base" "id")) :| [])),(Qualified "Data.Traversable" "traverse",Fun (ExplicitBinder + (Ident (Bare "f")) :| []) (App (Qualid (Qualified "GHC.Base" "op_z2218U__")) (PosArg + (Qualid (Qualified "Data.Traversable" "sequenceA")) :| [PosArg (App (Qualid (Qualified + "GHC.Base" "fmap")) (PosArg (Qualid (Bare "f")) :| []))])))] diff --git a/base/Data/Traversable.v b/base/Data/Traversable.v index aac42764a..ed32dd32a 100644 --- a/base/Data/Traversable.v +++ b/base/Data/Traversable.v @@ -18,6 +18,8 @@ Require Data.Functor. Require Data.Functor.Const. Require Data.Functor.Identity. Require Data.Functor.Utils. +Require Data.Monoid. +Require Data.Ord. Require Data.Proxy. Require Data.SemigroupInternal. Require GHC.Base. @@ -41,28 +43,28 @@ Record Traversable__Dict (t : Type -> Type) := Traversable__Dict_Build { forall {b : Type}, forall `{GHC.Base.Applicative f}, (a -> f b) -> t a -> f (t b) }. -Definition Traversable (t : Type -> Type) `{GHC.Base.Functor t} +#[global] Definition Traversable (t : Type -> Type) `{GHC.Base.Functor t} `{Data.Foldable.Foldable t} := forall r__, (Traversable__Dict t -> r__) -> r__. Existing Class Traversable. -Definition mapM `{g__0__ : Traversable t} +#[global] Definition mapM `{g__0__ : Traversable t} : forall {m : Type -> Type}, forall {a : Type}, forall {b : Type}, forall `{GHC.Base.Monad m}, (a -> m b) -> t a -> m (t b) := g__0__ _ (mapM__ t). -Definition sequence `{g__0__ : Traversable t} +#[global] Definition sequence `{g__0__ : Traversable t} : forall {m : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Monad m}, t (m a) -> m (t a) := g__0__ _ (sequence__ t). -Definition sequenceA `{g__0__ : Traversable t} +#[global] Definition sequenceA `{g__0__ : Traversable t} : forall {f : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Applicative f}, t (f a) -> f (t a) := g__0__ _ (sequenceA__ t). -Definition traverse `{g__0__ : Traversable t} +#[global] Definition traverse `{g__0__ : Traversable t} : forall {f : Type -> Type}, forall {a : Type}, forall {b : Type}, @@ -71,23 +73,388 @@ Definition traverse `{g__0__ : Traversable t} (* Converted value declarations: *) -(* Skipping instance `Data.Traversable.Traversable__URec__Word' of class - `Data.Traversable.Traversable' *) +#[local] Definition Traversable__Down_traverse + : forall {f : Type -> Type}, + forall {a : Type}, + forall {b : Type}, + forall `{GHC.Base.Applicative f}, + (a -> f b) -> Data.Ord.Down a -> f (Data.Ord.Down b) := + fun {f : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Applicative f} => + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | f, Data.Ord.Mk_Down a1 => GHC.Base.fmap (fun b1 => Data.Ord.Mk_Down b1) (f a1) + end. -(* Skipping instance `Data.Traversable.Traversable__URec__Int' of class - `Data.Traversable.Traversable' *) +#[local] Definition Traversable__Down_mapM + : forall {m : Type -> Type}, + forall {a : Type}, + forall {b : Type}, + forall `{GHC.Base.Monad m}, + (a -> m b) -> Data.Ord.Down a -> m (Data.Ord.Down b) := + fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => + Traversable__Down_traverse. -(* Skipping instance `Data.Traversable.Traversable__URec__Float' of class - `Data.Traversable.Traversable' *) +#[local] Definition Traversable__Down_sequenceA + : forall {f : Type -> Type}, + forall {a : Type}, + forall `{GHC.Base.Applicative f}, Data.Ord.Down (f a) -> f (Data.Ord.Down a) := + fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => + Traversable__Down_traverse GHC.Base.id. -(* Skipping instance `Data.Traversable.Traversable__URec__Double' of class - `Data.Traversable.Traversable' *) +#[local] Definition Traversable__Down_sequence + : forall {m : Type -> Type}, + forall {a : Type}, + forall `{GHC.Base.Monad m}, Data.Ord.Down (m a) -> m (Data.Ord.Down a) := + fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => + Traversable__Down_sequenceA. -(* Skipping instance `Data.Traversable.Traversable__URec__Char' of class - `Data.Traversable.Traversable' *) +#[global] +Program Instance Traversable__Down : Traversable Data.Ord.Down := + fun _ k__ => + k__ {| mapM__ := fun {m : Type -> Type} + {a : Type} + {b : Type} + `{GHC.Base.Monad m} => + Traversable__Down_mapM ; + sequence__ := fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => + Traversable__Down_sequence ; + sequenceA__ := fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => + Traversable__Down_sequenceA ; + traverse__ := fun {f : Type -> Type} + {a : Type} + {b : Type} + `{GHC.Base.Applicative f} => + Traversable__Down_traverse |}. -(* Skipping instance `Data.Traversable.Traversable__URec__Ptr__unit' of class - `Data.Traversable.Traversable' *) +#[local] Definition Traversable__UWord_traverse + : forall {f : Type -> Type}, + forall {a : Type}, + forall {b : Type}, + forall `{GHC.Base.Applicative f}, + (a -> f b) -> GHC.Generics.UWord a -> f (GHC.Generics.UWord b) := + fun {f : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Applicative f} => + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | f, GHC.Generics.UWord a1 => GHC.Base.pure (GHC.Generics.UWord a1) + end. + +#[local] Definition Traversable__UWord_mapM + : forall {m : Type -> Type}, + forall {a : Type}, + forall {b : Type}, + forall `{GHC.Base.Monad m}, + (a -> m b) -> GHC.Generics.UWord a -> m (GHC.Generics.UWord b) := + fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => + Traversable__UWord_traverse. + +#[local] Definition Traversable__UWord_sequenceA + : forall {f : Type -> Type}, + forall {a : Type}, + forall `{GHC.Base.Applicative f}, + GHC.Generics.UWord (f a) -> f (GHC.Generics.UWord a) := + fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => + Traversable__UWord_traverse GHC.Base.id. + +#[local] Definition Traversable__UWord_sequence + : forall {m : Type -> Type}, + forall {a : Type}, + forall `{GHC.Base.Monad m}, + GHC.Generics.UWord (m a) -> m (GHC.Generics.UWord a) := + fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => + Traversable__UWord_sequenceA. + +#[global] +Program Instance Traversable__UWord : Traversable GHC.Generics.UWord := + fun _ k__ => + k__ {| mapM__ := fun {m : Type -> Type} + {a : Type} + {b : Type} + `{GHC.Base.Monad m} => + Traversable__UWord_mapM ; + sequence__ := fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => + Traversable__UWord_sequence ; + sequenceA__ := fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => + Traversable__UWord_sequenceA ; + traverse__ := fun {f : Type -> Type} + {a : Type} + {b : Type} + `{GHC.Base.Applicative f} => + Traversable__UWord_traverse |}. + +#[local] Definition Traversable__UInt_traverse + : forall {f : Type -> Type}, + forall {a : Type}, + forall {b : Type}, + forall `{GHC.Base.Applicative f}, + (a -> f b) -> GHC.Generics.UInt a -> f (GHC.Generics.UInt b) := + fun {f : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Applicative f} => + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | f, GHC.Generics.UInt a1 => GHC.Base.pure (GHC.Generics.UInt a1) + end. + +#[local] Definition Traversable__UInt_mapM + : forall {m : Type -> Type}, + forall {a : Type}, + forall {b : Type}, + forall `{GHC.Base.Monad m}, + (a -> m b) -> GHC.Generics.UInt a -> m (GHC.Generics.UInt b) := + fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => + Traversable__UInt_traverse. + +#[local] Definition Traversable__UInt_sequenceA + : forall {f : Type -> Type}, + forall {a : Type}, + forall `{GHC.Base.Applicative f}, + GHC.Generics.UInt (f a) -> f (GHC.Generics.UInt a) := + fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => + Traversable__UInt_traverse GHC.Base.id. + +#[local] Definition Traversable__UInt_sequence + : forall {m : Type -> Type}, + forall {a : Type}, + forall `{GHC.Base.Monad m}, + GHC.Generics.UInt (m a) -> m (GHC.Generics.UInt a) := + fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => + Traversable__UInt_sequenceA. + +#[global] +Program Instance Traversable__UInt : Traversable GHC.Generics.UInt := + fun _ k__ => + k__ {| mapM__ := fun {m : Type -> Type} + {a : Type} + {b : Type} + `{GHC.Base.Monad m} => + Traversable__UInt_mapM ; + sequence__ := fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => + Traversable__UInt_sequence ; + sequenceA__ := fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => + Traversable__UInt_sequenceA ; + traverse__ := fun {f : Type -> Type} + {a : Type} + {b : Type} + `{GHC.Base.Applicative f} => + Traversable__UInt_traverse |}. + +#[local] Definition Traversable__UFloat_traverse + : forall {f : Type -> Type}, + forall {a : Type}, + forall {b : Type}, + forall `{GHC.Base.Applicative f}, + (a -> f b) -> GHC.Generics.UFloat a -> f (GHC.Generics.UFloat b) := + fun {f : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Applicative f} => + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | f, GHC.Generics.UFloat a1 => GHC.Base.pure (GHC.Generics.UFloat a1) + end. + +#[local] Definition Traversable__UFloat_mapM + : forall {m : Type -> Type}, + forall {a : Type}, + forall {b : Type}, + forall `{GHC.Base.Monad m}, + (a -> m b) -> GHC.Generics.UFloat a -> m (GHC.Generics.UFloat b) := + fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => + Traversable__UFloat_traverse. + +#[local] Definition Traversable__UFloat_sequenceA + : forall {f : Type -> Type}, + forall {a : Type}, + forall `{GHC.Base.Applicative f}, + GHC.Generics.UFloat (f a) -> f (GHC.Generics.UFloat a) := + fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => + Traversable__UFloat_traverse GHC.Base.id. + +#[local] Definition Traversable__UFloat_sequence + : forall {m : Type -> Type}, + forall {a : Type}, + forall `{GHC.Base.Monad m}, + GHC.Generics.UFloat (m a) -> m (GHC.Generics.UFloat a) := + fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => + Traversable__UFloat_sequenceA. + +#[global] +Program Instance Traversable__UFloat : Traversable GHC.Generics.UFloat := + fun _ k__ => + k__ {| mapM__ := fun {m : Type -> Type} + {a : Type} + {b : Type} + `{GHC.Base.Monad m} => + Traversable__UFloat_mapM ; + sequence__ := fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => + Traversable__UFloat_sequence ; + sequenceA__ := fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => + Traversable__UFloat_sequenceA ; + traverse__ := fun {f : Type -> Type} + {a : Type} + {b : Type} + `{GHC.Base.Applicative f} => + Traversable__UFloat_traverse |}. + +#[local] Definition Traversable__UDouble_traverse + : forall {f : Type -> Type}, + forall {a : Type}, + forall {b : Type}, + forall `{GHC.Base.Applicative f}, + (a -> f b) -> GHC.Generics.UDouble a -> f (GHC.Generics.UDouble b) := + fun {f : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Applicative f} => + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | f, GHC.Generics.UDouble a1 => GHC.Base.pure (GHC.Generics.UDouble a1) + end. + +#[local] Definition Traversable__UDouble_mapM + : forall {m : Type -> Type}, + forall {a : Type}, + forall {b : Type}, + forall `{GHC.Base.Monad m}, + (a -> m b) -> GHC.Generics.UDouble a -> m (GHC.Generics.UDouble b) := + fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => + Traversable__UDouble_traverse. + +#[local] Definition Traversable__UDouble_sequenceA + : forall {f : Type -> Type}, + forall {a : Type}, + forall `{GHC.Base.Applicative f}, + GHC.Generics.UDouble (f a) -> f (GHC.Generics.UDouble a) := + fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => + Traversable__UDouble_traverse GHC.Base.id. + +#[local] Definition Traversable__UDouble_sequence + : forall {m : Type -> Type}, + forall {a : Type}, + forall `{GHC.Base.Monad m}, + GHC.Generics.UDouble (m a) -> m (GHC.Generics.UDouble a) := + fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => + Traversable__UDouble_sequenceA. + +#[global] +Program Instance Traversable__UDouble : Traversable GHC.Generics.UDouble := + fun _ k__ => + k__ {| mapM__ := fun {m : Type -> Type} + {a : Type} + {b : Type} + `{GHC.Base.Monad m} => + Traversable__UDouble_mapM ; + sequence__ := fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => + Traversable__UDouble_sequence ; + sequenceA__ := fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => + Traversable__UDouble_sequenceA ; + traverse__ := fun {f : Type -> Type} + {a : Type} + {b : Type} + `{GHC.Base.Applicative f} => + Traversable__UDouble_traverse |}. + +#[local] Definition Traversable__UChar_traverse + : forall {f : Type -> Type}, + forall {a : Type}, + forall {b : Type}, + forall `{GHC.Base.Applicative f}, + (a -> f b) -> GHC.Generics.UChar a -> f (GHC.Generics.UChar b) := + fun {f : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Applicative f} => + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | f, GHC.Generics.UChar a1 => GHC.Base.pure (GHC.Generics.UChar a1) + end. + +#[local] Definition Traversable__UChar_mapM + : forall {m : Type -> Type}, + forall {a : Type}, + forall {b : Type}, + forall `{GHC.Base.Monad m}, + (a -> m b) -> GHC.Generics.UChar a -> m (GHC.Generics.UChar b) := + fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => + Traversable__UChar_traverse. + +#[local] Definition Traversable__UChar_sequenceA + : forall {f : Type -> Type}, + forall {a : Type}, + forall `{GHC.Base.Applicative f}, + GHC.Generics.UChar (f a) -> f (GHC.Generics.UChar a) := + fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => + Traversable__UChar_traverse GHC.Base.id. + +#[local] Definition Traversable__UChar_sequence + : forall {m : Type -> Type}, + forall {a : Type}, + forall `{GHC.Base.Monad m}, + GHC.Generics.UChar (m a) -> m (GHC.Generics.UChar a) := + fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => + Traversable__UChar_sequenceA. + +#[global] +Program Instance Traversable__UChar : Traversable GHC.Generics.UChar := + fun _ k__ => + k__ {| mapM__ := fun {m : Type -> Type} + {a : Type} + {b : Type} + `{GHC.Base.Monad m} => + Traversable__UChar_mapM ; + sequence__ := fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => + Traversable__UChar_sequence ; + sequenceA__ := fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => + Traversable__UChar_sequenceA ; + traverse__ := fun {f : Type -> Type} + {a : Type} + {b : Type} + `{GHC.Base.Applicative f} => + Traversable__UChar_traverse |}. + +#[local] Definition Traversable__UAddr_traverse + : forall {f : Type -> Type}, + forall {a : Type}, + forall {b : Type}, + forall `{GHC.Base.Applicative f}, + (a -> f b) -> GHC.Generics.UAddr a -> f (GHC.Generics.UAddr b) := + fun {f : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Applicative f} => + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | f, GHC.Generics.UAddr a1 => GHC.Base.pure (GHC.Generics.UAddr a1) + end. + +#[local] Definition Traversable__UAddr_mapM + : forall {m : Type -> Type}, + forall {a : Type}, + forall {b : Type}, + forall `{GHC.Base.Monad m}, + (a -> m b) -> GHC.Generics.UAddr a -> m (GHC.Generics.UAddr b) := + fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => + Traversable__UAddr_traverse. + +#[local] Definition Traversable__UAddr_sequenceA + : forall {f : Type -> Type}, + forall {a : Type}, + forall `{GHC.Base.Applicative f}, + GHC.Generics.UAddr (f a) -> f (GHC.Generics.UAddr a) := + fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => + Traversable__UAddr_traverse GHC.Base.id. + +#[local] Definition Traversable__UAddr_sequence + : forall {m : Type -> Type}, + forall {a : Type}, + forall `{GHC.Base.Monad m}, + GHC.Generics.UAddr (m a) -> m (GHC.Generics.UAddr a) := + fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => + Traversable__UAddr_sequenceA. + +#[global] +Program Instance Traversable__UAddr : Traversable GHC.Generics.UAddr := + fun _ k__ => + k__ {| mapM__ := fun {m : Type -> Type} + {a : Type} + {b : Type} + `{GHC.Base.Monad m} => + Traversable__UAddr_mapM ; + sequence__ := fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => + Traversable__UAddr_sequence ; + sequenceA__ := fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => + Traversable__UAddr_sequenceA ; + traverse__ := fun {f : Type -> Type} + {a : Type} + {b : Type} + `{GHC.Base.Applicative f} => + Traversable__UAddr_traverse |}. (* Skipping instance `Data.Traversable.Traversable__op_ZCziZC__' of class `Data.Traversable.Traversable' *) @@ -113,7 +480,7 @@ Definition traverse `{g__0__ : Traversable t} (* Skipping instance `Data.Traversable.Traversable__V1' of class `Data.Traversable.Traversable' *) -Local Definition Traversable__Identity_traverse +#[local] Definition Traversable__Identity_traverse : forall {f : Type -> Type}, forall {a : Type}, forall {b : Type}, @@ -127,7 +494,7 @@ Local Definition Traversable__Identity_traverse GHC.Base.fmap (fun b1 => Data.Functor.Identity.Mk_Identity b1) (f a1) end. -Local Definition Traversable__Identity_mapM +#[local] Definition Traversable__Identity_mapM : forall {m : Type -> Type}, forall {a : Type}, forall {b : Type}, @@ -137,7 +504,7 @@ Local Definition Traversable__Identity_mapM fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => Traversable__Identity_traverse. -Local Definition Traversable__Identity_sequenceA +#[local] Definition Traversable__Identity_sequenceA : forall {f : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Applicative f}, @@ -145,7 +512,7 @@ Local Definition Traversable__Identity_sequenceA fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => Traversable__Identity_traverse GHC.Base.id. -Local Definition Traversable__Identity_sequence +#[local] Definition Traversable__Identity_sequence : forall {m : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Monad m}, @@ -153,6 +520,7 @@ Local Definition Traversable__Identity_sequence fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => Traversable__Identity_sequenceA. +#[global] Program Instance Traversable__Identity : Traversable Data.Functor.Identity.Identity := fun _ k__ => @@ -171,7 +539,7 @@ Program Instance Traversable__Identity `{GHC.Base.Applicative f} => Traversable__Identity_traverse |}. -Local Definition Traversable__option_traverse +#[local] Definition Traversable__option_traverse : forall {f : Type -> Type}, forall {a : Type}, forall {b : Type}, @@ -183,7 +551,7 @@ Local Definition Traversable__option_traverse | f, Some x => Some Data.Functor.<$> f x end. -Local Definition Traversable__option_mapM +#[local] Definition Traversable__option_mapM : forall {m : Type -> Type}, forall {a : Type}, forall {b : Type}, @@ -191,19 +559,20 @@ Local Definition Traversable__option_mapM fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => Traversable__option_traverse. -Local Definition Traversable__option_sequenceA +#[local] Definition Traversable__option_sequenceA : forall {f : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Applicative f}, option (f a) -> f (option a) := fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => Traversable__option_traverse GHC.Base.id. -Local Definition Traversable__option_sequence +#[local] Definition Traversable__option_sequence : forall {m : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Monad m}, option (m a) -> m (option a) := fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => Traversable__option_sequenceA. +#[global] Program Instance Traversable__option : Traversable option := fun _ k__ => k__ {| mapM__ := fun {m : Type -> Type} @@ -221,7 +590,7 @@ Program Instance Traversable__option : Traversable option := `{GHC.Base.Applicative f} => Traversable__option_traverse |}. -Local Definition Traversable__list_traverse +#[local] Definition Traversable__list_traverse : forall {f : Type -> Type}, forall {a : Type}, forall {b : Type}, @@ -231,7 +600,7 @@ Local Definition Traversable__list_traverse let cons_f := fun x ys => GHC.Base.liftA2 cons (f x) ys in GHC.Base.foldr cons_f (GHC.Base.pure nil). -Local Definition Traversable__list_mapM +#[local] Definition Traversable__list_mapM : forall {m : Type -> Type}, forall {a : Type}, forall {b : Type}, @@ -239,18 +608,19 @@ Local Definition Traversable__list_mapM fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => Traversable__list_traverse. -Local Definition Traversable__list_sequenceA +#[local] Definition Traversable__list_sequenceA : forall {f : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Applicative f}, list (f a) -> f (list a) := fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => Traversable__list_traverse GHC.Base.id. -Local Definition Traversable__list_sequence +#[local] Definition Traversable__list_sequence : forall {m : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Monad m}, list (m a) -> m (list a) := fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => Traversable__list_sequenceA. +#[global] Program Instance Traversable__list : Traversable list := fun _ k__ => k__ {| mapM__ := fun {m : Type -> Type} @@ -268,7 +638,7 @@ Program Instance Traversable__list : Traversable list := `{GHC.Base.Applicative f} => Traversable__list_traverse |}. -Local Definition Traversable__NonEmpty_traverse +#[local] Definition Traversable__NonEmpty_traverse : forall {f : Type -> Type}, forall {a : Type}, forall {b : Type}, @@ -281,7 +651,7 @@ Local Definition Traversable__NonEmpty_traverse GHC.Base.liftA2 GHC.Base.NEcons (f a) (traverse f as_) end. -Local Definition Traversable__NonEmpty_mapM +#[local] Definition Traversable__NonEmpty_mapM : forall {m : Type -> Type}, forall {a : Type}, forall {b : Type}, @@ -290,7 +660,7 @@ Local Definition Traversable__NonEmpty_mapM fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => Traversable__NonEmpty_traverse. -Local Definition Traversable__NonEmpty_sequenceA +#[local] Definition Traversable__NonEmpty_sequenceA : forall {f : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Applicative f}, @@ -298,7 +668,7 @@ Local Definition Traversable__NonEmpty_sequenceA fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => Traversable__NonEmpty_traverse GHC.Base.id. -Local Definition Traversable__NonEmpty_sequence +#[local] Definition Traversable__NonEmpty_sequence : forall {m : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Monad m}, @@ -306,6 +676,7 @@ Local Definition Traversable__NonEmpty_sequence fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => Traversable__NonEmpty_sequenceA. +#[global] Program Instance Traversable__NonEmpty : Traversable GHC.Base.NonEmpty := fun _ k__ => k__ {| mapM__ := fun {m : Type -> Type} @@ -323,7 +694,7 @@ Program Instance Traversable__NonEmpty : Traversable GHC.Base.NonEmpty := `{GHC.Base.Applicative f} => Traversable__NonEmpty_traverse |}. -Local Definition Traversable__Either_traverse {inst_a : Type} +#[local] Definition Traversable__Either_traverse {inst_a : Type} : forall {f : Type -> Type}, forall {a : Type}, forall {b : Type}, @@ -336,7 +707,7 @@ Local Definition Traversable__Either_traverse {inst_a : Type} | f, Data.Either.Right y => Data.Either.Right Data.Functor.<$> f y end. -Local Definition Traversable__Either_mapM {inst_a : Type} +#[local] Definition Traversable__Either_mapM {inst_a : Type} : forall {m : Type -> Type}, forall {a : Type}, forall {b : Type}, @@ -345,7 +716,7 @@ Local Definition Traversable__Either_mapM {inst_a : Type} fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => Traversable__Either_traverse. -Local Definition Traversable__Either_sequenceA {inst_a : Type} +#[local] Definition Traversable__Either_sequenceA {inst_a : Type} : forall {f : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Applicative f}, @@ -353,7 +724,7 @@ Local Definition Traversable__Either_sequenceA {inst_a : Type} fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => Traversable__Either_traverse GHC.Base.id. -Local Definition Traversable__Either_sequence {inst_a : Type} +#[local] Definition Traversable__Either_sequence {inst_a : Type} : forall {m : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Monad m}, @@ -361,6 +732,7 @@ Local Definition Traversable__Either_sequence {inst_a : Type} fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => Traversable__Either_sequenceA. +#[global] Program Instance Traversable__Either {a : Type} : Traversable (Data.Either.Either a) := fun _ k__ => @@ -379,7 +751,7 @@ Program Instance Traversable__Either {a : Type} `{GHC.Base.Applicative f} => Traversable__Either_traverse |}. -Local Definition Traversable__pair_type_traverse {inst_a : Type} +#[local] Definition Traversable__pair_type_traverse {inst_a : Type} : forall {f : Type -> Type}, forall {a : Type}, forall {b : Type}, @@ -392,7 +764,7 @@ Local Definition Traversable__pair_type_traverse {inst_a : Type} | f, pair x y => GHC.Tuple.pair2 x Data.Functor.<$> f y end. -Local Definition Traversable__pair_type_mapM {inst_a : Type} +#[local] Definition Traversable__pair_type_mapM {inst_a : Type} : forall {m : Type -> Type}, forall {a : Type}, forall {b : Type}, @@ -402,7 +774,7 @@ Local Definition Traversable__pair_type_mapM {inst_a : Type} fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => Traversable__pair_type_traverse. -Local Definition Traversable__pair_type_sequenceA {inst_a : Type} +#[local] Definition Traversable__pair_type_sequenceA {inst_a : Type} : forall {f : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Applicative f}, @@ -410,7 +782,7 @@ Local Definition Traversable__pair_type_sequenceA {inst_a : Type} fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => Traversable__pair_type_traverse GHC.Base.id. -Local Definition Traversable__pair_type_sequence {inst_a : Type} +#[local] Definition Traversable__pair_type_sequence {inst_a : Type} : forall {m : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Monad m}, @@ -418,6 +790,7 @@ Local Definition Traversable__pair_type_sequence {inst_a : Type} fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => Traversable__pair_type_sequenceA. +#[global] Program Instance Traversable__pair_type {a : Type} : Traversable (GHC.Tuple.pair_type a) := fun _ k__ => @@ -439,7 +812,7 @@ Program Instance Traversable__pair_type {a : Type} (* Skipping instance `Data.Traversable.Traversable__Array' of class `Data.Traversable.Traversable' *) -Local Definition Traversable__Proxy_mapM +#[local] Definition Traversable__Proxy_mapM : forall {m : Type -> Type}, forall {a : Type}, forall {b : Type}, @@ -448,14 +821,14 @@ Local Definition Traversable__Proxy_mapM fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => fun arg_0__ arg_1__ => GHC.Base.pure Data.Proxy.Mk_Proxy. -Local Definition Traversable__Proxy_sequence +#[local] Definition Traversable__Proxy_sequence : forall {m : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Monad m}, Data.Proxy.Proxy (m a) -> m (Data.Proxy.Proxy a) := fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => fun arg_0__ => GHC.Base.pure Data.Proxy.Mk_Proxy. -Local Definition Traversable__Proxy_sequenceA +#[local] Definition Traversable__Proxy_sequenceA : forall {f : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Applicative f}, @@ -463,7 +836,7 @@ Local Definition Traversable__Proxy_sequenceA fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => fun arg_0__ => GHC.Base.pure Data.Proxy.Mk_Proxy. -Local Definition Traversable__Proxy_traverse +#[local] Definition Traversable__Proxy_traverse : forall {f : Type -> Type}, forall {a : Type}, forall {b : Type}, @@ -472,6 +845,7 @@ Local Definition Traversable__Proxy_traverse fun {f : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Applicative f} => fun arg_0__ arg_1__ => GHC.Base.pure Data.Proxy.Mk_Proxy. +#[global] Program Instance Traversable__Proxy : Traversable Data.Proxy.Proxy := fun _ k__ => k__ {| mapM__ := fun {m : Type -> Type} @@ -489,7 +863,7 @@ Program Instance Traversable__Proxy : Traversable Data.Proxy.Proxy := `{GHC.Base.Applicative f} => Traversable__Proxy_traverse |}. -Local Definition Traversable__Const_traverse {inst_m : Type} +#[local] Definition Traversable__Const_traverse {inst_m : Type} : forall {f : Type -> Type}, forall {a : Type}, forall {b : Type}, @@ -503,7 +877,7 @@ Local Definition Traversable__Const_traverse {inst_m : Type} GHC.Base.pure (Data.Functor.Const.Mk_Const m) end. -Local Definition Traversable__Const_mapM {inst_m : Type} +#[local] Definition Traversable__Const_mapM {inst_m : Type} : forall {m : Type -> Type}, forall {a : Type}, forall {b : Type}, @@ -513,7 +887,7 @@ Local Definition Traversable__Const_mapM {inst_m : Type} fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => Traversable__Const_traverse. -Local Definition Traversable__Const_sequenceA {inst_m : Type} +#[local] Definition Traversable__Const_sequenceA {inst_m : Type} : forall {f : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Applicative f}, @@ -522,7 +896,7 @@ Local Definition Traversable__Const_sequenceA {inst_m : Type} fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => Traversable__Const_traverse GHC.Base.id. -Local Definition Traversable__Const_sequence {inst_m : Type} +#[local] Definition Traversable__Const_sequence {inst_m : Type} : forall {m : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Monad m}, @@ -531,6 +905,7 @@ Local Definition Traversable__Const_sequence {inst_m : Type} fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => Traversable__Const_sequenceA. +#[global] Program Instance Traversable__Const {m : Type} : Traversable (Data.Functor.Const.Const m) := fun _ k__ => @@ -549,7 +924,7 @@ Program Instance Traversable__Const {m : Type} `{GHC.Base.Applicative f} => Traversable__Const_traverse |}. -Local Definition Traversable__Dual_traverse +#[local] Definition Traversable__Dual_traverse : forall {f : Type -> Type}, forall {a : Type}, forall {b : Type}, @@ -563,7 +938,7 @@ Local Definition Traversable__Dual_traverse Data.SemigroupInternal.Mk_Dual Data.Functor.<$> f x end. -Local Definition Traversable__Dual_mapM +#[local] Definition Traversable__Dual_mapM : forall {m : Type -> Type}, forall {a : Type}, forall {b : Type}, @@ -573,7 +948,7 @@ Local Definition Traversable__Dual_mapM fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => Traversable__Dual_traverse. -Local Definition Traversable__Dual_sequenceA +#[local] Definition Traversable__Dual_sequenceA : forall {f : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Applicative f}, @@ -581,7 +956,7 @@ Local Definition Traversable__Dual_sequenceA fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => Traversable__Dual_traverse GHC.Base.id. -Local Definition Traversable__Dual_sequence +#[local] Definition Traversable__Dual_sequence : forall {m : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Monad m}, @@ -589,6 +964,7 @@ Local Definition Traversable__Dual_sequence fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => Traversable__Dual_sequenceA. +#[global] Program Instance Traversable__Dual : Traversable Data.SemigroupInternal.Dual := fun _ k__ => k__ {| mapM__ := fun {m : Type -> Type} @@ -606,7 +982,7 @@ Program Instance Traversable__Dual : Traversable Data.SemigroupInternal.Dual := `{GHC.Base.Applicative f} => Traversable__Dual_traverse |}. -Local Definition Traversable__Sum_traverse +#[local] Definition Traversable__Sum_traverse : forall {f : Type -> Type}, forall {a : Type}, forall {b : Type}, @@ -620,7 +996,7 @@ Local Definition Traversable__Sum_traverse Data.SemigroupInternal.Mk_Sum Data.Functor.<$> f x end. -Local Definition Traversable__Sum_mapM +#[local] Definition Traversable__Sum_mapM : forall {m : Type -> Type}, forall {a : Type}, forall {b : Type}, @@ -630,7 +1006,7 @@ Local Definition Traversable__Sum_mapM fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => Traversable__Sum_traverse. -Local Definition Traversable__Sum_sequenceA +#[local] Definition Traversable__Sum_sequenceA : forall {f : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Applicative f}, @@ -638,7 +1014,7 @@ Local Definition Traversable__Sum_sequenceA fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => Traversable__Sum_traverse GHC.Base.id. -Local Definition Traversable__Sum_sequence +#[local] Definition Traversable__Sum_sequence : forall {m : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Monad m}, @@ -646,6 +1022,7 @@ Local Definition Traversable__Sum_sequence fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => Traversable__Sum_sequenceA. +#[global] Program Instance Traversable__Sum : Traversable Data.SemigroupInternal.Sum := fun _ k__ => k__ {| mapM__ := fun {m : Type -> Type} @@ -663,7 +1040,7 @@ Program Instance Traversable__Sum : Traversable Data.SemigroupInternal.Sum := `{GHC.Base.Applicative f} => Traversable__Sum_traverse |}. -Local Definition Traversable__Product_traverse +#[local] Definition Traversable__Product_traverse : forall {f : Type -> Type}, forall {a : Type}, forall {b : Type}, @@ -677,7 +1054,7 @@ Local Definition Traversable__Product_traverse Data.SemigroupInternal.Mk_Product Data.Functor.<$> f x end. -Local Definition Traversable__Product_mapM +#[local] Definition Traversable__Product_mapM : forall {m : Type -> Type}, forall {a : Type}, forall {b : Type}, @@ -687,7 +1064,7 @@ Local Definition Traversable__Product_mapM fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => Traversable__Product_traverse. -Local Definition Traversable__Product_sequenceA +#[local] Definition Traversable__Product_sequenceA : forall {f : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Applicative f}, @@ -695,7 +1072,7 @@ Local Definition Traversable__Product_sequenceA fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => Traversable__Product_traverse GHC.Base.id. -Local Definition Traversable__Product_sequence +#[local] Definition Traversable__Product_sequence : forall {m : Type -> Type}, forall {a : Type}, forall `{GHC.Base.Monad m}, @@ -703,6 +1080,7 @@ Local Definition Traversable__Product_sequence fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => Traversable__Product_sequenceA. +#[global] Program Instance Traversable__Product : Traversable Data.SemigroupInternal.Product := fun _ k__ => @@ -727,37 +1105,165 @@ Program Instance Traversable__Product (* Skipping instance `Data.Traversable.Traversable__Last' of class `Data.Traversable.Traversable' *) +#[local] Definition Traversable__Alt_traverse {inst_f : Type -> Type} + `{(Traversable inst_f)} + : forall {f : Type -> Type}, + forall {a : Type}, + forall {b : Type}, + forall `{GHC.Base.Applicative f}, + (a -> f b) -> + Data.SemigroupInternal.Alt inst_f a -> + f (Data.SemigroupInternal.Alt inst_f b) := + fun {f : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Applicative f} => + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | f, Data.SemigroupInternal.Mk_Alt x => + Data.SemigroupInternal.Mk_Alt Data.Functor.<$> traverse f x + end. + +#[local] Definition Traversable__Alt_mapM {inst_f : Type -> Type} `{(Traversable + inst_f)} + : forall {m : Type -> Type}, + forall {a : Type}, + forall {b : Type}, + forall `{GHC.Base.Monad m}, + (a -> m b) -> + Data.SemigroupInternal.Alt inst_f a -> + m (Data.SemigroupInternal.Alt inst_f b) := + fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => + Traversable__Alt_traverse. + +#[local] Definition Traversable__Alt_sequenceA {inst_f : Type -> Type} + `{(Traversable inst_f)} + : forall {f : Type -> Type}, + forall {a : Type}, + forall `{GHC.Base.Applicative f}, + Data.SemigroupInternal.Alt inst_f (f a) -> + f (Data.SemigroupInternal.Alt inst_f a) := + fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => + Traversable__Alt_traverse GHC.Base.id. + +#[local] Definition Traversable__Alt_sequence {inst_f : Type -> Type} + `{(Traversable inst_f)} + : forall {m : Type -> Type}, + forall {a : Type}, + forall `{GHC.Base.Monad m}, + Data.SemigroupInternal.Alt inst_f (m a) -> + m (Data.SemigroupInternal.Alt inst_f a) := + fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => + Traversable__Alt_sequenceA. + +#[global] +Program Instance Traversable__Alt {f : Type -> Type} `{(Traversable f)} + : Traversable (Data.SemigroupInternal.Alt f) := + fun _ k__ => + k__ {| mapM__ := fun {m : Type -> Type} + {a : Type} + {b : Type} + `{GHC.Base.Monad m} => + Traversable__Alt_mapM ; + sequence__ := fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => + Traversable__Alt_sequence ; + sequenceA__ := fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => + Traversable__Alt_sequenceA ; + traverse__ := fun {f : Type -> Type} + {a : Type} + {b : Type} + `{GHC.Base.Applicative f} => + Traversable__Alt_traverse |}. + +#[local] Definition Traversable__Ap_traverse {inst_f : Type -> Type} + `{(Traversable inst_f)} + : forall {f : Type -> Type}, + forall {a : Type}, + forall {b : Type}, + forall `{GHC.Base.Applicative f}, + (a -> f b) -> Data.Monoid.Ap inst_f a -> f (Data.Monoid.Ap inst_f b) := + fun {f : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Applicative f} => + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | f, Data.Monoid.Mk_Ap x => Data.Monoid.Mk_Ap Data.Functor.<$> traverse f x + end. + +#[local] Definition Traversable__Ap_mapM {inst_f : Type -> Type} `{(Traversable + inst_f)} + : forall {m : Type -> Type}, + forall {a : Type}, + forall {b : Type}, + forall `{GHC.Base.Monad m}, + (a -> m b) -> Data.Monoid.Ap inst_f a -> m (Data.Monoid.Ap inst_f b) := + fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => + Traversable__Ap_traverse. + +#[local] Definition Traversable__Ap_sequenceA {inst_f : Type -> Type} + `{(Traversable inst_f)} + : forall {f : Type -> Type}, + forall {a : Type}, + forall `{GHC.Base.Applicative f}, + Data.Monoid.Ap inst_f (f a) -> f (Data.Monoid.Ap inst_f a) := + fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => + Traversable__Ap_traverse GHC.Base.id. + +#[local] Definition Traversable__Ap_sequence {inst_f : Type -> Type} + `{(Traversable inst_f)} + : forall {m : Type -> Type}, + forall {a : Type}, + forall `{GHC.Base.Monad m}, + Data.Monoid.Ap inst_f (m a) -> m (Data.Monoid.Ap inst_f a) := + fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => + Traversable__Ap_sequenceA. + +#[global] +Program Instance Traversable__Ap {f : Type -> Type} `{(Traversable f)} + : Traversable (Data.Monoid.Ap f) := + fun _ k__ => + k__ {| mapM__ := fun {m : Type -> Type} + {a : Type} + {b : Type} + `{GHC.Base.Monad m} => + Traversable__Ap_mapM ; + sequence__ := fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => + Traversable__Ap_sequence ; + sequenceA__ := fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => + Traversable__Ap_sequenceA ; + traverse__ := fun {f : Type -> Type} + {a : Type} + {b : Type} + `{GHC.Base.Applicative f} => + Traversable__Ap_traverse |}. + (* Skipping instance `Data.Traversable.Traversable__ZipList' of class `Data.Traversable.Traversable' *) (* Skipping instance `Data.Traversable.Traversable__U1' of class `Data.Traversable.Traversable' *) -Definition for_ {t : Type -> Type} {f : Type -> Type} {a : Type} {b : Type} - `{Traversable t} `{GHC.Base.Applicative f} +#[global] Definition for_ {t : Type -> Type} {f : Type -> Type} {a : Type} {b + : Type} `{Traversable t} `{GHC.Base.Applicative f} : t a -> (a -> f b) -> f (t b) := GHC.Base.flip traverse. -Definition forM {t : Type -> Type} {m : Type -> Type} {a : Type} {b : Type} - `{Traversable t} `{GHC.Base.Monad m} +#[global] Definition forM {t : Type -> Type} {m : Type -> Type} {a : Type} {b + : Type} `{Traversable t} `{GHC.Base.Monad m} : t a -> (a -> m b) -> m (t b) := GHC.Base.flip mapM. -Definition mapAccumL {t : Type -> Type} {a : Type} {b : Type} {c : Type} - `{Traversable t} +#[global] Definition mapAccumL {t : Type -> Type} {a : Type} {b : Type} {c + : Type} `{Traversable t} : (a -> b -> (a * c)%type) -> a -> t b -> (a * t c)%type := fun f s t => Data.Functor.Utils.runStateL (traverse (Data.Functor.Utils.Mk_StateL GHC.Base.∘ GHC.Base.flip f) t) s. -Definition mapAccumR {t : Type -> Type} {a : Type} {b : Type} {c : Type} - `{Traversable t} +#[global] Definition mapAccumR {t : Type -> Type} {a : Type} {b : Type} {c + : Type} `{Traversable t} : (a -> b -> (a * c)%type) -> a -> t b -> (a * t c)%type := fun f s t => Data.Functor.Utils.runStateR (traverse (Data.Functor.Utils.Mk_StateR GHC.Base.∘ GHC.Base.flip f) t) s. -Definition fmapDefault {t : Type -> Type} {a : Type} {b : Type} `{Traversable t} +#[global] Definition fmapDefault {t : Type -> Type} {a : Type} {b : Type} + `{Traversable t} : (a -> b) -> t a -> t b := GHC.Prim.coerce (traverse : (a -> Data.Functor.Identity.Identity b) -> t a -> Data.Functor.Identity.Identity (t b)). @@ -770,11 +1276,15 @@ Definition fmapDefault {t : Type -> Type} {a : Type} {b : Type} `{Traversable t} Data.Functor.op_zlzdzg__ Data.Functor.Const.Const Data.Functor.Const.Mk_Const Data.Functor.Identity.Identity Data.Functor.Identity.Mk_Identity Data.Functor.Utils.Mk_StateL Data.Functor.Utils.Mk_StateR - Data.Functor.Utils.runStateL Data.Functor.Utils.runStateR Data.Proxy.Mk_Proxy - Data.Proxy.Proxy Data.SemigroupInternal.Dual Data.SemigroupInternal.Mk_Dual + Data.Functor.Utils.runStateL Data.Functor.Utils.runStateR Data.Monoid.Ap + Data.Monoid.Mk_Ap Data.Ord.Down Data.Ord.Mk_Down Data.Proxy.Mk_Proxy + Data.Proxy.Proxy Data.SemigroupInternal.Alt Data.SemigroupInternal.Dual + Data.SemigroupInternal.Mk_Alt Data.SemigroupInternal.Mk_Dual Data.SemigroupInternal.Mk_Product Data.SemigroupInternal.Mk_Sum Data.SemigroupInternal.Product Data.SemigroupInternal.Sum GHC.Base.Applicative GHC.Base.Functor GHC.Base.Monad GHC.Base.NEcons GHC.Base.NonEmpty GHC.Base.flip GHC.Base.fmap GHC.Base.foldr GHC.Base.id GHC.Base.liftA2 GHC.Base.op_z2218U__ - GHC.Base.pure GHC.Prim.coerce GHC.Tuple.pair2 GHC.Tuple.pair_type + GHC.Base.pure GHC.Generics.UAddr GHC.Generics.UChar GHC.Generics.UDouble + GHC.Generics.UFloat GHC.Generics.UInt GHC.Generics.UWord GHC.Prim.coerce + GHC.Tuple.pair2 GHC.Tuple.pair_type *) diff --git a/base/Data/Tuple.v b/base/Data/Tuple.v index 6c30b7214..edd6284b0 100644 --- a/base/Data/Tuple.v +++ b/base/Data/Tuple.v @@ -19,21 +19,22 @@ Require Coq.Program.Wf. (* Converted value declarations: *) -Definition fst {a : Type} {b : Type} : (a * b)%type -> a := +#[global] Definition fst {a : Type} {b : Type} : (a * b)%type -> a := fun '(pair x _) => x. -Definition snd {a : Type} {b : Type} : (a * b)%type -> b := +#[global] Definition snd {a : Type} {b : Type} : (a * b)%type -> b := fun '(pair _ y) => y. -Definition curry {a : Type} {b : Type} {c : Type} +#[global] Definition curry {a : Type} {b : Type} {c : Type} : ((a * b)%type -> c) -> a -> b -> c := fun f x y => f (pair x y). -Definition uncurry {a : Type} {b : Type} {c : Type} +#[global] Definition uncurry {a : Type} {b : Type} {c : Type} : (a -> b -> c) -> (a * b)%type -> c := fun f p => f (fst p) (snd p). -Definition swap {a : Type} {b : Type} : (a * b)%type -> (b * a)%type := +#[global] Definition swap {a : Type} {b : Type} + : (a * b)%type -> (b * a)%type := fun '(pair a b) => pair b a. (* External variables: diff --git a/base/Data/Type/Equality.h2ci b/base/Data/Type/Equality.h2ci new file mode 120000 index 000000000..db7e88915 --- /dev/null +++ b/base/Data/Type/Equality.h2ci @@ -0,0 +1 @@ +../../../examples/base-src/manual/Data/Type/Equality.h2ci \ No newline at end of file diff --git a/base/Data/Void.h2ci b/base/Data/Void.h2ci index 6ba409a06..1f3707981 100644 --- a/base/Data/Void.h2ci +++ b/base/Data/Void.h2ci @@ -1,2 +1,2 @@ constructors: - Data.Void.Void: ! '[]' + Data.Void.Void: '[]' diff --git a/base/Data/Void.v b/base/Data/Void.v index 28ec7d7a0..aaf7752d6 100644 --- a/base/Data/Void.v +++ b/base/Data/Void.v @@ -13,7 +13,6 @@ Require Coq.Program.Wf. (* Converted imports: *) Require GHC.Base. -Import GHC.Base.Notations. (* Converted type declarations: *) @@ -21,84 +20,27 @@ Inductive Void : Type :=. (* Converted value declarations: *) -Local Definition Eq___Void_op_zeze__ : Void -> Void -> bool := - fun arg_0__ arg_1__ => match arg_0__, arg_1__ with | _, z => true end. - -Local Definition Eq___Void_op_zsze__ : Void -> Void -> bool := - fun x y => negb (Eq___Void_op_zeze__ x y). - -Program Instance Eq___Void : GHC.Base.Eq_ Void := - fun _ k__ => - k__ {| GHC.Base.op_zeze____ := Eq___Void_op_zeze__ ; - GHC.Base.op_zsze____ := Eq___Void_op_zsze__ |}. - -(* Skipping all instances of class `Data.Data.Data', including - `Data.Void.Data__Void' *) - -(* Skipping all instances of class `GHC.Generics.Generic', including - `Data.Void.Generic__Void' *) - -Local Definition Ord__Void_compare : Void -> Void -> comparison := - fun arg_0__ arg_1__ => match arg_0__, arg_1__ with | _, z => Eq end. - -Local Definition Ord__Void_op_zl__ : Void -> Void -> bool := - fun x y => Ord__Void_compare x y GHC.Base.== Lt. - -Local Definition Ord__Void_op_zlze__ : Void -> Void -> bool := - fun x y => Ord__Void_compare x y GHC.Base./= Gt. - -Local Definition Ord__Void_op_zg__ : Void -> Void -> bool := - fun x y => Ord__Void_compare x y GHC.Base.== Gt. - -Local Definition Ord__Void_op_zgze__ : Void -> Void -> bool := - fun x y => Ord__Void_compare x y GHC.Base./= Lt. - -Local Definition Ord__Void_max : Void -> Void -> Void := - fun x y => if Ord__Void_op_zlze__ x y : bool then y else x. - -Local Definition Ord__Void_min : Void -> Void -> Void := - fun x y => if Ord__Void_op_zlze__ x y : bool then x else y. - -Program Instance Ord__Void : GHC.Base.Ord Void := - fun _ k__ => - k__ {| GHC.Base.op_zl____ := Ord__Void_op_zl__ ; - GHC.Base.op_zlze____ := Ord__Void_op_zlze__ ; - GHC.Base.op_zg____ := Ord__Void_op_zg__ ; - GHC.Base.op_zgze____ := Ord__Void_op_zgze__ ; - GHC.Base.compare__ := Ord__Void_compare ; - GHC.Base.max__ := Ord__Void_max ; - GHC.Base.min__ := Ord__Void_min |}. - -(* Skipping all instances of class `GHC.Read.Read', including - `Data.Void.Read__Void' *) - -(* Skipping all instances of class `GHC.Show.Show', including - `Data.Void.Show__Void' *) - -(* Skipping all instances of class `GHC.Arr.Ix', including +(* Skipping all instances of class `GHC.Ix.Ix', including `Data.Void.Ix__Void' *) -(* Skipping all instances of class `GHC.Exception.Exception', including +(* Skipping all instances of class `GHC.Exception.Type.Exception', including `Data.Void.Exception__Void' *) -Local Definition Semigroup__Void_op_zlzlzgzg__ : Void -> Void -> Void := +#[local] Definition Semigroup__Void_op_zlzlzgzg__ : Void -> Void -> Void := fun arg_0__ arg_1__ => match arg_0__, arg_1__ with | a, _ => a end. +#[global] Program Instance Semigroup__Void : GHC.Base.Semigroup Void := fun _ k__ => k__ {| GHC.Base.op_zlzlzgzg____ := Semigroup__Void_op_zlzlzgzg__ |}. -Definition absurd {a : Type} : Void -> a := +#[global] Definition absurd {a : Type} : Void -> a := fun a => match a with end. -Definition vacuous {f : Type -> Type} {a : Type} `{GHC.Base.Functor f} +#[global] Definition vacuous {f : Type -> Type} {a : Type} `{GHC.Base.Functor f} : f Void -> f a := GHC.Base.fmap absurd. (* External variables: - Eq Gt Lt Type bool comparison negb true GHC.Base.Eq_ GHC.Base.Functor - GHC.Base.Ord GHC.Base.Semigroup GHC.Base.compare__ GHC.Base.fmap GHC.Base.max__ - GHC.Base.min__ GHC.Base.op_zeze__ GHC.Base.op_zeze____ GHC.Base.op_zg____ - GHC.Base.op_zgze____ GHC.Base.op_zl____ GHC.Base.op_zlze____ - GHC.Base.op_zlzlzgzg____ GHC.Base.op_zsze__ GHC.Base.op_zsze____ + Type GHC.Base.Functor GHC.Base.Semigroup GHC.Base.fmap GHC.Base.op_zlzlzgzg____ *) diff --git a/base/GHC/Base.h2ci b/base/GHC/Base.h2ci index f85508bba..ccc427a06 100644 --- a/base/GHC/Base.h2ci +++ b/base/GHC/Base.h2ci @@ -1,69 +1,12 @@ -superclassCount: - GHC.Base.Monoid: '1' - GHC.Base.Functor: '0' - GHC.Base.Applicative: '1' - GHC.Base.Semigroup: '0' - GHC.Base.Monad: '2' -defaultMethods: - GHC.Base.Monoid: fromList [(Qualified "GHC.Base" "mappend",Qualid (Qualified "GHC.Base" - "op_zlzlzgzg__")),(Qualified "GHC.Base" "mconcat",App (App (Qualid (Qualified - "GHC.Base" "foldr")) (PosArg (Qualid (Qualified "GHC.Base" "mappend")) :| [])) - (PosArg (Qualid (Qualified "GHC.Base" "mempty")) :| []))] - GHC.Base.Functor: fromList [(Qualified "GHC.Base" "op_zlzd__",App (Qualid (Qualified - "GHC.Base" "op_z2218U__")) (PosArg (Qualid (Qualified "GHC.Base" "fmap")) :| [PosArg - (Qualid (Qualified "GHC.Base" "const"))]))] - GHC.Base.Applicative: fromList [(Qualified "GHC.Base" "liftA2",Fun (ExplicitBinder - (Ident (Bare "f")) :| [ExplicitBinder (Ident (Bare "x"))]) (App (Qualid (Qualified - "GHC.Base" "op_zlztzg__")) (PosArg (Parens (App (App (Qualid (Qualified "GHC.Base" - "fmap")) (PosArg (Qualid (Bare "f")) :| [])) (PosArg (Qualid (Bare "x")) :| []))) - :| []))),(Qualified "GHC.Base" "op_zlzt__",App (Qualid (Qualified "GHC.Base" "liftA2")) - (PosArg (Qualid (Qualified "GHC.Base" "const")) :| [])),(Qualified "GHC.Base" - "op_zlztzg__",App (Qualid (Qualified "GHC.Base" "liftA2")) (PosArg (Qualid (Qualified - "GHC.Base" "id")) :| [])),(Qualified "GHC.Base" "op_ztzg__",Fun (ExplicitBinder - (Ident (Bare "a1")) :| [ExplicitBinder (Ident (Bare "a2"))]) (App (Qualid (Qualified - "GHC.Base" "op_zlztzg__")) (PosArg (Parens (App (Qualid (Qualified "GHC.Base" - "op_zlzd__")) (PosArg (Qualid (Qualified "GHC.Base" "id")) :| [PosArg (Qualid - (Bare "a1"))]))) :| [PosArg (Qualid (Bare "a2"))])))] - GHC.Base.Semigroup: fromList [(Qualified "GHC.Base" "sconcat",Fun (ExplicitBinder - (Ident (Bare "arg_0__")) :| []) (Match (MatchItem (Qualid (Bare "arg_0__")) Nothing - Nothing :| []) Nothing [Equation (MultPattern (ArgsPat (Qualified "GHC.Base" "NEcons") - [QualidPat (Bare "a"),QualidPat (Bare "as_")] :| []) :| []) (Let (Bare "go") [] - Nothing (Fix (FixOne (FixBody (Bare "go") (ExplicitBinder (Ident (Bare "arg_1__")) - :| [ExplicitBinder (Ident (Bare "arg_2__"))]) Nothing Nothing (Match (MatchItem - (Qualid (Bare "arg_1__")) Nothing Nothing :| [MatchItem (Qualid (Bare "arg_2__")) - Nothing Nothing]) Nothing [Equation (MultPattern (QualidPat (Bare "b") :| [ArgsPat - (Bare "cons") [QualidPat (Bare "c"),QualidPat (Bare "cs")]]) :| []) (App (Qualid - (Qualified "GHC.Base" "op_zlzlzgzg__")) (PosArg (Qualid (Bare "b")) :| [PosArg - (App (App (Qualid (Bare "go")) (PosArg (Qualid (Bare "c")) :| [])) (PosArg (Qualid - (Bare "cs")) :| []))])),Equation (MultPattern (QualidPat (Bare "b") :| [ArgsPat - (Bare "nil") []]) :| []) (Qualid (Bare "b"))])))) (App (App (Qualid (Bare "go")) - (PosArg (Qualid (Bare "a")) :| [])) (PosArg (Qualid (Bare "as_")) :| [])))])),(Qualified - "GHC.Base" "stimes",Qualid (Qualified "Data.SemigroupInternal" "stimesDefault"))] - GHC.Base.Monad: fromList [(Qualified "GHC.Base" "fail",Fun (ExplicitBinder (Ident - (Bare "s")) :| []) (App (Qualid (Qualified "GHC.Err" "errorWithoutStackTrace")) - (PosArg (Qualid (Bare "s")) :| []))),(Qualified "GHC.Base" "op_zgzg__",Fun (ExplicitBinder - (Ident (Bare "m")) :| [ExplicitBinder (Ident (Bare "k"))]) (App (Qualid (Qualified - "GHC.Base" "op_zgzgze__")) (PosArg (Qualid (Bare "m")) :| [PosArg (Fun (ExplicitBinder - (Ident (Bare "arg_0__")) :| []) (Qualid (Bare "k")))]))),(Qualified "GHC.Base" - "return_",Qualid (Qualified "GHC.Base" "pure"))] classTypes: - GHC.Base.Monoid: fromList [] GHC.Base.Functor: fromList [] GHC.Base.Applicative: fromList [] GHC.Base.Semigroup: fromList [] GHC.Base.Monad: fromList [] -constructors: - GHC.Base.NonEmpty: ! '[Qualified "GHC.Base" "NEcons"]' + GHC.Base.Monoid: fromList [] constructorFields: GHC.Base.NEcons: NonRecordFields 2 classDefns: - GHC.Base.Monoid: ClassDefinition (Qualified "GHC.Base" "Monoid") [Typed Ungeneralizable - Explicit (Ident (Bare "a") :| []) (Qualid (Bare "Type")),Generalized Implicit - (App (Qualid (Qualified "GHC.Base" "Semigroup")) (PosArg (Qualid (Bare "a")) :| - []))] Nothing [(Qualified "GHC.Base" "mappend",Arrow (Qualid (Bare "a")) (Arrow - (Qualid (Bare "a")) (Qualid (Bare "a")))),(Qualified "GHC.Base" "mconcat",Arrow - (App (Qualid (Bare "list")) (PosArg (Qualid (Bare "a")) :| [])) (Qualid (Bare - "a"))),(Qualified "GHC.Base" "mempty",Qualid (Bare "a"))] GHC.Base.Functor: ClassDefinition (Qualified "GHC.Base" "Functor") [Typed Ungeneralizable Explicit (Ident (Bare "f") :| []) (Arrow (Qualid (Bare "Type")) (Qualid (Bare "Type")))] Nothing [(Qualified "GHC.Base" "fmap",Forall (Typed Ungeneralizable @@ -122,5 +65,60 @@ classDefns: (Bare "b")) :| [])))))),(Qualified "GHC.Base" "return_",Forall (Typed Ungeneralizable Implicit (Ident (Bare "a") :| []) (Qualid (Bare "Type")) :| []) (Arrow (Qualid (Bare "a")) (App (Qualid (Bare "m")) (PosArg (Qualid (Bare "a")) :| []))))] + GHC.Base.Monoid: ClassDefinition (Qualified "GHC.Base" "Monoid") [Typed Ungeneralizable + Explicit (Ident (Bare "a") :| []) (Qualid (Bare "Type")),Generalized Implicit + (App (Qualid (Qualified "GHC.Base" "Semigroup")) (PosArg (Qualid (Bare "a")) :| + []))] Nothing [(Qualified "GHC.Base" "mappend",Arrow (Qualid (Bare "a")) (Arrow + (Qualid (Bare "a")) (Qualid (Bare "a")))),(Qualified "GHC.Base" "mconcat",Arrow + (App (Qualid (Bare "list")) (PosArg (Qualid (Bare "a")) :| [])) (Qualid (Bare + "a"))),(Qualified "GHC.Base" "mempty",Qualid (Bare "a"))] constructorTypes: GHC.Base.NEcons: Qualified "GHC.Base" "NonEmpty" +superclassCount: + GHC.Base.Functor: '0' + GHC.Base.Applicative: '1' + GHC.Base.Semigroup: '0' + GHC.Base.Monad: '2' + GHC.Base.Monoid: '1' +defaultMethods: + GHC.Base.Functor: fromList [(Qualified "GHC.Base" "op_zlzd__",App (Qualid (Qualified + "GHC.Base" "op_z2218U__")) (PosArg (Qualid (Qualified "GHC.Base" "fmap")) :| [PosArg + (Qualid (Qualified "GHC.Base" "const"))]))] + GHC.Base.Applicative: fromList [(Qualified "GHC.Base" "liftA2",Fun (ExplicitBinder + (Ident (Bare "f")) :| [ExplicitBinder (Ident (Bare "x"))]) (App (Qualid (Qualified + "GHC.Base" "op_zlztzg__")) (PosArg (Parens (App (App (Qualid (Qualified "GHC.Base" + "fmap")) (PosArg (Qualid (Bare "f")) :| [])) (PosArg (Qualid (Bare "x")) :| []))) + :| []))),(Qualified "GHC.Base" "op_zlzt__",App (Qualid (Qualified "GHC.Base" "liftA2")) + (PosArg (Qualid (Qualified "GHC.Base" "const")) :| [])),(Qualified "GHC.Base" + "op_zlztzg__",App (Qualid (Qualified "GHC.Base" "liftA2")) (PosArg (Qualid (Qualified + "GHC.Base" "id")) :| [])),(Qualified "GHC.Base" "op_ztzg__",Fun (ExplicitBinder + (Ident (Bare "a1")) :| [ExplicitBinder (Ident (Bare "a2"))]) (App (Qualid (Qualified + "GHC.Base" "op_zlztzg__")) (PosArg (Parens (App (Qualid (Qualified "GHC.Base" + "op_zlzd__")) (PosArg (Qualid (Qualified "GHC.Base" "id")) :| [PosArg (Qualid + (Bare "a1"))]))) :| [PosArg (Qualid (Bare "a2"))])))] + GHC.Base.Semigroup: fromList [(Qualified "GHC.Base" "sconcat",Fun (ExplicitBinder + (Ident (Bare "arg_0__")) :| []) (Match (MatchItem (Qualid (Bare "arg_0__")) Nothing + Nothing :| []) Nothing [Equation (MultPattern (ArgsPat (Qualified "GHC.Base" "NEcons") + [QualidPat (Bare "a"),QualidPat (Bare "as_")] :| []) :| []) (Let (Bare "go") [] + Nothing (Fix (FixOne (FixBody (Bare "go") (ExplicitBinder (Ident (Bare "arg_1__")) + :| [ExplicitBinder (Ident (Bare "arg_2__"))]) Nothing Nothing (Match (MatchItem + (Qualid (Bare "arg_1__")) Nothing Nothing :| [MatchItem (Qualid (Bare "arg_2__")) + Nothing Nothing]) Nothing [Equation (MultPattern (QualidPat (Bare "b") :| [ArgsPat + (Bare "cons") [QualidPat (Bare "c"),QualidPat (Bare "cs")]]) :| []) (App (Qualid + (Qualified "GHC.Base" "op_zlzlzgzg__")) (PosArg (Qualid (Bare "b")) :| [PosArg + (App (App (Qualid (Bare "go")) (PosArg (Qualid (Bare "c")) :| [])) (PosArg (Qualid + (Bare "cs")) :| []))])),Equation (MultPattern (QualidPat (Bare "b") :| [ArgsPat + (Bare "nil") []]) :| []) (Qualid (Bare "b"))])))) (App (App (Qualid (Bare "go")) + (PosArg (Qualid (Bare "a")) :| [])) (PosArg (Qualid (Bare "as_")) :| [])))])),(Qualified + "GHC.Base" "stimes",Qualid (Qualified "Data.SemigroupInternal" "stimesDefault"))] + GHC.Base.Monad: fromList [(Qualified "GHC.Base" "op_zgzg__",Fun (ExplicitBinder + (Ident (Bare "m")) :| [ExplicitBinder (Ident (Bare "k"))]) (App (Qualid (Qualified + "GHC.Base" "op_zgzgze__")) (PosArg (Qualid (Bare "m")) :| [PosArg (Fun (ExplicitBinder + (Ident (Bare "arg_0__")) :| []) (Qualid (Bare "k")))]))),(Qualified "GHC.Base" + "return_",Qualid (Qualified "GHC.Base" "pure"))] + GHC.Base.Monoid: fromList [(Qualified "GHC.Base" "mappend",Qualid (Qualified "GHC.Base" + "op_zlzlzgzg__")),(Qualified "GHC.Base" "mconcat",App (App (Qualid (Qualified + "GHC.Base" "foldr")) (PosArg (Qualid (Qualified "GHC.Base" "mappend")) :| [])) + (PosArg (Qualid (Qualified "GHC.Base" "mempty")) :| []))] +constructors: + GHC.Base.NonEmpty: '[Qualified "GHC.Base" "NEcons"]' diff --git a/base/GHC/Base.v b/base/GHC/Base.v index 87a365222..1b29df1f3 100644 --- a/base/GHC/Base.v +++ b/base/GHC/Base.v @@ -22,7 +22,7 @@ Require GHC.Tuple. Record Semigroup__Dict (a : Type) := Semigroup__Dict_Build { op_zlzlzgzg____ : a -> a -> a }. -Definition Semigroup (a : Type) := +#[global] Definition Semigroup (a : Type) := forall r__, (Semigroup__Dict a -> r__) -> r__. Existing Class Semigroup. @@ -31,7 +31,7 @@ Record Monoid__Dict (a : Type) := Monoid__Dict_Build { mconcat__ : list a -> a ; mempty__ : a }. -Definition op_zlzlzgzg__ `{g__0__ : Semigroup a} : a -> a -> a := +#[global] Definition op_zlzlzgzg__ `{g__0__ : Semigroup a} : a -> a -> a := g__0__ _ (op_zlzlzgzg____ a). Notation "'_<<>>_'" := (op_zlzlzgzg__). @@ -40,24 +40,24 @@ Infix "<<>>" := (_<<>>_) (at level 99). Inductive NonEmpty a : Type := | NEcons : a -> list a -> NonEmpty a. -Definition Monoid (a : Type) `{Semigroup a} := +#[global] Definition Monoid (a : Type) `{Semigroup a} := forall r__, (Monoid__Dict a -> r__) -> r__. Existing Class Monoid. -Definition mappend `{g__0__ : Monoid a} : a -> a -> a := +#[global] Definition mappend `{g__0__ : Monoid a} : a -> a -> a := g__0__ _ (mappend__ a). -Definition mconcat `{g__0__ : Monoid a} : list a -> a := +#[global] Definition mconcat `{g__0__ : Monoid a} : list a -> a := g__0__ _ (mconcat__ a). -Definition mempty `{g__0__ : Monoid a} : a := +#[global] Definition mempty `{g__0__ : Monoid a} : a := g__0__ _ (mempty__ a). Record Functor__Dict (f : Type -> Type) := Functor__Dict_Build { fmap__ : forall {a : Type}, forall {b : Type}, (a -> b) -> f a -> f b ; op_zlzd____ : forall {a : Type}, forall {b : Type}, a -> f b -> f a }. -Definition Functor (f : Type -> Type) := +#[global] Definition Functor (f : Type -> Type) := forall r__, (Functor__Dict f -> r__) -> r__. Existing Class Functor. @@ -68,11 +68,11 @@ Record Applicative__Dict (f : Type -> Type) := Applicative__Dict_Build { op_ztzg____ : forall {a : Type}, forall {b : Type}, f a -> f b -> f b ; pure__ : forall {a : Type}, a -> f a }. -Definition fmap `{g__0__ : Functor f} +#[global] Definition fmap `{g__0__ : Functor f} : forall {a : Type}, forall {b : Type}, (a -> b) -> f a -> f b := g__0__ _ (fmap__ f). -Definition op_zlzd__ `{g__0__ : Functor f} +#[global] Definition op_zlzd__ `{g__0__ : Functor f} : forall {a : Type}, forall {b : Type}, a -> f b -> f a := g__0__ _ (op_zlzd____ f). @@ -80,24 +80,25 @@ Notation "'_<$_'" := (op_zlzd__). Infix "<$" := (_<$_) (at level 99). -Definition Applicative (f : Type -> Type) `{Functor f} := +#[global] Definition Applicative (f : Type -> Type) `{Functor f} := forall r__, (Applicative__Dict f -> r__) -> r__. Existing Class Applicative. -Definition liftA2 `{g__0__ : Applicative f} +#[global] Definition liftA2 `{g__0__ : Applicative f} : forall {a : Type}, forall {b : Type}, forall {c : Type}, (a -> b -> c) -> f a -> f b -> f c := g__0__ _ (liftA2__ f). -Definition op_zlztzg__ `{g__0__ : Applicative f} +#[global] Definition op_zlztzg__ `{g__0__ : Applicative f} : forall {a : Type}, forall {b : Type}, f (a -> b) -> f a -> f b := g__0__ _ (op_zlztzg____ f). -Definition op_ztzg__ `{g__0__ : Applicative f} +#[global] Definition op_ztzg__ `{g__0__ : Applicative f} : forall {a : Type}, forall {b : Type}, f a -> f b -> f b := g__0__ _ (op_ztzg____ f). -Definition pure `{g__0__ : Applicative f} : forall {a : Type}, a -> f a := +#[global] Definition pure `{g__0__ : Applicative f} + : forall {a : Type}, a -> f a := g__0__ _ (pure__ f). Notation "'_<*>_'" := (op_zlztzg__). @@ -113,19 +114,20 @@ Record Monad__Dict (m : Type -> Type) := Monad__Dict_Build { op_zgzgze____ : forall {a : Type}, forall {b : Type}, m a -> (a -> m b) -> m b ; return___ : forall {a : Type}, a -> m a }. -Definition Monad (m : Type -> Type) `{Applicative m} := +#[global] Definition Monad (m : Type -> Type) `{Applicative m} := forall r__, (Monad__Dict m -> r__) -> r__. Existing Class Monad. -Definition op_zgzg__ `{g__0__ : Monad m} +#[global] Definition op_zgzg__ `{g__0__ : Monad m} : forall {a : Type}, forall {b : Type}, m a -> m b -> m b := g__0__ _ (op_zgzg____ m). -Definition op_zgzgze__ `{g__0__ : Monad m} +#[global] Definition op_zgzgze__ `{g__0__ : Monad m} : forall {a : Type}, forall {b : Type}, m a -> (a -> m b) -> m b := g__0__ _ (op_zgzgze____ m). -Definition return_ `{g__0__ : Monad m} : forall {a : Type}, a -> m a := +#[global] Definition return_ `{g__0__ : Monad m} + : forall {a : Type}, a -> m a := g__0__ _ (return___ m). Notation "'_>>_'" := (op_zgzg__). @@ -295,11 +297,13 @@ Infix ">=" := (op_zgze__) (no associativity, at level 70). (*********** Eq/Ord for primitive types **************************) +#[global] Instance Eq_Int___ : Eq_ Int := fun _ k => k {| op_zeze____ := fun x y => (x =? y)%Z; op_zsze____ := fun x y => negb (x =? y)%Z; |}. +#[global] Instance Ord_Int___ : Ord Int := fun _ k => k {| op_zl____ := fun x y => (x (x <=? y)%Z; @@ -310,11 +314,13 @@ Instance Ord_Int___ : Ord Int := fun _ k => k {| min__ := Z.min%Z; |}. +#[global] Instance Eq_Integer___ : Eq_ Integer := fun _ k => k {| op_zeze____ := fun x y => (x =? y)%Z; op_zsze____ := fun x y => negb (x =? y)%Z; |}. +#[global] Instance Ord_Integer___ : Ord Integer := fun _ k => k {| op_zl____ := fun x y => (x (x <=? y)%Z; @@ -325,11 +331,13 @@ Instance Ord_Integer___ : Ord Integer := fun _ k => k {| min__ := Z.min%Z; |}. +#[global] Instance Eq_Word___ : Eq_ Word := fun _ k => k {| op_zeze____ := fun x y => (x =? y)%N; op_zsze____ := fun x y => negb (x =? y)%N; |}. +#[global] Instance Ord_Word___ : Ord Word := fun _ k => k {| op_zl____ := fun x y => (x (x <=? y)%N; @@ -340,11 +348,13 @@ Instance Ord_Word___ : Ord Word := fun _ k => k {| min__ := N.min%N; |}. +#[global] Instance Eq_Char___ : Eq_ Char := fun _ k => k {| op_zeze____ := fun x y => (x =? y)%N; op_zsze____ := fun x y => negb (x =? y)%N; |}. +#[global] Instance Ord_Char___ : Ord Char := fun _ k => k {| op_zl____ := fun x y => (x (x <=? y)%N; @@ -355,6 +365,7 @@ Instance Ord_Char___ : Ord Char := fun _ k => k {| min__ := N.min%N; |}. +#[global] Instance Eq_bool___ : Eq_ bool := fun _ k => k {| op_zeze____ := eqb; op_zsze____ := fun x y => negb (eqb x y); @@ -368,6 +379,7 @@ Definition compare_bool (b1:bool)(b2:bool) : comparison := | false , true => Lt end. +#[global] Instance Ord_bool___ : Ord bool := fun _ k => k {| op_zl____ := fun x y => andb (negb x) y; op_zlze____ := fun x y => orb (negb x) y; @@ -378,11 +390,13 @@ Instance Ord_bool___ : Ord bool := fun _ k => k {| min__ := andb |}. +#[global] Instance Eq_unit___ : Eq_ unit := fun _ k => k {| op_zeze____ := fun x y => true; op_zsze____ := fun x y => false; |}. +#[global] Instance Ord_unit___ : Ord unit := fun _ k => k {| op_zl____ := fun x y => false; op_zlze____ := fun x y => true; @@ -401,6 +415,7 @@ Definition eq_comparison (x : comparison) (y: comparison) := | _ , _ => false end. +#[global] Instance Eq_comparison___ : Eq_ comparison := fun _ k => k {| op_zeze____ := eq_comparison; @@ -435,6 +450,7 @@ Definition ord_default {a} (comp : a -> a -> comparison) `{Eq_ a} : Ord a := | _ => x end)). +#[global] Instance Ord_comparison___ : Ord comparison := ord_default compare_comparison. Definition eq_pair {t1} {t2} `{Eq_ t1} `{Eq_ t2} (a b : (t1 * t2)) := @@ -453,11 +469,13 @@ Definition compare_pair {t1} {t2} `{Ord t1} `{Ord t2} (a b : (t1 * t2)) := end end. +#[global] Instance Eq_pair___ {a} {b} `{Eq_ a} `{Eq_ b} : Eq_ (a * b) := fun _ k => k {| op_zeze____ := eq_pair; op_zsze____ := fun x y => negb (eq_pair x y) |}. +#[global] Instance Ord_pair___ {a} {b} `{Ord a} `{Ord b} : Ord (a * b) := ord_default compare_pair. @@ -483,11 +501,13 @@ Fixpoint compare_list {a} `{Ord a} (xs : list a) (ys : list a) : comparison := end end. +#[global] Instance Eq_list {a} `{Eq_ a} : Eq_ (list a) := fun _ k => k {| op_zeze____ := eqlist; op_zsze____ := fun x y => negb (eqlist x y) |}. +#[global] Instance Ord_list {a} `{Ord a}: Ord (list a) := ord_default compare_list. @@ -557,144 +577,67 @@ End ManualNotations. (* Converted value declarations: *) -Local Definition Eq___option_op_zeze__ {inst_a : Type} `{Eq_ inst_a} - : option inst_a -> option inst_a -> bool := - fun arg_0__ arg_1__ => - match arg_0__, arg_1__ with - | None, None => true - | Some a1, Some b1 => ((a1 == b1)) - | _, _ => false - end. - -Local Definition Eq___option_op_zsze__ {inst_a : Type} `{Eq_ inst_a} - : option inst_a -> option inst_a -> bool := - fun x y => negb (Eq___option_op_zeze__ x y). - -Program Instance Eq___option {a : Type} `{Eq_ a} : Eq_ (option a) := - fun _ k__ => - k__ {| op_zeze____ := Eq___option_op_zeze__ ; - op_zsze____ := Eq___option_op_zsze__ |}. - -Local Definition Ord__option_op_zl__ {inst_a : Type} `{Ord inst_a} - : option inst_a -> option inst_a -> bool := - fun a b => - match a with - | None => match b with | None => false | _ => true end - | Some a1 => match b with | Some b1 => (a1 < b1) | _ => false end - end. - -Local Definition Ord__option_op_zlze__ {inst_a : Type} `{Ord inst_a} - : option inst_a -> option inst_a -> bool := - fun a b => negb (Ord__option_op_zl__ b a). - -Local Definition Ord__option_op_zg__ {inst_a : Type} `{Ord inst_a} - : option inst_a -> option inst_a -> bool := - fun a b => Ord__option_op_zl__ b a. - -Local Definition Ord__option_op_zgze__ {inst_a : Type} `{Ord inst_a} - : option inst_a -> option inst_a -> bool := - fun a b => negb (Ord__option_op_zl__ a b). - -Local Definition Ord__option_compare {inst_a : Type} `{Ord inst_a} - : option inst_a -> option inst_a -> comparison := - fun a b => - match a with - | None => match b with | None => Eq | _ => Lt end - | Some a1 => match b with | Some b1 => (compare a1 b1) | _ => Gt end - end. - -Local Definition Ord__option_max {inst_a : Type} `{Ord inst_a} - : option inst_a -> option inst_a -> option inst_a := - fun x y => if Ord__option_op_zlze__ x y : bool then y else x. - -Local Definition Ord__option_min {inst_a : Type} `{Ord inst_a} - : option inst_a -> option inst_a -> option inst_a := - fun x y => if Ord__option_op_zlze__ x y : bool then x else y. - -Program Instance Ord__option {a : Type} `{Ord a} : Ord (option a) := - fun _ k__ => - k__ {| op_zl____ := Ord__option_op_zl__ ; - op_zlze____ := Ord__option_op_zlze__ ; - op_zg____ := Ord__option_op_zg__ ; - op_zgze____ := Ord__option_op_zgze__ ; - compare__ := Ord__option_compare ; - max__ := Ord__option_max ; - min__ := Ord__option_min |}. - -Local Definition Eq___NonEmpty_op_zeze__ {inst_a : Type} `{Eq_ inst_a} - : NonEmpty inst_a -> NonEmpty inst_a -> bool := - fun arg_0__ arg_1__ => - match arg_0__, arg_1__ with - | NEcons a1 a2, NEcons b1 b2 => (andb ((a1 == b1)) ((a2 == b2))) - end. - -Local Definition Eq___NonEmpty_op_zsze__ {inst_a : Type} `{Eq_ inst_a} - : NonEmpty inst_a -> NonEmpty inst_a -> bool := - fun x y => negb (Eq___NonEmpty_op_zeze__ x y). - -Program Instance Eq___NonEmpty {a : Type} `{Eq_ a} : Eq_ (NonEmpty a) := - fun _ k__ => - k__ {| op_zeze____ := Eq___NonEmpty_op_zeze__ ; - op_zsze____ := Eq___NonEmpty_op_zsze__ |}. - -(* Skipping instance `GHC.Base.Ord__NonEmpty' of class `GHC.Base.Ord' *) - -Local Definition Semigroup__list_op_zlzlzgzg__ {inst_a : Type} +#[local] Definition Semigroup__list_op_zlzlzgzg__ {inst_a : Type} : list inst_a -> list inst_a -> list inst_a := Coq.Init.Datatypes.app. +#[global] Program Instance Semigroup__list {a : Type} : Semigroup (list a) := fun _ k__ => k__ {| op_zlzlzgzg____ := Semigroup__list_op_zlzlzgzg__ |}. -Local Definition Monoid__list_mappend {inst_a : Type} +#[local] Definition Monoid__list_mappend {inst_a : Type} : list inst_a -> list inst_a -> list inst_a := _<<>>_. -Local Definition Monoid__list_mconcat {inst_a : Type} +#[local] Definition Monoid__list_mconcat {inst_a : Type} : list (list inst_a) -> list inst_a := fun xss => Coq.Lists.List.flat_map (fun xs => Coq.Lists.List.flat_map (fun x => cons x nil) xs) xss. -Local Definition Monoid__list_mempty {inst_a : Type} : list inst_a := +#[local] Definition Monoid__list_mempty {inst_a : Type} : list inst_a := nil. +#[global] Program Instance Monoid__list {a : Type} : Monoid (list a) := fun _ k__ => k__ {| mappend__ := Monoid__list_mappend ; mconcat__ := Monoid__list_mconcat ; mempty__ := Monoid__list_mempty |}. -Local Definition Semigroup__NonEmpty_op_zlzlzgzg__ {inst_a : Type} +#[local] Definition Semigroup__NonEmpty_op_zlzlzgzg__ {inst_a : Type} : NonEmpty inst_a -> NonEmpty inst_a -> NonEmpty inst_a := fun arg_0__ arg_1__ => match arg_0__, arg_1__ with | NEcons a as_, NEcons b bs => NEcons a (Coq.Init.Datatypes.app as_ (cons b bs)) end. +#[global] Program Instance Semigroup__NonEmpty {a : Type} : Semigroup (NonEmpty a) := fun _ k__ => k__ {| op_zlzlzgzg____ := Semigroup__NonEmpty_op_zlzlzgzg__ |}. -Local Definition Semigroup__arrow_op_zlzlzgzg__ {inst_b : Type} {inst_a : Type} - `{Semigroup inst_b} +#[local] Definition Semigroup__arrow_op_zlzlzgzg__ {inst_b : Type} {inst_a + : Type} `{Semigroup inst_b} : (inst_a -> inst_b) -> (inst_a -> inst_b) -> inst_a -> inst_b := fun f g => fun x => f x <<>> g x. +#[global] Program Instance Semigroup__arrow {b : Type} {a : Type} `{Semigroup b} : Semigroup (a -> b) := fun _ k__ => k__ {| op_zlzlzgzg____ := Semigroup__arrow_op_zlzlzgzg__ |}. -Local Definition Monoid__arrow_mappend {inst_b : Type} {inst_a : Type} `{Monoid - inst_b} +#[local] Definition Monoid__arrow_mappend {inst_b : Type} {inst_a : Type} + `{Monoid inst_b} : (inst_a -> inst_b) -> (inst_a -> inst_b) -> inst_a -> inst_b := _<<>>_. -Local Definition Monoid__arrow_mempty {inst_b : Type} {inst_a : Type} `{Monoid - inst_b} +#[local] Definition Monoid__arrow_mempty {inst_b : Type} {inst_a : Type} + `{Monoid inst_b} : inst_a -> inst_b := fun arg_0__ => mempty. -Definition foldr {a : Type} {b : Type} : (a -> b -> b) -> b -> list a -> b := +#[global] Definition foldr {a : Type} {b : Type} + : (a -> b -> b) -> b -> list a -> b := fun k z => let fix go arg_0__ := match arg_0__ with @@ -703,11 +646,12 @@ Definition foldr {a : Type} {b : Type} : (a -> b -> b) -> b -> list a -> b := end in go. -Local Definition Monoid__arrow_mconcat {inst_b : Type} {inst_a : Type} `{Monoid - inst_b} +#[local] Definition Monoid__arrow_mconcat {inst_b : Type} {inst_a : Type} + `{Monoid inst_b} : list (inst_a -> inst_b) -> inst_a -> inst_b := foldr Monoid__arrow_mappend Monoid__arrow_mempty. +#[global] Program Instance Monoid__arrow {b : Type} {a : Type} `{Monoid b} : Monoid (a -> b) := fun _ k__ => @@ -715,21 +659,23 @@ Program Instance Monoid__arrow {b : Type} {a : Type} `{Monoid b} mconcat__ := Monoid__arrow_mconcat ; mempty__ := Monoid__arrow_mempty |}. -Local Definition Semigroup__unit_op_zlzlzgzg__ : unit -> unit -> unit := +#[local] Definition Semigroup__unit_op_zlzlzgzg__ : unit -> unit -> unit := fun arg_0__ arg_1__ => tt. +#[global] Program Instance Semigroup__unit : Semigroup unit := fun _ k__ => k__ {| op_zlzlzgzg____ := Semigroup__unit_op_zlzlzgzg__ |}. -Local Definition Monoid__unit_mappend : unit -> unit -> unit := +#[local] Definition Monoid__unit_mappend : unit -> unit -> unit := _<<>>_. -Local Definition Monoid__unit_mconcat : list unit -> unit := +#[local] Definition Monoid__unit_mconcat : list unit -> unit := fun arg_0__ => tt. -Local Definition Monoid__unit_mempty : unit := +#[local] Definition Monoid__unit_mempty : unit := tt. +#[global] Program Instance Monoid__unit : Monoid unit := fun _ k__ => k__ {| mappend__ := Monoid__unit_mappend ; @@ -760,7 +706,7 @@ Program Instance Monoid__unit : Monoid unit := (* Skipping instance `GHC.Base.Monoid__op_zt____op_zt____op_zt____op_zt____87' of class `GHC.Base.Monoid' *) -Local Definition Semigroup__comparison_op_zlzlzgzg__ +#[local] Definition Semigroup__comparison_op_zlzlzgzg__ : comparison -> comparison -> comparison := fun arg_0__ arg_1__ => match arg_0__, arg_1__ with @@ -769,26 +715,29 @@ Local Definition Semigroup__comparison_op_zlzlzgzg__ | Gt, _ => Gt end. +#[global] Program Instance Semigroup__comparison : Semigroup comparison := fun _ k__ => k__ {| op_zlzlzgzg____ := Semigroup__comparison_op_zlzlzgzg__ |}. -Local Definition Monoid__comparison_mappend +#[local] Definition Monoid__comparison_mappend : comparison -> comparison -> comparison := _<<>>_. -Local Definition Monoid__comparison_mempty : comparison := +#[local] Definition Monoid__comparison_mempty : comparison := Eq. -Local Definition Monoid__comparison_mconcat : list comparison -> comparison := +#[local] Definition Monoid__comparison_mconcat + : list comparison -> comparison := foldr Monoid__comparison_mappend Monoid__comparison_mempty. +#[global] Program Instance Monoid__comparison : Monoid comparison := fun _ k__ => k__ {| mappend__ := Monoid__comparison_mappend ; mconcat__ := Monoid__comparison_mconcat ; mempty__ := Monoid__comparison_mempty |}. -Local Definition Semigroup__option_op_zlzlzgzg__ {inst_a : Type} `{Semigroup +#[local] Definition Semigroup__option_op_zlzlzgzg__ {inst_a : Type} `{Semigroup inst_a} : option inst_a -> option inst_a -> option inst_a := fun arg_0__ arg_1__ => @@ -798,29 +747,32 @@ Local Definition Semigroup__option_op_zlzlzgzg__ {inst_a : Type} `{Semigroup | Some a, Some b => Some (a <<>> b) end. +#[global] Program Instance Semigroup__option {a : Type} `{Semigroup a} : Semigroup (option a) := fun _ k__ => k__ {| op_zlzlzgzg____ := Semigroup__option_op_zlzlzgzg__ |}. -Local Definition Monoid__option_mappend {inst_a : Type} `{Semigroup inst_a} +#[local] Definition Monoid__option_mappend {inst_a : Type} `{Semigroup inst_a} : option inst_a -> option inst_a -> option inst_a := _<<>>_. -Local Definition Monoid__option_mempty {inst_a : Type} `{Semigroup inst_a} +#[local] Definition Monoid__option_mempty {inst_a : Type} `{Semigroup inst_a} : option inst_a := None. -Local Definition Monoid__option_mconcat {inst_a : Type} `{Semigroup inst_a} +#[local] Definition Monoid__option_mconcat {inst_a : Type} `{Semigroup inst_a} : list (option inst_a) -> option inst_a := foldr Monoid__option_mappend Monoid__option_mempty. +#[global] Program Instance Monoid__option {a : Type} `{Semigroup a} : Monoid (option a) := fun _ k__ => k__ {| mappend__ := Monoid__option_mappend ; mconcat__ := Monoid__option_mconcat ; mempty__ := Monoid__option_mempty |}. -Local Definition Applicative__pair_type_liftA2 {inst_a : Type} `{Monoid inst_a} +#[local] Definition Applicative__pair_type_liftA2 {inst_a : Type} `{Monoid + inst_a} : forall {a : Type}, forall {b : Type}, forall {c : Type}, @@ -833,7 +785,7 @@ Local Definition Applicative__pair_type_liftA2 {inst_a : Type} `{Monoid inst_a} | f, pair u x, pair v y => pair (u <<>> v) (f x y) end. -Local Definition Applicative__pair_type_op_zlztzg__ {inst_a : Type} `{Monoid +#[local] Definition Applicative__pair_type_op_zlztzg__ {inst_a : Type} `{Monoid inst_a} : forall {a : Type}, forall {b : Type}, @@ -845,10 +797,10 @@ Local Definition Applicative__pair_type_op_zlztzg__ {inst_a : Type} `{Monoid | pair u f, pair v x => pair (u <<>> v) (f x) end. -Definition id {a : Type} : a -> a := +#[global] Definition id {a : Type} : a -> a := fun x => x. -Local Definition Functor__pair_type_fmap {inst_a : Type} +#[local] Definition Functor__pair_type_fmap {inst_a : Type} : forall {a : Type}, forall {b : Type}, (a -> b) -> GHC.Tuple.pair_type inst_a a -> GHC.Tuple.pair_type inst_a b := @@ -858,7 +810,7 @@ Local Definition Functor__pair_type_fmap {inst_a : Type} | f, pair x y => pair x (f y) end. -Definition op_z2218U__ {b : Type} {c : Type} {a : Type} +#[global] Definition op_z2218U__ {b : Type} {c : Type} {a : Type} : (b -> c) -> (a -> b) -> a -> c := fun f g => fun x => f (g x). @@ -866,22 +818,23 @@ Notation "'_∘_'" := (op_z2218U__). Infix "∘" := (_∘_) (left associativity, at level 40). -Definition const {a : Type} {b : Type} : a -> b -> a := +#[global] Definition const {a : Type} {b : Type} : a -> b -> a := fun arg_0__ arg_1__ => match arg_0__, arg_1__ with | x, _ => x end. -Local Definition Functor__pair_type_op_zlzd__ {inst_a : Type} +#[local] Definition Functor__pair_type_op_zlzd__ {inst_a : Type} : forall {a : Type}, forall {b : Type}, a -> GHC.Tuple.pair_type inst_a b -> GHC.Tuple.pair_type inst_a a := fun {a : Type} {b : Type} => Functor__pair_type_fmap ∘ const. +#[global] Program Instance Functor__pair_type {a : Type} : Functor (GHC.Tuple.pair_type a) := fun _ k__ => k__ {| fmap__ := fun {a : Type} {b : Type} => Functor__pair_type_fmap ; op_zlzd____ := fun {a : Type} {b : Type} => Functor__pair_type_op_zlzd__ |}. -Local Definition Applicative__pair_type_op_ztzg__ {inst_a : Type} `{Monoid +#[local] Definition Applicative__pair_type_op_ztzg__ {inst_a : Type} `{Monoid inst_a} : forall {a : Type}, forall {b : Type}, @@ -890,10 +843,11 @@ Local Definition Applicative__pair_type_op_ztzg__ {inst_a : Type} `{Monoid fun {a : Type} {b : Type} => fun a1 a2 => Applicative__pair_type_op_zlztzg__ (id <$ a1) a2. -Local Definition Applicative__pair_type_pure {inst_a : Type} `{Monoid inst_a} +#[local] Definition Applicative__pair_type_pure {inst_a : Type} `{Monoid inst_a} : forall {a : Type}, a -> GHC.Tuple.pair_type inst_a a := fun {a : Type} => fun x => pair mempty x. +#[global] Program Instance Applicative__pair_type {a : Type} `{Monoid a} : Applicative (GHC.Tuple.pair_type a) := fun _ k__ => @@ -904,11 +858,12 @@ Program Instance Applicative__pair_type {a : Type} `{Monoid a} op_ztzg____ := fun {a : Type} {b : Type} => Applicative__pair_type_op_ztzg__ ; pure__ := fun {a : Type} => Applicative__pair_type_pure |}. -Local Definition Monad__pair_type_return_ {inst_a : Type} `{Monoid inst_a} +#[local] Definition Monad__pair_type_return_ {inst_a : Type} `{Monoid inst_a} : forall {a : Type}, a -> GHC.Tuple.pair_type inst_a a := fun {a : Type} => pure. -Local Definition Monad__pair_type_op_zgzgze__ {inst_a : Type} `{Monoid inst_a} +#[local] Definition Monad__pair_type_op_zgzgze__ {inst_a : Type} `{Monoid + inst_a} : forall {a : Type}, forall {b : Type}, GHC.Tuple.pair_type inst_a a -> @@ -919,7 +874,7 @@ Local Definition Monad__pair_type_op_zgzgze__ {inst_a : Type} `{Monoid inst_a} | pair u a, k => let 'pair v b := k a in pair (u <<>> v) b end. -Local Definition Monad__pair_type_op_zgzg__ {inst_a : Type} `{Monoid inst_a} +#[local] Definition Monad__pair_type_op_zgzg__ {inst_a : Type} `{Monoid inst_a} : forall {a : Type}, forall {b : Type}, GHC.Tuple.pair_type inst_a a -> @@ -927,6 +882,7 @@ Local Definition Monad__pair_type_op_zgzg__ {inst_a : Type} `{Monoid inst_a} fun {a : Type} {b : Type} => fun m k => Monad__pair_type_op_zgzgze__ m (fun arg_0__ => k). +#[global] Program Instance Monad__pair_type {a : Type} `{Monoid a} : Monad (GHC.Tuple.pair_type a) := fun _ k__ => @@ -934,54 +890,298 @@ Program Instance Monad__pair_type {a : Type} `{Monoid a} op_zgzgze____ := fun {a : Type} {b : Type} => Monad__pair_type_op_zgzgze__ ; return___ := fun {a : Type} => Monad__pair_type_return_ |}. +#[local] Definition Functor__triple_type_fmap {inst_a : Type} {inst_b : Type} + : forall {a : Type}, + forall {b : Type}, + (a -> b) -> + GHC.Tuple.triple_type inst_a inst_b a -> + GHC.Tuple.triple_type inst_a inst_b b := + fun {a : Type} {b : Type} => + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | f, pair (pair a b) c => pair (pair a b) (f c) + end. + +#[local] Definition Functor__triple_type_op_zlzd__ {inst_a : Type} {inst_b + : Type} + : forall {a : Type}, + forall {b : Type}, + a -> + GHC.Tuple.triple_type inst_a inst_b b -> + GHC.Tuple.triple_type inst_a inst_b a := + fun {a : Type} {b : Type} => Functor__triple_type_fmap ∘ const. + +#[global] +Program Instance Functor__triple_type {a : Type} {b : Type} + : Functor (GHC.Tuple.triple_type a b) := + fun _ k__ => + k__ {| fmap__ := fun {a : Type} {b : Type} => Functor__triple_type_fmap ; + op_zlzd____ := fun {a : Type} {b : Type} => Functor__triple_type_op_zlzd__ |}. + +#[local] Definition Applicative__triple_type_op_zlztzg__ {inst_a : Type} {inst_b + : Type} `{Monoid inst_a} `{Monoid inst_b} + : forall {a : Type}, + forall {b : Type}, + GHC.Tuple.triple_type inst_a inst_b (a -> b) -> + GHC.Tuple.triple_type inst_a inst_b a -> + GHC.Tuple.triple_type inst_a inst_b b := + fun {a : Type} {b : Type} => + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | pair (pair a b) f, pair (pair a' b') x => + pair (pair (a <<>> a') (b <<>> b')) (f x) + end. + +#[local] Definition Applicative__triple_type_liftA2 {inst_a : Type} {inst_b + : Type} `{Monoid inst_a} `{Monoid inst_b} + : forall {a : Type}, + forall {b : Type}, + forall {c : Type}, + (a -> b -> c) -> + GHC.Tuple.triple_type inst_a inst_b a -> + GHC.Tuple.triple_type inst_a inst_b b -> + GHC.Tuple.triple_type inst_a inst_b c := + fun {a : Type} {b : Type} {c : Type} => + fun f x => Applicative__triple_type_op_zlztzg__ (fmap f x). + +#[local] Definition Applicative__triple_type_op_ztzg__ {inst_a : Type} {inst_b + : Type} `{Monoid inst_a} `{Monoid inst_b} + : forall {a : Type}, + forall {b : Type}, + GHC.Tuple.triple_type inst_a inst_b a -> + GHC.Tuple.triple_type inst_a inst_b b -> + GHC.Tuple.triple_type inst_a inst_b b := + fun {a : Type} {b : Type} => + fun a1 a2 => Applicative__triple_type_op_zlztzg__ (id <$ a1) a2. + +#[local] Definition Applicative__triple_type_pure {inst_a : Type} {inst_b + : Type} `{Monoid inst_a} `{Monoid inst_b} + : forall {a : Type}, a -> GHC.Tuple.triple_type inst_a inst_b a := + fun {a : Type} => fun x => pair (pair mempty mempty) x. + +#[global] +Program Instance Applicative__triple_type {a : Type} {b : Type} `{Monoid a} + `{Monoid b} + : Applicative (GHC.Tuple.triple_type a b) := + fun _ k__ => + k__ {| liftA2__ := fun {a : Type} {b : Type} {c : Type} => + Applicative__triple_type_liftA2 ; + op_zlztzg____ := fun {a : Type} {b : Type} => + Applicative__triple_type_op_zlztzg__ ; + op_ztzg____ := fun {a : Type} {b : Type} => Applicative__triple_type_op_ztzg__ ; + pure__ := fun {a : Type} => Applicative__triple_type_pure |}. + +#[local] Definition Monad__triple_type_op_zgzgze__ {inst_a : Type} {inst_b + : Type} `{Monoid inst_a} `{Monoid inst_b} + : forall {a : Type}, + forall {b : Type}, + GHC.Tuple.triple_type inst_a inst_b a -> + (a -> GHC.Tuple.triple_type inst_a inst_b b) -> + GHC.Tuple.triple_type inst_a inst_b b := + fun {a : Type} {b : Type} => + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | pair (pair u v) a, k => + let 'pair (pair u' v') b := k a in + pair (pair (u <<>> u') (v <<>> v')) b + end. + +#[local] Definition Monad__triple_type_op_zgzg__ {inst_a : Type} {inst_b : Type} + `{Monoid inst_a} `{Monoid inst_b} + : forall {a : Type}, + forall {b : Type}, + GHC.Tuple.triple_type inst_a inst_b a -> + GHC.Tuple.triple_type inst_a inst_b b -> + GHC.Tuple.triple_type inst_a inst_b b := + fun {a : Type} {b : Type} => + fun m k => Monad__triple_type_op_zgzgze__ m (fun arg_0__ => k). + +#[local] Definition Monad__triple_type_return_ {inst_a : Type} {inst_b : Type} + `{Monoid inst_a} `{Monoid inst_b} + : forall {a : Type}, a -> GHC.Tuple.triple_type inst_a inst_b a := + fun {a : Type} => pure. + +#[global] +Program Instance Monad__triple_type {a : Type} {b : Type} `{Monoid a} `{Monoid + b} + : Monad (GHC.Tuple.triple_type a b) := + fun _ k__ => + k__ {| op_zgzg____ := fun {a : Type} {b : Type} => + Monad__triple_type_op_zgzg__ ; + op_zgzgze____ := fun {a : Type} {b : Type} => Monad__triple_type_op_zgzgze__ ; + return___ := fun {a : Type} => Monad__triple_type_return_ |}. + +#[local] Definition Functor__quad_type_fmap {inst_a : Type} {inst_b : Type} + {inst_c : Type} + : forall {a : Type}, + forall {b : Type}, + (a -> b) -> + GHC.Tuple.quad_type inst_a inst_b inst_c a -> + GHC.Tuple.quad_type inst_a inst_b inst_c b := + fun {a : Type} {b : Type} => + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | f, pair (pair (pair a b) c) d => pair (pair (pair a b) c) (f d) + end. + +#[local] Definition Functor__quad_type_op_zlzd__ {inst_a : Type} {inst_b : Type} + {inst_c : Type} + : forall {a : Type}, + forall {b : Type}, + a -> + GHC.Tuple.quad_type inst_a inst_b inst_c b -> + GHC.Tuple.quad_type inst_a inst_b inst_c a := + fun {a : Type} {b : Type} => Functor__quad_type_fmap ∘ const. + +#[global] +Program Instance Functor__quad_type {a : Type} {b : Type} {c : Type} + : Functor (GHC.Tuple.quad_type a b c) := + fun _ k__ => + k__ {| fmap__ := fun {a : Type} {b : Type} => Functor__quad_type_fmap ; + op_zlzd____ := fun {a : Type} {b : Type} => Functor__quad_type_op_zlzd__ |}. + +#[local] Definition Applicative__quad_type_op_zlztzg__ {inst_a : Type} {inst_b + : Type} {inst_c : Type} `{Monoid inst_a} `{Monoid inst_b} `{Monoid inst_c} + : forall {a : Type}, + forall {b : Type}, + GHC.Tuple.quad_type inst_a inst_b inst_c (a -> b) -> + GHC.Tuple.quad_type inst_a inst_b inst_c a -> + GHC.Tuple.quad_type inst_a inst_b inst_c b := + fun {a : Type} {b : Type} => + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | pair (pair (pair a b) c) f, pair (pair (pair a' b') c') x => + pair (pair (pair (a <<>> a') (b <<>> b')) (c <<>> c')) (f x) + end. + +#[local] Definition Applicative__quad_type_liftA2 {inst_a : Type} {inst_b + : Type} {inst_c : Type} `{Monoid inst_a} `{Monoid inst_b} `{Monoid inst_c} + : forall {a : Type}, + forall {b : Type}, + forall {c : Type}, + (a -> b -> c) -> + GHC.Tuple.quad_type inst_a inst_b inst_c a -> + GHC.Tuple.quad_type inst_a inst_b inst_c b -> + GHC.Tuple.quad_type inst_a inst_b inst_c c := + fun {a : Type} {b : Type} {c : Type} => + fun f x => Applicative__quad_type_op_zlztzg__ (fmap f x). + +#[local] Definition Applicative__quad_type_op_ztzg__ {inst_a : Type} {inst_b + : Type} {inst_c : Type} `{Monoid inst_a} `{Monoid inst_b} `{Monoid inst_c} + : forall {a : Type}, + forall {b : Type}, + GHC.Tuple.quad_type inst_a inst_b inst_c a -> + GHC.Tuple.quad_type inst_a inst_b inst_c b -> + GHC.Tuple.quad_type inst_a inst_b inst_c b := + fun {a : Type} {b : Type} => + fun a1 a2 => Applicative__quad_type_op_zlztzg__ (id <$ a1) a2. + +#[local] Definition Applicative__quad_type_pure {inst_a : Type} {inst_b : Type} + {inst_c : Type} `{Monoid inst_a} `{Monoid inst_b} `{Monoid inst_c} + : forall {a : Type}, a -> GHC.Tuple.quad_type inst_a inst_b inst_c a := + fun {a : Type} => fun x => pair (pair (pair mempty mempty) mempty) x. + +#[global] +Program Instance Applicative__quad_type {a : Type} {b : Type} {c : Type} + `{Monoid a} `{Monoid b} `{Monoid c} + : Applicative (GHC.Tuple.quad_type a b c) := + fun _ k__ => + k__ {| liftA2__ := fun {a : Type} {b : Type} {c : Type} => + Applicative__quad_type_liftA2 ; + op_zlztzg____ := fun {a : Type} {b : Type} => + Applicative__quad_type_op_zlztzg__ ; + op_ztzg____ := fun {a : Type} {b : Type} => Applicative__quad_type_op_ztzg__ ; + pure__ := fun {a : Type} => Applicative__quad_type_pure |}. + +#[local] Definition Monad__quad_type_op_zgzgze__ {inst_a : Type} {inst_b : Type} + {inst_c : Type} `{Monoid inst_a} `{Monoid inst_b} `{Monoid inst_c} + : forall {a : Type}, + forall {b : Type}, + GHC.Tuple.quad_type inst_a inst_b inst_c a -> + (a -> GHC.Tuple.quad_type inst_a inst_b inst_c b) -> + GHC.Tuple.quad_type inst_a inst_b inst_c b := + fun {a : Type} {b : Type} => + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | pair (pair (pair u v) w) a, k => + let 'pair (pair (pair u' v') w') b := k a in + pair (pair (pair (u <<>> u') (v <<>> v')) (w <<>> w')) b + end. + +#[local] Definition Monad__quad_type_op_zgzg__ {inst_a : Type} {inst_b : Type} + {inst_c : Type} `{Monoid inst_a} `{Monoid inst_b} `{Monoid inst_c} + : forall {a : Type}, + forall {b : Type}, + GHC.Tuple.quad_type inst_a inst_b inst_c a -> + GHC.Tuple.quad_type inst_a inst_b inst_c b -> + GHC.Tuple.quad_type inst_a inst_b inst_c b := + fun {a : Type} {b : Type} => + fun m k => Monad__quad_type_op_zgzgze__ m (fun arg_0__ => k). + +#[local] Definition Monad__quad_type_return_ {inst_a : Type} {inst_b : Type} + {inst_c : Type} `{Monoid inst_a} `{Monoid inst_b} `{Monoid inst_c} + : forall {a : Type}, a -> GHC.Tuple.quad_type inst_a inst_b inst_c a := + fun {a : Type} => pure. + +#[global] +Program Instance Monad__quad_type {a : Type} {b : Type} {c : Type} `{Monoid a} + `{Monoid b} `{Monoid c} + : Monad (GHC.Tuple.quad_type a b c) := + fun _ k__ => + k__ {| op_zgzg____ := fun {a : Type} {b : Type} => Monad__quad_type_op_zgzg__ ; + op_zgzgze____ := fun {a : Type} {b : Type} => Monad__quad_type_op_zgzgze__ ; + return___ := fun {a : Type} => Monad__quad_type_return_ |}. + (* Skipping instance `GHC.Base.Semigroup__IO' of class `GHC.Base.Semigroup' *) (* Skipping instance `GHC.Base.Monoid__IO' of class `GHC.Base.Monoid' *) -Local Definition Functor__arrow_fmap {inst_r : Type} +#[local] Definition Functor__arrow_fmap {inst_r : Type} : forall {a : Type}, forall {b : Type}, (a -> b) -> GHC.Prim.arrow inst_r a -> GHC.Prim.arrow inst_r b := fun {a : Type} {b : Type} => _∘_. -Local Definition Functor__arrow_op_zlzd__ {inst_r : Type} +#[local] Definition Functor__arrow_op_zlzd__ {inst_r : Type} : forall {a : Type}, forall {b : Type}, a -> GHC.Prim.arrow inst_r b -> GHC.Prim.arrow inst_r a := fun {a : Type} {b : Type} => Functor__arrow_fmap ∘ const. +#[global] Program Instance Functor__arrow {r : Type} : Functor (GHC.Prim.arrow r) := fun _ k__ => k__ {| fmap__ := fun {a : Type} {b : Type} => Functor__arrow_fmap ; op_zlzd____ := fun {a : Type} {b : Type} => Functor__arrow_op_zlzd__ |}. -Local Definition Applicative__arrow_liftA2 {inst_a : Type} +#[local] Definition Applicative__arrow_liftA2 {inst_r : Type} : forall {a : Type}, forall {b : Type}, forall {c : Type}, (a -> b -> c) -> - GHC.Prim.arrow inst_a a -> GHC.Prim.arrow inst_a b -> GHC.Prim.arrow inst_a c := + GHC.Prim.arrow inst_r a -> GHC.Prim.arrow inst_r b -> GHC.Prim.arrow inst_r c := fun {a : Type} {b : Type} {c : Type} => fun q f g x => q (f x) (g x). -Local Definition Applicative__arrow_op_zlztzg__ {inst_a : Type} +#[local] Definition Applicative__arrow_op_zlztzg__ {inst_r : Type} : forall {a : Type}, forall {b : Type}, - GHC.Prim.arrow inst_a (a -> b) -> - GHC.Prim.arrow inst_a a -> GHC.Prim.arrow inst_a b := + GHC.Prim.arrow inst_r (a -> b) -> + GHC.Prim.arrow inst_r a -> GHC.Prim.arrow inst_r b := fun {a : Type} {b : Type} => fun f g x => f x (g x). -Local Definition Applicative__arrow_op_ztzg__ {inst_a : Type} +#[local] Definition Applicative__arrow_op_ztzg__ {inst_r : Type} : forall {a : Type}, forall {b : Type}, - GHC.Prim.arrow inst_a a -> GHC.Prim.arrow inst_a b -> GHC.Prim.arrow inst_a b := + GHC.Prim.arrow inst_r a -> GHC.Prim.arrow inst_r b -> GHC.Prim.arrow inst_r b := fun {a : Type} {b : Type} => fun a1 a2 => Applicative__arrow_op_zlztzg__ (id <$ a1) a2. -Local Definition Applicative__arrow_pure {inst_a : Type} - : forall {a : Type}, a -> GHC.Prim.arrow inst_a a := +#[local] Definition Applicative__arrow_pure {inst_r : Type} + : forall {a : Type}, a -> GHC.Prim.arrow inst_r a := fun {a : Type} => const. -Program Instance Applicative__arrow {a : Type} - : Applicative (GHC.Prim.arrow a) := +#[global] +Program Instance Applicative__arrow {r : Type} + : Applicative (GHC.Prim.arrow r) := fun _ k__ => k__ {| liftA2__ := fun {a : Type} {b : Type} {c : Type} => Applicative__arrow_liftA2 ; @@ -989,31 +1189,32 @@ Program Instance Applicative__arrow {a : Type} op_ztzg____ := fun {a : Type} {b : Type} => Applicative__arrow_op_ztzg__ ; pure__ := fun {a : Type} => Applicative__arrow_pure |}. -Local Definition Monad__arrow_op_zgzgze__ {inst_r : Type} +#[local] Definition Monad__arrow_op_zgzgze__ {inst_r : Type} : forall {a : Type}, forall {b : Type}, GHC.Prim.arrow inst_r a -> (a -> GHC.Prim.arrow inst_r b) -> GHC.Prim.arrow inst_r b := fun {a : Type} {b : Type} => fun f k => fun r => k (f r) r. -Local Definition Monad__arrow_op_zgzg__ {inst_r : Type} +#[local] Definition Monad__arrow_op_zgzg__ {inst_r : Type} : forall {a : Type}, forall {b : Type}, GHC.Prim.arrow inst_r a -> GHC.Prim.arrow inst_r b -> GHC.Prim.arrow inst_r b := fun {a : Type} {b : Type} => fun m k => Monad__arrow_op_zgzgze__ m (fun arg_0__ => k). -Local Definition Monad__arrow_return_ {inst_r : Type} +#[local] Definition Monad__arrow_return_ {inst_r : Type} : forall {a : Type}, a -> GHC.Prim.arrow inst_r a := fun {a : Type} => pure. +#[global] Program Instance Monad__arrow {r : Type} : Monad (GHC.Prim.arrow r) := fun _ k__ => k__ {| op_zgzg____ := fun {a : Type} {b : Type} => Monad__arrow_op_zgzg__ ; op_zgzgze____ := fun {a : Type} {b : Type} => Monad__arrow_op_zgzgze__ ; return___ := fun {a : Type} => Monad__arrow_return_ |}. -Local Definition Functor__option_fmap +#[local] Definition Functor__option_fmap : forall {a : Type}, forall {b : Type}, (a -> b) -> option a -> option b := fun {a : Type} {b : Type} => fun arg_0__ arg_1__ => @@ -1022,16 +1223,17 @@ Local Definition Functor__option_fmap | f, Some a => Some (f a) end. -Local Definition Functor__option_op_zlzd__ +#[local] Definition Functor__option_op_zlzd__ : forall {a : Type}, forall {b : Type}, a -> option b -> option a := fun {a : Type} {b : Type} => Functor__option_fmap ∘ const. +#[global] Program Instance Functor__option : Functor option := fun _ k__ => k__ {| fmap__ := fun {a : Type} {b : Type} => Functor__option_fmap ; op_zlzd____ := fun {a : Type} {b : Type} => Functor__option_op_zlzd__ |}. -Local Definition Applicative__option_liftA2 +#[local] Definition Applicative__option_liftA2 : forall {a : Type}, forall {b : Type}, forall {c : Type}, (a -> b -> c) -> option a -> option b -> option c := @@ -1042,7 +1244,7 @@ Local Definition Applicative__option_liftA2 | _, _, _ => None end. -Local Definition Applicative__option_op_zlztzg__ +#[local] Definition Applicative__option_op_zlztzg__ : forall {a : Type}, forall {b : Type}, option (a -> b) -> option a -> option b := fun {a : Type} {b : Type} => @@ -1052,7 +1254,7 @@ Local Definition Applicative__option_op_zlztzg__ | None, _m => None end. -Local Definition Applicative__option_op_ztzg__ +#[local] Definition Applicative__option_op_ztzg__ : forall {a : Type}, forall {b : Type}, option a -> option b -> option b := fun {a : Type} {b : Type} => fun arg_0__ arg_1__ => @@ -1061,9 +1263,11 @@ Local Definition Applicative__option_op_ztzg__ | None, _m2 => None end. -Local Definition Applicative__option_pure : forall {a : Type}, a -> option a := +#[local] Definition Applicative__option_pure + : forall {a : Type}, a -> option a := fun {a : Type} => Some. +#[global] Program Instance Applicative__option : Applicative option := fun _ k__ => k__ {| liftA2__ := fun {a : Type} {b : Type} {c : Type} => @@ -1072,11 +1276,11 @@ Program Instance Applicative__option : Applicative option := op_ztzg____ := fun {a : Type} {b : Type} => Applicative__option_op_ztzg__ ; pure__ := fun {a : Type} => Applicative__option_pure |}. -Local Definition Monad__option_op_zgzg__ +#[local] Definition Monad__option_op_zgzg__ : forall {a : Type}, forall {b : Type}, option a -> option b -> option b := fun {a : Type} {b : Type} => _*>_. -Local Definition Monad__option_op_zgzgze__ +#[local] Definition Monad__option_op_zgzgze__ : forall {a : Type}, forall {b : Type}, option a -> (a -> option b) -> option b := fun {a : Type} {b : Type} => @@ -1086,9 +1290,10 @@ Local Definition Monad__option_op_zgzgze__ | None, _ => None end. -Local Definition Monad__option_return_ : forall {a : Type}, a -> option a := +#[local] Definition Monad__option_return_ : forall {a : Type}, a -> option a := fun {a : Type} => pure. +#[global] Program Instance Monad__option : Monad option := fun _ k__ => k__ {| op_zgzg____ := fun {a : Type} {b : Type} => Monad__option_op_zgzg__ ; @@ -1101,23 +1306,24 @@ Program Instance Monad__option : Monad option := (* Skipping all instances of class `GHC.Base.MonadPlus', including `GHC.Base.MonadPlus__option' *) -Definition map {A B : Type} (f : A -> B) xs := +#[global] Definition map {A B : Type} (f : A -> B) xs := Coq.Lists.List.map f xs. -Local Definition Functor__list_fmap +#[local] Definition Functor__list_fmap : forall {a : Type}, forall {b : Type}, (a -> b) -> list a -> list b := fun {a : Type} {b : Type} => map. -Local Definition Functor__list_op_zlzd__ +#[local] Definition Functor__list_op_zlzd__ : forall {a : Type}, forall {b : Type}, a -> list b -> list a := fun {a : Type} {b : Type} => Functor__list_fmap ∘ const. +#[global] Program Instance Functor__list : Functor list := fun _ k__ => k__ {| fmap__ := fun {a : Type} {b : Type} => Functor__list_fmap ; op_zlzd____ := fun {a : Type} {b : Type} => Functor__list_op_zlzd__ |}. -Local Definition Functor__NonEmpty_fmap +#[local] Definition Functor__NonEmpty_fmap : forall {a : Type}, forall {b : Type}, (a -> b) -> NonEmpty a -> NonEmpty b := fun {a : Type} {b : Type} => fun arg_0__ arg_1__ => @@ -1125,7 +1331,7 @@ Local Definition Functor__NonEmpty_fmap | f, NEcons a as_ => NEcons (f a) (fmap f as_) end. -Local Definition Functor__NonEmpty_op_zlzd__ +#[local] Definition Functor__NonEmpty_op_zlzd__ : forall {a : Type}, forall {b : Type}, a -> NonEmpty b -> NonEmpty a := fun {a : Type} {b : Type} => fun arg_0__ arg_1__ => @@ -1133,16 +1339,17 @@ Local Definition Functor__NonEmpty_op_zlzd__ | b, NEcons _ as_ => NEcons b (b <$ as_) end. +#[global] Program Instance Functor__NonEmpty : Functor NonEmpty := fun _ k__ => k__ {| fmap__ := fun {a : Type} {b : Type} => Functor__NonEmpty_fmap ; op_zlzd____ := fun {a : Type} {b : Type} => Functor__NonEmpty_op_zlzd__ |}. -Local Definition Applicative__NonEmpty_pure +#[local] Definition Applicative__NonEmpty_pure : forall {a : Type}, a -> NonEmpty a := fun {a : Type} => fun a => NEcons a nil. -Local Definition Applicative__list_liftA2 +#[local] Definition Applicative__list_liftA2 : forall {a : Type}, forall {b : Type}, forall {c : Type}, (a -> b -> c) -> list a -> list b -> list c := @@ -1151,23 +1358,24 @@ Local Definition Applicative__list_liftA2 Coq.Lists.List.flat_map (fun x => Coq.Lists.List.flat_map (fun y => cons (f x y) nil) ys) xs. -Local Definition Applicative__list_op_zlztzg__ +#[local] Definition Applicative__list_op_zlztzg__ : forall {a : Type}, forall {b : Type}, list (a -> b) -> list a -> list b := fun {a : Type} {b : Type} => fun fs xs => Coq.Lists.List.flat_map (fun f => Coq.Lists.List.flat_map (fun x => cons (f x) nil) xs) fs. -Local Definition Applicative__list_op_ztzg__ +#[local] Definition Applicative__list_op_ztzg__ : forall {a : Type}, forall {b : Type}, list a -> list b -> list b := fun {a : Type} {b : Type} => fun xs ys => Coq.Lists.List.flat_map (fun _ => Coq.Lists.List.flat_map (fun y => cons y nil) ys) xs. -Local Definition Applicative__list_pure : forall {a : Type}, a -> list a := +#[local] Definition Applicative__list_pure : forall {a : Type}, a -> list a := fun {a : Type} => fun x => cons x nil. +#[global] Program Instance Applicative__list : Applicative list := fun _ k__ => k__ {| liftA2__ := fun {a : Type} {b : Type} {c : Type} => @@ -1176,27 +1384,28 @@ Program Instance Applicative__list : Applicative list := op_ztzg____ := fun {a : Type} {b : Type} => Applicative__list_op_ztzg__ ; pure__ := fun {a : Type} => Applicative__list_pure |}. -Local Definition Monad__list_return_ : forall {a : Type}, a -> list a := +#[local] Definition Monad__list_return_ : forall {a : Type}, a -> list a := fun {a : Type} => pure. -Local Definition Monad__list_op_zgzg__ +#[local] Definition Monad__list_op_zgzg__ : forall {a : Type}, forall {b : Type}, list a -> list b -> list b := fun {a : Type} {b : Type} => _*>_. -Local Definition Monad__list_op_zgzgze__ +#[local] Definition Monad__list_op_zgzgze__ : forall {a : Type}, forall {b : Type}, list a -> (a -> list b) -> list b := fun {a : Type} {b : Type} => fun xs f => Coq.Lists.List.flat_map (fun x => Coq.Lists.List.flat_map (fun y => cons y nil) (f x)) xs. +#[global] Program Instance Monad__list : Monad list := fun _ k__ => k__ {| op_zgzg____ := fun {a : Type} {b : Type} => Monad__list_op_zgzg__ ; op_zgzgze____ := fun {a : Type} {b : Type} => Monad__list_op_zgzgze__ ; return___ := fun {a : Type} => Monad__list_return_ |}. -Local Definition Monad__NonEmpty_op_zgzgze__ +#[local] Definition Monad__NonEmpty_op_zgzgze__ : forall {a : Type}, forall {b : Type}, NonEmpty a -> (a -> NonEmpty b) -> NonEmpty b := fun {a : Type} {b : Type} => @@ -1209,25 +1418,26 @@ Local Definition Monad__NonEmpty_op_zgzgze__ NEcons b (Coq.Init.Datatypes.app bs bs') end. -Local Definition Applicative__NonEmpty_liftA2 {a} {b} {c} +#[local] Definition Applicative__NonEmpty_liftA2 {a} {b} {c} : (a -> b -> c) -> NonEmpty a -> NonEmpty b -> NonEmpty c := fun f m1 m2 => Monad__NonEmpty_op_zgzgze__ m1 (fun x1 => Monad__NonEmpty_op_zgzgze__ m2 (fun x2 => Applicative__NonEmpty_pure (f x1 x2))). -Local Definition Applicative__NonEmpty_op_zlztzg__ {a} {b} +#[local] Definition Applicative__NonEmpty_op_zlztzg__ {a} {b} : NonEmpty (a -> b) -> NonEmpty a -> NonEmpty b := fun m1 m2 => Monad__NonEmpty_op_zgzgze__ m1 (fun x1 => Monad__NonEmpty_op_zgzgze__ m2 (fun x2 => Applicative__NonEmpty_pure (x1 x2))). -Local Definition Applicative__NonEmpty_op_ztzg__ +#[local] Definition Applicative__NonEmpty_op_ztzg__ : forall {a : Type}, forall {b : Type}, NonEmpty a -> NonEmpty b -> NonEmpty b := fun {a : Type} {b : Type} => fun a1 a2 => Applicative__NonEmpty_op_zlztzg__ (id <$ a1) a2. +#[global] Program Instance Applicative__NonEmpty : Applicative NonEmpty := fun _ k__ => k__ {| liftA2__ := fun {a : Type} {b : Type} {c : Type} => @@ -1237,15 +1447,17 @@ Program Instance Applicative__NonEmpty : Applicative NonEmpty := op_ztzg____ := fun {a : Type} {b : Type} => Applicative__NonEmpty_op_ztzg__ ; pure__ := fun {a : Type} => Applicative__NonEmpty_pure |}. -Local Definition Monad__NonEmpty_return_ : forall {a : Type}, a -> NonEmpty a := +#[local] Definition Monad__NonEmpty_return_ + : forall {a : Type}, a -> NonEmpty a := fun {a : Type} => pure. -Local Definition Monad__NonEmpty_op_zgzg__ +#[local] Definition Monad__NonEmpty_op_zgzg__ : forall {a : Type}, forall {b : Type}, NonEmpty a -> NonEmpty b -> NonEmpty b := fun {a : Type} {b : Type} => fun m k => Monad__NonEmpty_op_zgzgze__ m (fun arg_0__ => k). +#[global] Program Instance Monad__NonEmpty : Monad NonEmpty := fun _ k__ => k__ {| op_zgzg____ := fun {a : Type} {b : Type} => Monad__NonEmpty_op_zgzg__ ; @@ -1271,8 +1483,8 @@ Program Instance Monad__NonEmpty : Monad NonEmpty := (* Skipping all instances of class `GHC.Base.MonadPlus', including `GHC.Base.MonadPlus__IO' *) -Definition op_zlztztzg__ {f : Type -> Type} {a : Type} {b : Type} `{Applicative - f} +#[global] Definition op_zlztztzg__ {f : Type -> Type} {a : Type} {b : Type} + `{Applicative f} : f a -> f (a -> b) -> f b := liftA2 (fun a f => f a). @@ -1280,19 +1492,22 @@ Notation "'_<**>_'" := (op_zlztztzg__). Infix "<**>" := (_<**>_) (at level 99). -Definition liftA {f : Type -> Type} {a : Type} {b : Type} `{Applicative f} +#[global] Definition liftA {f : Type -> Type} {a : Type} {b : Type} + `{Applicative f} : (a -> b) -> f a -> f b := fun f a => pure f <*> a. -Definition liftA3 {f : Type -> Type} {a : Type} {b : Type} {c : Type} {d : Type} - `{Applicative f} +#[global] Definition liftA3 {f : Type -> Type} {a : Type} {b : Type} {c : Type} + {d : Type} `{Applicative f} : (a -> b -> c -> d) -> f a -> f b -> f c -> f d := fun f a b c => liftA2 f a b <*> c. -Definition join {m : Type -> Type} {a : Type} `{Monad m} : m (m a) -> m a := +#[global] Definition join {m : Type -> Type} {a : Type} `{Monad m} + : m (m a) -> m a := fun x => x >>= id. -Definition op_zezlzl__ {m : Type -> Type} {a : Type} {b : Type} `{Monad m} +#[global] Definition op_zezlzl__ {m : Type -> Type} {a : Type} {b : Type} + `{Monad m} : (a -> m b) -> m a -> m b := fun f x => x >>= f. @@ -1300,37 +1515,37 @@ Notation "'_=<<_'" := (op_zezlzl__). Infix "=<<" := (_=<<_) (at level 99). -Definition when {f : Type -> Type} `{Applicative f} +#[global] Definition when {f : Type -> Type} `{Applicative f} : bool -> f unit -> f unit := fun p s => if p : bool then s else pure tt. -Definition mapM {m : Type -> Type} {a : Type} {b : Type} `{Monad m} +#[global] Definition mapM {m : Type -> Type} {a : Type} {b : Type} `{Monad m} : (a -> m b) -> list a -> m (list b) := fun f as_ => let k := fun a r => f a >>= (fun x => r >>= (fun xs => return_ (cons x xs))) in foldr k (return_ nil) as_. -Definition sequence {m : Type -> Type} {a : Type} `{Monad m} +#[global] Definition sequence {m : Type -> Type} {a : Type} `{Monad m} : list (m a) -> m (list a) := mapM id. -Definition liftM {m : Type -> Type} {a1 : Type} {r : Type} `{Monad m} +#[global] Definition liftM {m : Type -> Type} {a1 : Type} {r : Type} `{Monad m} : (a1 -> r) -> m a1 -> m r := fun f m1 => m1 >>= (fun x1 => return_ (f x1)). -Definition liftM2 {m : Type -> Type} {a1 : Type} {a2 : Type} {r : Type} `{Monad - m} +#[global] Definition liftM2 {m : Type -> Type} {a1 : Type} {a2 : Type} {r + : Type} `{Monad m} : (a1 -> a2 -> r) -> m a1 -> m a2 -> m r := fun f m1 m2 => m1 >>= (fun x1 => m2 >>= (fun x2 => return_ (f x1 x2))). -Definition liftM3 {m : Type -> Type} {a1 : Type} {a2 : Type} {a3 : Type} {r - : Type} `{Monad m} +#[global] Definition liftM3 {m : Type -> Type} {a1 : Type} {a2 : Type} {a3 + : Type} {r : Type} `{Monad m} : (a1 -> a2 -> a3 -> r) -> m a1 -> m a2 -> m a3 -> m r := fun f m1 m2 m3 => m1 >>= (fun x1 => m2 >>= (fun x2 => m3 >>= (fun x3 => return_ (f x1 x2 x3)))). -Definition liftM4 {m : Type -> Type} {a1 : Type} {a2 : Type} {a3 : Type} {a4 - : Type} {r : Type} `{Monad m} +#[global] Definition liftM4 {m : Type -> Type} {a1 : Type} {a2 : Type} {a3 + : Type} {a4 : Type} {r : Type} `{Monad m} : (a1 -> a2 -> a3 -> a4 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m r := fun f m1 m2 m3 m4 => m1 >>= @@ -1338,8 +1553,8 @@ Definition liftM4 {m : Type -> Type} {a1 : Type} {a2 : Type} {a3 : Type} {a4 m2 >>= (fun x2 => m3 >>= (fun x3 => m4 >>= (fun x4 => return_ (f x1 x2 x3 x4))))). -Definition liftM5 {m : Type -> Type} {a1 : Type} {a2 : Type} {a3 : Type} {a4 - : Type} {a5 : Type} {r : Type} `{Monad m} +#[global] Definition liftM5 {m : Type -> Type} {a1 : Type} {a2 : Type} {a3 + : Type} {a4 : Type} {a5 : Type} {r : Type} `{Monad m} : (a1 -> a2 -> a3 -> a4 -> a5 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m a5 -> m r := fun f m1 m2 m3 m4 m5 => @@ -1350,7 +1565,7 @@ Definition liftM5 {m : Type -> Type} {a1 : Type} {a2 : Type} {a3 : Type} {a4 m3 >>= (fun x3 => m4 >>= (fun x4 => m5 >>= (fun x5 => return_ (f x1 x2 x3 x4 x5)))))). -Definition ap {m : Type -> Type} {a : Type} {b : Type} `{Monad m} +#[global] Definition ap {m : Type -> Type} {a : Type} {b : Type} `{Monad m} : m (a -> b) -> m a -> m b := fun m1 m2 => m1 >>= (fun x1 => m2 >>= (fun x2 => return_ (x1 x2))). @@ -1358,13 +1573,13 @@ Definition ap {m : Type -> Type} {a : Type} {b : Type} `{Monad m} (* Skipping definition `GHC.Base.augment' *) -Definition mapFB {elt : Type} {lst : Type} {a : Type} +#[global] Definition mapFB {elt : Type} {lst : Type} {a : Type} : (elt -> lst -> lst) -> (a -> elt) -> a -> lst -> lst := fun c f => fun x ys => c (f x) ys. (* Skipping definition `Coq.Init.Datatypes.app' *) -Definition otherwise : bool := +#[global] Definition otherwise : bool := true. (* Skipping definition `GHC.Base.unsafeChr' *) @@ -1382,27 +1597,29 @@ Fixpoint eqString (arg_0__ arg_1__ : String) : bool (* Skipping definition `GHC.Base.maxInt' *) -Definition assert {a : Type} : bool -> a -> a := +#[global] Definition assert {a : Type} : bool -> a -> a := fun _pred r => r. -Definition breakpoint {a : Type} : a -> a := +#[global] Definition breakpoint {a : Type} : a -> a := fun r => r. -Definition breakpointCond {a : Type} : bool -> a -> a := +#[global] Definition breakpointCond {a : Type} : bool -> a -> a := fun arg_0__ arg_1__ => match arg_0__, arg_1__ with | _, r => r end. -Definition flip {a : Type} {b : Type} {c : Type} +#[global] Definition flip {a : Type} {b : Type} {c : Type} : (a -> b -> c) -> b -> a -> c := fun f x y => f y x. -Definition op_zd__ {a} {b} : (a -> b) -> a -> b := +#[global] Definition op_zd__ {r : GHC.Types.RuntimeRep} {a : Type} {b : Type} + : (a -> b) -> a -> b := fun f x => f x. Notation "'_$_'" := (op_zd__). Infix "$" := (_$_) (at level 99). -Definition op_zdzn__ {a : Type} {b : Type} : (a -> b) -> a -> b := +#[global] Definition op_zdzn__ {r : GHC.Types.RuntimeRep} {a : Type} {b : Type} + : (a -> b) -> a -> b := fun f x => let vx := x in f vx. Notation "'_$!_'" := (op_zdzn__). @@ -1411,7 +1628,7 @@ Infix "$!" := (_$!_) (at level 99). (* Skipping definition `GHC.Base.until' *) -Definition asTypeOf {a : Type} : a -> a -> a := +#[global] Definition asTypeOf {a : Type} : a -> a -> a := const. (* Skipping definition `GHC.Base.returnIO' *) @@ -1420,6 +1637,8 @@ Definition asTypeOf {a : Type} : a -> a -> a := (* Skipping definition `GHC.Base.thenIO' *) +(* Skipping definition `GHC.Base.failIO' *) + (* Skipping definition `GHC.Base.unIO' *) (* Skipping definition `GHC.Base.getTag' *) @@ -1475,9 +1694,8 @@ Infix "GHC.Base.$!" := (_$!_) (at level 99). End Notations. (* External variables: - Eq Eq_ Gt Lt None Ord Some String Type andb bool compare compare__ comparison - cons false list max__ min__ negb nil op_zeze__ op_zeze____ op_zg____ op_zgze____ - op_zl__ op_zl____ op_zlze____ op_zsze____ option pair true tt unit - Coq.Init.Datatypes.app Coq.Lists.List.flat_map Coq.Lists.List.map GHC.Prim.arrow - GHC.Tuple.pair_type + Eq Gt Lt None Some String Type andb bool comparison cons false list nil + op_zeze__ option pair true tt unit Coq.Init.Datatypes.app + Coq.Lists.List.flat_map Coq.Lists.List.map GHC.Prim.arrow GHC.Tuple.pair_type + GHC.Tuple.quad_type GHC.Tuple.triple_type GHC.Types.RuntimeRep *) diff --git a/base/GHC/List.v b/base/GHC/List.v index 8afd65a9a..e245f1e18 100644 --- a/base/GHC/List.v +++ b/base/GHC/List.v @@ -76,29 +76,30 @@ Import GHC.Num.Notations. (* Converted value declarations: *) -Definition prel_list_str : String := +#[global] Definition prel_list_str : String := GHC.Base.hs_string__ "Prelude.". -Definition errorEmptyList {a} `{_ : HsToCoq.Err.Default a} : String -> a := +#[global] Definition errorEmptyList {a} `{_ : HsToCoq.Err.Default a} + : String -> a := fun fun_ => GHC.Err.errorWithoutStackTrace (Coq.Init.Datatypes.app prel_list_str (Coq.Init.Datatypes.app fun_ (GHC.Base.hs_string__ ": empty list"))). -Definition badHead {a} `{_ : HsToCoq.Err.Default a} : a := +#[global] Definition badHead {a} `{_ : HsToCoq.Err.Default a} : a := errorEmptyList (GHC.Base.hs_string__ "head"). -Definition head {a} `{_ : HsToCoq.Err.Default a} : list a -> a := +#[global] Definition head {a} `{_ : HsToCoq.Err.Default a} : list a -> a := fun arg_0__ => match arg_0__ with | cons x _ => x | nil => badHead end. -Definition uncons {a : Type} : list a -> option (a * list a)%type := +#[global] Definition uncons {a : Type} : list a -> option (a * list a)%type := fun arg_0__ => match arg_0__ with | nil => None | cons x xs => Some (pair x xs) end. -Definition tail {a} `{_ : HsToCoq.Err.Default a} : list a -> list a := +#[global] Definition tail {a} `{_ : HsToCoq.Err.Default a} : list a -> list a := fun arg_0__ => match arg_0__ with | cons _ xs => xs @@ -107,15 +108,15 @@ Definition tail {a} `{_ : HsToCoq.Err.Default a} : list a -> list a := (* Skipping definition `GHC.Base.foldl' *) -Definition lastError {a} `{_ : HsToCoq.Err.Default a} : a := +#[global] Definition lastError {a} `{_ : HsToCoq.Err.Default a} : a := errorEmptyList (GHC.Base.hs_string__ "last"). -Definition last {a} `{_ : HsToCoq.Err.Default a} : list a -> a := +#[global] Definition last {a} `{_ : HsToCoq.Err.Default a} : list a -> a := fun xs => foldl (fun arg_0__ arg_1__ => match arg_0__, arg_1__ with | _, x => x end) lastError xs. -Definition init {a} `{_ : HsToCoq.Err.Default a} : list a -> list a := +#[global] Definition init {a} `{_ : HsToCoq.Err.Default a} : list a -> list a := fun arg_0__ => match arg_0__ with | nil => errorEmptyList (GHC.Base.hs_string__ "init") @@ -128,7 +129,7 @@ Definition init {a} `{_ : HsToCoq.Err.Default a} : list a -> list a := init' x xs end. -Definition null {a : Type} : list a -> bool := +#[global] Definition null {a : Type} : list a -> bool := fun arg_0__ => match arg_0__ with | nil => true | cons _ _ => false end. Fixpoint lenAcc {a} (arg_0__ : list a) (arg_1__ : GHC.Num.Int) : GHC.Num.Int @@ -137,17 +138,17 @@ Fixpoint lenAcc {a} (arg_0__ : list a) (arg_1__ : GHC.Num.Int) : GHC.Num.Int | cons _ ys, n => lenAcc ys (n GHC.Num.+ #1) end. -Definition length {a : Type} : list a -> GHC.Num.Int := +#[global] Definition length {a : Type} : list a -> GHC.Num.Int := fun xs => lenAcc xs #0. -Definition lengthFB {x} +#[global] Definition lengthFB {x} : x -> (GHC.Num.Int -> GHC.Num.Int) -> GHC.Num.Int -> GHC.Num.Int := fun arg_0__ arg_1__ => match arg_0__, arg_1__ with | _, r => fun a => r (a GHC.Num.+ #1) end. -Definition idLength : GHC.Num.Int -> GHC.Num.Int := +#[global] Definition idLength : GHC.Num.Int -> GHC.Num.Int := id. Fixpoint filter {a : Type} (arg_0__ : a -> bool) (arg_1__ : list a) : list a @@ -158,12 +159,13 @@ Fixpoint filter {a : Type} (arg_0__ : a -> bool) (arg_1__ : list a) : list a filter pred xs end. -Definition filterFB {a} {b} : (a -> b -> b) -> (a -> bool) -> a -> b -> b := +#[global] Definition filterFB {a} {b} + : (a -> b -> b) -> (a -> bool) -> a -> b -> b := fun c p x r => if p x : bool then c x r else r. (* Skipping definition `GHC.Base.foldl'' *) -Definition foldl1 {a} `{_ : HsToCoq.Err.Default a} +#[global] Definition foldl1 {a} `{_ : HsToCoq.Err.Default a} : (a -> a -> a) -> list a -> a := fun arg_0__ arg_1__ => match arg_0__, arg_1__ with @@ -171,7 +173,7 @@ Definition foldl1 {a} `{_ : HsToCoq.Err.Default a} | _, nil => errorEmptyList (GHC.Base.hs_string__ "foldl1") end. -Definition foldl1' {a} `{_ : HsToCoq.Err.Default a} +#[global] Definition foldl1' {a} `{_ : HsToCoq.Err.Default a} : (a -> a -> a) -> list a -> a := fun arg_0__ arg_1__ => match arg_0__, arg_1__ with @@ -179,13 +181,13 @@ Definition foldl1' {a} `{_ : HsToCoq.Err.Default a} | _, nil => errorEmptyList (GHC.Base.hs_string__ "foldl1'") end. -Definition sum {a : Type} `{GHC.Num.Num a} : list a -> a := +#[global] Definition sum {a : Type} `{GHC.Num.Num a} : list a -> a := foldl _GHC.Num.+_ #0. -Definition product {a : Type} `{GHC.Num.Num a} : list a -> a := +#[global] Definition product {a : Type} `{GHC.Num.Num a} : list a -> a := foldl _GHC.Num.*_ #1. -Definition scanl {b : Type} {a : Type} +#[global] Definition scanl {b : Type} {a : Type} : (b -> a -> b) -> b -> list a -> list b := let scanlGo {b} {a} : (b -> a -> b) -> b -> list a -> list b := fix scanlGo (f : (b -> a -> b)) (q : b) (ls : list a) : list b @@ -195,21 +197,21 @@ Definition scanl {b : Type} {a : Type} end) in scanlGo. -Definition scanlFB {b} {a} {c} +#[global] Definition scanlFB {b} {a} {c} : (b -> a -> b) -> (b -> c -> c) -> a -> (b -> c) -> b -> c := fun f c => fun b g => (fun x => let b' := f x b in c b' (g b')). -Definition constScanl {a} {b} : a -> b -> a := +#[global] Definition constScanl {a} {b} : a -> b -> a := const. -Definition scanl1 {a : Type} : (a -> a -> a) -> list a -> list a := +#[global] Definition scanl1 {a : Type} : (a -> a -> a) -> list a -> list a := fun arg_0__ arg_1__ => match arg_0__, arg_1__ with | f, cons x xs => scanl f x xs | _, nil => nil end. -Definition scanl' {b : Type} {a : Type} +#[global] Definition scanl' {b : Type} {a : Type} : (b -> a -> b) -> b -> list a -> list b := let scanlGo' {b} {a} : (b -> a -> b) -> b -> list a -> list b := fix scanlGo' (f : (b -> a -> b)) (q : b) (ls : list a) : list b @@ -219,14 +221,14 @@ Definition scanl' {b : Type} {a : Type} end) in scanlGo'. -Definition scanlFB' {b} {a} {c} +#[global] Definition scanlFB' {b} {a} {c} : (b -> a -> b) -> (b -> c -> c) -> a -> (b -> c) -> b -> c := fun f c => fun b g => (fun x => let b' := f x b in c b' (g b')). -Definition flipSeqScanl' {a} {b} : a -> b -> a := +#[global] Definition flipSeqScanl' {a} {b} : a -> b -> a := fun a _b => a. -Definition foldr1 {a} `{_ : HsToCoq.Err.Default a} +#[global] Definition foldr1 {a} `{_ : HsToCoq.Err.Default a} : (a -> a -> a) -> list a -> a := fun f => let fix go arg_0__ @@ -239,11 +241,11 @@ Definition foldr1 {a} `{_ : HsToCoq.Err.Default a} (* Skipping definition `GHC.List.scanr' *) -Definition strictUncurryScanr {a} {b} {c} +#[global] Definition strictUncurryScanr {a} {b} {c} : (a -> b -> c) -> (a * b)%type -> c := fun f pair_ => let 'pair x y := pair_ in f x y. -Definition scanrFB {a} {b} {c} +#[global] Definition scanrFB {a} {b} {c} : (a -> b -> b) -> (b -> c -> c) -> a -> (b * c)%type -> (b * c)%type := fun f c => fun arg_0__ arg_1__ => @@ -263,7 +265,8 @@ Fixpoint scanr1 {a} `{_ : HsToCoq.Err.Default a} (arg_0__ : a -> a -> a) end end. -Definition maximum {a} `{_ : HsToCoq.Err.Default a} {_ : Eq_ a} {_ : Ord a} +#[global] Definition maximum {a} `{_ : HsToCoq.Err.Default a} {_ : Eq_ a} {_ + : Ord a} : list a -> a := fun arg_0__ => match arg_0__ with @@ -271,7 +274,8 @@ Definition maximum {a} `{_ : HsToCoq.Err.Default a} {_ : Eq_ a} {_ : Ord a} | xs => foldl1 max xs end. -Definition minimum {a} `{_ : HsToCoq.Err.Default a} {_ : Eq_ a} {_ : Ord a} +#[global] Definition minimum {a} `{_ : HsToCoq.Err.Default a} {_ : Eq_ a} {_ + : Ord a} : list a -> a := fun arg_0__ => match arg_0__ with @@ -301,7 +305,7 @@ Fixpoint takeWhile {a : Type} (arg_0__ : a -> bool) (arg_1__ : list a) : list a | p, cons x xs => if p x : bool then cons x (takeWhile p xs) else nil end. -Definition takeWhileFB {a} {b} +#[global] Definition takeWhileFB {a} {b} : (a -> bool) -> (a -> b -> b) -> b -> a -> b -> b := fun p c n => fun x r => if p x : bool then c x r else n. @@ -315,10 +319,10 @@ Fixpoint dropWhile {a : Type} (arg_0__ : a -> bool) (arg_1__ : list a) : list a (* Skipping definition `GHC.List.unsafeTake' *) -Definition flipSeqTake {a} : a -> GHC.Num.Int -> a := +#[global] Definition flipSeqTake {a} : a -> GHC.Num.Int -> a := fun x _n => x. -Definition takeFB {a} {b} +#[global] Definition takeFB {a} {b} : (a -> b -> b) -> b -> a -> (GHC.Num.Int -> b) -> GHC.Num.Int -> b := fun c n x xs => fun m => @@ -349,7 +353,7 @@ Fixpoint break {a : Type} (arg_0__ : a -> bool) (arg_1__ : list a) : (list a * pair (cons x ys) zs end. -Definition reverse {a : Type} : list a -> list a := +#[global] Definition reverse {a : Type} : list a -> list a := fun l => let fix rev arg_0__ arg_1__ := match arg_0__, arg_1__ with @@ -403,19 +407,20 @@ Fixpoint lookup {a : Type} {b : Type} `{Eq_ a} (arg_0__ : a) (arg_1__ (* Skipping definition `Coq.Lists.List.flat_map' *) -Definition concat {a : Type} : list (list a) -> list a := +#[global] Definition concat {a : Type} : list (list a) -> list a := foldr Coq.Init.Datatypes.app nil. -Definition tooLarge {a} `{_ : HsToCoq.Err.Default a} : GHC.Num.Int -> a := +#[global] Definition tooLarge {a} `{_ : HsToCoq.Err.Default a} + : GHC.Num.Int -> a := fun arg_0__ => GHC.Err.errorWithoutStackTrace (Coq.Init.Datatypes.app prel_list_str (GHC.Base.hs_string__ "!!: index too large")). -Definition negIndex {a} `{_ : HsToCoq.Err.Default a} : a := +#[global] Definition negIndex {a} `{_ : HsToCoq.Err.Default a} : a := GHC.Err.errorWithoutStackTrace (Coq.Init.Datatypes.app prel_list_str (GHC.Base.hs_string__ "!!: negative index")). -Definition op_znzn__ {a} `{_ : HsToCoq.Err.Default a} +#[global] Definition op_znzn__ {a} `{_ : HsToCoq.Err.Default a} : list a -> GHC.Num.Int -> a := fun xs n => if n < #0 : bool then negIndex else @@ -428,7 +433,7 @@ Notation "'_!!_'" := (op_znzn__). Infix "!!" := (_!!_) (at level 99). -Definition foldr2 {a} {b} {c} +#[global] Definition foldr2 {a} {b} {c} : (a -> b -> c -> c) -> c -> list a -> list b -> c := fun k z => let fix go arg_0__ arg_1__ @@ -439,7 +444,7 @@ Definition foldr2 {a} {b} {c} end in go. -Definition foldr2_left {a} {b} {c} {d} +#[global] Definition foldr2_left {a} {b} {c} {d} : (a -> b -> c -> d) -> d -> a -> (list b -> c) -> list b -> d := fun arg_0__ arg_1__ arg_2__ arg_3__ arg_4__ => match arg_0__, arg_1__, arg_2__, arg_3__, arg_4__ with @@ -447,6 +452,27 @@ Definition foldr2_left {a} {b} {c} {d} | k, _z, x, r, cons y ys => k x y (r ys) end. +#[global] Definition foldr3 {a} {b} {c} {d} + : (a -> b -> c -> d -> d) -> d -> list a -> list b -> list c -> d := + fun k z => + let fix go arg_0__ arg_1__ arg_2__ + := match arg_0__, arg_1__, arg_2__ with + | nil, _, _ => z + | _, nil, _ => z + | _, _, nil => z + | cons a as_, cons b bs, cons c cs => k a b c (go as_ bs cs) + end in + go. + +#[global] Definition foldr3_left {a} {b} {c} {d} {e} + : (a -> b -> c -> d -> e) -> + e -> a -> (list b -> list c -> d) -> list b -> list c -> e := + fun arg_0__ arg_1__ arg_2__ arg_3__ arg_4__ arg_5__ => + match arg_0__, arg_1__, arg_2__, arg_3__, arg_4__, arg_5__ with + | k, _z, a, r, cons b bs, cons c cs => k a b c (r bs cs) + | _, z, _, _, _, _ => z + end. + Fixpoint zip {a : Type} {b : Type} (arg_0__ : list a) (arg_1__ : list b) : list (a * b)%type := match arg_0__, arg_1__ with @@ -455,7 +481,7 @@ Fixpoint zip {a : Type} {b : Type} (arg_0__ : list a) (arg_1__ : list b) : list | cons a as_, cons b bs => cons (pair a b) (zip as_ bs) end. -Definition zipFB {a} {b} {c} {d} +#[global] Definition zipFB {a} {b} {c} {d} : ((a * b)%type -> c -> d) -> a -> b -> c -> d := fun c => fun x y r => c (pair x y) r. @@ -466,7 +492,11 @@ Fixpoint zip3 {a : Type} {b : Type} {c : Type} (arg_0__ : list a) (arg_1__ | _, _, _ => nil end. -Definition zipWith {a : Type} {b : Type} {c : Type} +#[global] Definition zip3FB {a} {b} {c} {xs} {xs'} + : ((a * b * c)%type -> xs -> xs') -> a -> b -> c -> xs -> xs' := + fun cons_ => fun a b c r => cons_ (pair (pair a b) c) r. + +#[global] Definition zipWith {a : Type} {b : Type} {c : Type} : (a -> b -> c) -> list a -> list b -> list c := fun f => let fix go arg_0__ arg_1__ @@ -477,11 +507,11 @@ Definition zipWith {a : Type} {b : Type} {c : Type} end in go. -Definition zipWithFB {a} {b} {c} {d} {e} +#[global] Definition zipWithFB {a} {b} {c} {d} {e} : (a -> b -> c) -> (d -> e -> a) -> d -> e -> b -> c := fun c f => fun x y r => c (f x y) r. -Definition zipWith3 {a : Type} {b : Type} {c : Type} {d : Type} +#[global] Definition zipWith3 {a : Type} {b : Type} {c : Type} {d : Type} : (a -> b -> c -> d) -> list a -> list b -> list c -> list d := fun z => let fix go arg_0__ arg_1__ arg_2__ @@ -491,14 +521,18 @@ Definition zipWith3 {a : Type} {b : Type} {c : Type} {d : Type} end in go. -Definition unzip {a : Type} {b : Type} +#[global] Definition zipWith3FB {d} {xs} {xs'} {a} {b} {c} + : (d -> xs -> xs') -> (a -> b -> c -> d) -> a -> b -> c -> xs -> xs' := + fun cons_ func => fun a b c r => cons_ (func a b c) r. + +#[global] Definition unzip {a : Type} {b : Type} : list (a * b)%type -> (list a * list b)%type := foldr (fun arg_0__ arg_1__ => match arg_0__, arg_1__ with | pair a b, pair as_ bs => pair (cons a as_) (cons b bs) end) (pair nil nil). -Definition unzip3 {a : Type} {b : Type} {c : Type} +#[global] Definition unzip3 {a : Type} {b : Type} {c : Type} : list (a * b * c)%type -> (list a * list b * list c)%type := foldr (fun arg_0__ arg_1__ => match arg_0__, arg_1__ with diff --git a/examples/base-src/Makefile b/examples/base-src/Makefile index 6f323c99b..9aec73b94 100644 --- a/examples/base-src/Makefile +++ b/examples/base-src/Makefile @@ -83,7 +83,7 @@ VFILES_MAN = $(addprefix $(OUT)/,$(addsuffix .v,$(HANDMOD))) VFILES_SPECIAL = $(addprefix $(OUT)/,$(addsuffix .v,$(SPECIAL_MODULES))) VFILES_DROPIN = $(addprefix $(OUT)/,$(addsuffix .v,$(DROPIN))) -VFILES = $(VFILES_GEN) $(VFILES_MAN) $(VFILES_SPECIAL) $(VFILES_DROPIN) $(VFILES_RENAMED) +VFILES = $(VFILES_MAN) $(VFILES_GEN) $(VFILES_SPECIAL) $(VFILES_DROPIN) $(VFILES_RENAMED) all: vfiles coq diff --git a/examples/base-src/deps/Data.Foldable.mk b/examples/base-src/deps/Data.Foldable.mk index 579c90e52..589d10fed 100644 --- a/examples/base-src/deps/Data.Foldable.mk +++ b/examples/base-src/deps/Data.Foldable.mk @@ -1 +1 @@ -../../base/Data/Foldable.v: ../../base/Data/Either.h2ci ../../base/Data/SemigroupInternal.h2ci ../../base/GHC/Base.h2ci +../../base/Data/Foldable.v: ../../base/Data/Either.h2ci ../../base/Data/Ord.h2ci ../../base/Data/SemigroupInternal.h2ci ../../base/GHC/Base.h2ci diff --git a/examples/base-src/deps/Data.Functor.Classes.mk b/examples/base-src/deps/Data.Functor.Classes.mk index 729271771..2b767da95 100644 --- a/examples/base-src/deps/Data.Functor.Classes.mk +++ b/examples/base-src/deps/Data.Functor.Classes.mk @@ -1 +1 @@ -../../base/Data/Functor/Classes.v: ../../base/Data/Either.h2ci ../../base/Data/Functor/Const.h2ci ../../base/Data/Functor/Identity.h2ci ../../base/GHC/Base.h2ci +../../base/Data/Functor/Classes.v: ../../base/Data/Either.h2ci ../../base/Data/Functor/Const.h2ci ../../base/Data/Functor/Identity.h2ci ../../base/Data/Ord.h2ci ../../base/GHC/Base.h2ci diff --git a/examples/base-src/deps/Data.Traversable.mk b/examples/base-src/deps/Data.Traversable.mk index b42bd3715..2c70b2d65 100644 --- a/examples/base-src/deps/Data.Traversable.mk +++ b/examples/base-src/deps/Data.Traversable.mk @@ -1 +1 @@ -../../base/Data/Traversable.v: ../../base/Data/Either.h2ci ../../base/Data/Foldable.h2ci ../../base/Data/Functor/Const.h2ci ../../base/Data/Functor/Identity.h2ci ../../base/Data/SemigroupInternal.h2ci ../../base/GHC/Base.h2ci +../../base/Data/Traversable.v: ../../base/Data/Either.h2ci ../../base/Data/Foldable.h2ci ../../base/Data/Functor/Const.h2ci ../../base/Data/Functor/Identity.h2ci ../../base/Data/Monoid.h2ci ../../base/Data/Ord.h2ci ../../base/Data/SemigroupInternal.h2ci ../../base/GHC/Base.h2ci diff --git a/examples/base-src/edits b/examples/base-src/edits index 68e6ce96a..66494f4a8 100644 --- a/examples/base-src/edits +++ b/examples/base-src/edits @@ -8,6 +8,7 @@ skip module GHC.CString skip module GHC.Classes skip module GHC.Magic skip module GHC.IO +skip module GHC.Types.IO skip module GHC.Integer skip module GHC.Show skip module Data.Data @@ -26,8 +27,8 @@ skip class GHC.Show.Show skip class GHC.Read.Read skip class GHC.Generics.Generic skip class GHC.Generics.Generic1 -skip class GHC.Exception.Exception -skip class GHC.Arr.Ix +skip class GHC.Exception.Type.Exception +skip class GHC.Ix.Ix skip class Data.Bits.Bits skip class Data.Bits.FiniteBits skip class GHC.Float.Floating @@ -46,6 +47,7 @@ skip class Data.Functor.Classes.Read1 skip class Data.Functor.Classes.Read2 skip class Data.Functor.Classes.Show2 skip class GHC.Exts.IsList +skip class Data.Type.Equality.TestEquality ## Classes that we define manually -- we need a better story for this. skip class GHC.Num.Num @@ -127,9 +129,9 @@ rename value GHC.Classes.not = negb rename value GHC.Classes.|| = orb rename value GHC.Classes.&& = andb -rename type GHC.Base.Maybe = option -rename value GHC.Base.Just = Some -rename value GHC.Base.Nothing = None +rename type GHC.Maybe.Maybe = option +rename value GHC.Maybe.Just = Some +rename value GHC.Maybe.Nothing = None skip method GHC.Base.Monad fail skip method GHC.Enum.Enum enumFromThen @@ -137,6 +139,8 @@ skip method GHC.Enum.Enum enumFromThenTo skip method GHC.Base.Semigroup stimes skip method GHC.Base.Semigroup sconcat +rename type GHC.Prim.-> = GHC.Prim.arrow + # deprecated skip method Data.Bits.Bits bitSize @@ -182,6 +186,7 @@ rename value Data.Semigroup.Internal.Product = Data.SemigroupInternal.Mk_Product rename value Data.Semigroup.Internal.Sum = Data.SemigroupInternal.Mk_Sum rename value Data.Monoid.First = Data.Monoid.Mk_First rename value Data.Monoid.Last = Data.Monoid.Mk_Last +rename value Data.Monoid.Ap = Data.Monoid.Mk_Ap rename value Data.OldList.SnocBuilder = Data.OldList.Mk_SnocBuilder rename value Data.Ord.Down = Data.Ord.Mk_Down rename value Data.Proxy.KProxy = Data.Proxy.Mk_KProxy diff --git a/examples/base-src/manual/Data/Type/Equality.h2ci b/examples/base-src/manual/Data/Type/Equality.h2ci new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/examples/base-src/manual/Data/Type/Equality.h2ci @@ -0,0 +1 @@ +{} diff --git a/examples/base-src/manual/Data/Type/Equality.v b/examples/base-src/manual/Data/Type/Equality.v index 23fd8e6dd..1b73f4a9a 100644 --- a/examples/base-src/manual/Data/Type/Equality.v +++ b/examples/base-src/manual/Data/Type/Equality.v @@ -24,6 +24,7 @@ Defined. Definition apply {k1}{k2}{f : k1 -> k2}{g}{a}{b} : (f :~: g) -> (a :~: b) -> (f a :~: g b). intros. subst. auto. Defined. +#[global] Instance Eq_EqTy {A} {a b : A} : `{Eq_ (a :~: b)} := fun _ k => k (Eq___Dict_Build _ (fun x y => true) (fun x y => false)). @@ -33,6 +34,7 @@ Instance Eq_EqTy {A} {a b : A} : `{Eq_ (a :~: b)} := fun _ k => k Class TestEquality {k1} (f : k1 -> Type) := { testEquality {a}{b} : f a -> f b -> option (a :~: b) }. +#[global] Instance TestEquality_EqTy {k}{a:k} : `{ TestEquality (fun x => a :~: x) } := { testEquality := fun a b x y => match x, y with eq_refl, eq_refl => Some eq_refl end }. diff --git a/examples/base-src/manual/GHC/Enum.v b/examples/base-src/manual/GHC/Enum.v index a84899250..e35e29ecd 100644 --- a/examples/base-src/manual/GHC/Enum.v +++ b/examples/base-src/manual/GHC/Enum.v @@ -10,7 +10,7 @@ Generalizable All Variables. Unset Strict Implicit. Unset Printing Implicit Defensive. -From Coq Require Import ssreflect. +From Coq Require Import ssreflect Lia. (* Note: we will only be able to make instances of this class for bounded types so that we can support enumFrom and still terminate. @@ -301,7 +301,7 @@ Lemma eftInt_aux_pf (y x : Int) : (x <= y)%Z -> x <> y -> (x+1 <= y)%Z. -Proof. unfold Int in *; omega. Qed. +Proof. unfold Int in *; lia. Qed. (* Manually copying `GHC.Enum.eftInt`'s local function `go` *) Program Fixpoint eftInt_aux (y x : Int) (pf : (x <= y)%Z) {measure (Z.to_nat (y - x))} : list Int := @@ -309,7 +309,7 @@ Program Fixpoint eftInt_aux (y x : Int) (pf : (x <= y)%Z) {measure (Z.to_nat (y | left _ => nil | right neq => eftInt_aux (eftInt_aux_pf pf neq) end%Z. -Next Obligation. apply Z2Nat.inj_lt; omega. Defined. +Next Obligation. apply Z2Nat.inj_lt; lia. Defined. Arguments eftInt_aux _ _ _ : clear implicits. (* Manually copying `GHC.Enum.eftInt` *) diff --git a/examples/base-src/manual/GHC/Num.v b/examples/base-src/manual/GHC/Num.v index 013c5b97d..aee3deef4 100644 --- a/examples/base-src/manual/GHC/Num.v +++ b/examples/base-src/manual/GHC/Num.v @@ -42,6 +42,7 @@ Notation "'_*_'" := op_zt__. Notation "'#' n" := (fromInteger n) (at level 1, format "'#' n"). +#[global] Instance Num_Int__ : Num Int := { op_zp__ := Z.add %Z; op_zm__ := Z.sub %Z; @@ -51,6 +52,7 @@ Instance Num_Int__ : Num Int := { negate := Z.opp %Z; signum := Z.sgn %Z; }. +#[global] Instance Num_Integer__ : Num Integer := { op_zp__ := Z.add %Z; op_zm__ := Z.sub %Z; @@ -76,6 +78,7 @@ Proof. contradiction. Qed. +#[global] Instance Num_Word__ : Num Word := { op_zp__ := N.add %N; op_zm__ := safeSubN; diff --git a/examples/base-src/manual/GHC/Prim.v b/examples/base-src/manual/GHC/Prim.v index 2bb7060b4..dc8f49cb2 100644 --- a/examples/base-src/manual/GHC/Prim.v +++ b/examples/base-src/manual/GHC/Prim.v @@ -10,6 +10,7 @@ Definition TYPE (_ : RuntimeRep) := Type. Class Coercible a b := { coerce : a -> b }. +#[global] Instance Coercible_Unpeel a b c {U1 : Unpeel a c} diff --git a/examples/base-src/manual/GHC/Real.v b/examples/base-src/manual/GHC/Real.v index b54c43d67..4abb2f4ce 100644 --- a/examples/base-src/manual/GHC/Real.v +++ b/examples/base-src/manual/GHC/Real.v @@ -30,6 +30,7 @@ Definition Qabs (q : Rational) : Rational := Definition Qsignum (q : Rational) : Rational := QArith_base.Qmake (Z.sgn (QArith_base.Qnum q)) (QArith_base.Qden q). +#[global] Instance Num_Q__ : Num Rational := { op_zp__ := QArith_base.Qplus; op_zm__ := QArith_base.Qminus; @@ -40,12 +41,14 @@ Instance Num_Q__ : Num Rational := { signum := Qsignum; }. - Instance Eq_Q : Eq_ Rational := fun _ k => k {| +#[global] +Instance Eq_Q : Eq_ Rational := fun _ k => k {| op_zeze____ := Qeq_bool; op_zsze____ := fun x y => negb (Qeq_bool x y) |}. - Instance Ord_Q : Ord Rational := +#[global] +Instance Ord_Q : Ord Rational := ord_default Qcompare. @@ -91,10 +94,12 @@ Definition ratioPrec1 : Int := (ratioPrec + #1)%Z. Definition fromIntegral {a} {b} `{(Integral a)} `{(Num b)} : (a -> b) := (fromInteger ∘ toInteger). +#[global] Instance instance__Real_Int__72__ : (Real Int) := { toRational := (fun x => QArith_base.Qmake x 1) }. +#[global] Instance instance__Integral_Int__74__ : (Integral Int) := { toInteger := id ; quot := Z.quot ; @@ -104,10 +109,12 @@ Instance instance__Integral_Int__74__ : (Integral Int) := { quotRem := Z.quotrem ; divMod := fun x y => (Z.div x y, Z.modulo x y) }. +#[global] Instance instance__Real_Word : (Real Word) := { toRational := (fun x => QArith_base.Qmake (Z.of_N x) 1) }. +#[global] Instance instance__Integral_Word : (Integral Word) := { toInteger := Z.of_N ; quot := N.div ; diff --git a/examples/base-src/manual/HsToCoq/Err.v b/examples/base-src/manual/HsToCoq/Err.v index 1075d130c..7c4f01d3c 100644 --- a/examples/base-src/manual/HsToCoq/Err.v +++ b/examples/base-src/manual/HsToCoq/Err.v @@ -5,17 +5,17 @@ Class Default (a :Type) := { default : a }. -Instance default_num {a} `{ Num a} : Default a := { default := #0 }. -Instance default_bool : Default bool := { default := false }. -Instance default_monoid {a} `{ Monoid a } : Default a := +#[global] Instance default_num {a} `{ Num a} : Default a := { default := #0 }. +#[global] Instance default_bool : Default bool := { default := false }. +#[global] Instance default_monoid {a} `{ Monoid a } : Default a := { default := mempty }. -Instance default_applicative {a}{f} `{Default a} `{Applicative f} +#[global] Instance default_applicative {a}{f} `{Default a} `{Applicative f} : Default (f a ) := { default := pure default }. -Instance default_pair {a}{b}`{Default a}`{Default b} : Default (a * b)%type := +#[global] Instance default_pair {a}{b}`{Default a}`{Default b} : Default (a * b)%type := { default := pair default default }. -Instance default_arr {a}{b} `{Default b} : Default (a -> b) := { default := fun x => default }. -Instance default_option {a} : Default (option a) := { default := None }. -Instance default_list {a} : Default (list a) := { default := nil } . +#[global] Instance default_arr {a}{b} `{Default b} : Default (a -> b) := { default := fun x => default }. +#[global] Instance default_option {a} : Default (option a) := { default := None }. +#[global] Instance default_list {a} : Default (list a) := { default := nil } . diff --git a/examples/base-src/manual/HsToCoq/Nat.v b/examples/base-src/manual/HsToCoq/Nat.v index fb7c6a330..fea6734db 100644 --- a/examples/base-src/manual/HsToCoq/Nat.v +++ b/examples/base-src/manual/HsToCoq/Nat.v @@ -8,6 +8,7 @@ Require GHC.Num. Require GHC.Real. Require GHC.Enum. +#[global] Instance Default_nat : HsToCoq.Err.Default nat := HsToCoq.Err.Build_Default _ 0. @@ -16,6 +17,7 @@ Instance Default_nat : HsToCoq.Err.Default nat := Definition error_sub := fun x y => if Nat.ltb x y then HsToCoq.Err.default else Nat.sub x y. +#[global] Instance Num_nat : GHC.Num.Num nat := { op_zp__ := Nat.add; op_zm__ := error_sub; @@ -25,15 +27,18 @@ Instance Num_nat : GHC.Num.Num nat := { negate := fun x => x; signum := fun x => x; }. +#[global] Instance Eq_nat : GHC.Base.Eq_ nat := fun _ k => k {| GHC.Base.op_zeze____ := fun x y => (Nat.eqb x y); GHC.Base.op_zsze____ := fun x y => negb (Nat.eqb x y); |}. +#[global] Instance Ord_nat : GHC.Base.Ord nat := GHC.Base.ord_default Nat.compare. +#[global] Instance Real_nat : GHC.Real.Real nat := {| Real.toRational := fun x : nat => QArith_base.inject_Z (BinInt.Z.of_nat x) |}. @@ -42,6 +47,7 @@ Definition enumFromTo_nat : nat -> nat -> list nat := fun start stop => List.seq start (error_sub stop start). +#[global] Instance Enum_nat : GHC.Enum.Enum nat := {| Enum.enumFrom := enumFrom_nat; Enum.enumFromTo := enumFromTo_nat; diff --git a/examples/base-src/manual/HsToCoq/Unpeel.v b/examples/base-src/manual/HsToCoq/Unpeel.v index 84c869db4..341949b70 100644 --- a/examples/base-src/manual/HsToCoq/Unpeel.v +++ b/examples/base-src/manual/HsToCoq/Unpeel.v @@ -4,8 +4,10 @@ Class Unpeel a b := { unpeel : a -> b ; repeel : b -> a }. +#[global] Instance Unpeel_refl a : Unpeel a a := Build_Unpeel _ _ (fun x => x) (fun x => x). +#[global] Instance Unpeel_arrow a b c d `{Unpeel b a} @@ -15,6 +17,7 @@ Instance Unpeel_arrow ; repeel f x := repeel (f (unpeel x)) }. +#[global] Instance Unpeel_pair a b c d `{Unpeel a b} @@ -26,6 +29,8 @@ Instance Unpeel_pair Require Coq.Lists.List. + +#[global] Instance Unpeel_list a b `{Unpeel a b} : Unpeel (list a) (list b) := { unpeel x := Coq.Lists.List.map unpeel x diff --git a/examples/base-src/module-edits/Data/Monoid/edits b/examples/base-src/module-edits/Data/Monoid/edits index 357002a5d..7e0faaeb1 100644 --- a/examples/base-src/module-edits/Data/Monoid/edits +++ b/examples/base-src/module-edits/Data/Monoid/edits @@ -1,3 +1,5 @@ +data kinds Data.Monoid.Ap (Type -> Type), Type + add Data.Monoid Instance Unpeel_First a : HsToCoq.Unpeel.Unpeel (First a) (option a) := HsToCoq.Unpeel.Build_Unpeel _ _ getFirst Mk_First. add Data.Monoid Instance Unpeel_Last a : HsToCoq.Unpeel.Unpeel (Last a) (option a) := diff --git a/examples/base-src/module-edits/Data/Ord/midamble.v b/examples/base-src/module-edits/Data/Ord/midamble.v new file mode 100644 index 000000000..1b7596d21 --- /dev/null +++ b/examples/base-src/module-edits/Data/Ord/midamble.v @@ -0,0 +1,13 @@ +#[local] Definition Eq___Down_op_zeze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} + : Down inst_a -> Down inst_a -> bool := + GHC.Prim.coerce _GHC.Base.==_. + +#[local] Definition Eq___Down_op_zsze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} + : Down inst_a -> Down inst_a -> bool := + GHC.Prim.coerce _GHC.Base./=_. + +#[global] Program Instance Eq___Down {a : Type} `{GHC.Base.Eq_ a} + : GHC.Base.Eq_ (Down a) := + fun _ k__ => + k__ {| GHC.Base.op_zeze____ := Eq___Down_op_zeze__ ; + GHC.Base.op_zsze____ := Eq___Down_op_zsze__ |}. diff --git a/examples/base-src/module-edits/GHC/Base/edits b/examples/base-src/module-edits/GHC/Base/edits index 4933b5235..44573c3f0 100644 --- a/examples/base-src/module-edits/GHC/Base/edits +++ b/examples/base-src/module-edits/GHC/Base/edits @@ -24,6 +24,7 @@ skip GHC.Base.unIO skip GHC.Base.thenIO skip GHC.Base.returnIO skip GHC.Base.bindIO +skip GHC.Base.failIO skip GHC.Base.Functor__IO skip GHC.Base.Applicative__IO skip GHC.Base.Alternative__IO diff --git a/examples/base-src/module-edits/GHC/Base/midamble.v b/examples/base-src/module-edits/GHC/Base/midamble.v index b8c10272b..398481ca3 100644 --- a/examples/base-src/module-edits/GHC/Base/midamble.v +++ b/examples/base-src/module-edits/GHC/Base/midamble.v @@ -153,11 +153,13 @@ Infix ">=" := (op_zgze__) (no associativity, at level 70). (*********** Eq/Ord for primitive types **************************) +#[global] Instance Eq_Int___ : Eq_ Int := fun _ k => k {| op_zeze____ := fun x y => (x =? y)%Z; op_zsze____ := fun x y => negb (x =? y)%Z; |}. +#[global] Instance Ord_Int___ : Ord Int := fun _ k => k {| op_zl____ := fun x y => (x (x <=? y)%Z; @@ -168,11 +170,13 @@ Instance Ord_Int___ : Ord Int := fun _ k => k {| min__ := Z.min%Z; |}. +#[global] Instance Eq_Integer___ : Eq_ Integer := fun _ k => k {| op_zeze____ := fun x y => (x =? y)%Z; op_zsze____ := fun x y => negb (x =? y)%Z; |}. +#[global] Instance Ord_Integer___ : Ord Integer := fun _ k => k {| op_zl____ := fun x y => (x (x <=? y)%Z; @@ -183,11 +187,13 @@ Instance Ord_Integer___ : Ord Integer := fun _ k => k {| min__ := Z.min%Z; |}. +#[global] Instance Eq_Word___ : Eq_ Word := fun _ k => k {| op_zeze____ := fun x y => (x =? y)%N; op_zsze____ := fun x y => negb (x =? y)%N; |}. +#[global] Instance Ord_Word___ : Ord Word := fun _ k => k {| op_zl____ := fun x y => (x (x <=? y)%N; @@ -198,11 +204,13 @@ Instance Ord_Word___ : Ord Word := fun _ k => k {| min__ := N.min%N; |}. +#[global] Instance Eq_Char___ : Eq_ Char := fun _ k => k {| op_zeze____ := fun x y => (x =? y)%N; op_zsze____ := fun x y => negb (x =? y)%N; |}. +#[global] Instance Ord_Char___ : Ord Char := fun _ k => k {| op_zl____ := fun x y => (x (x <=? y)%N; @@ -213,6 +221,7 @@ Instance Ord_Char___ : Ord Char := fun _ k => k {| min__ := N.min%N; |}. +#[global] Instance Eq_bool___ : Eq_ bool := fun _ k => k {| op_zeze____ := eqb; op_zsze____ := fun x y => negb (eqb x y); @@ -226,6 +235,7 @@ Definition compare_bool (b1:bool)(b2:bool) : comparison := | false , true => Lt end. +#[global] Instance Ord_bool___ : Ord bool := fun _ k => k {| op_zl____ := fun x y => andb (negb x) y; op_zlze____ := fun x y => orb (negb x) y; @@ -236,11 +246,13 @@ Instance Ord_bool___ : Ord bool := fun _ k => k {| min__ := andb |}. +#[global] Instance Eq_unit___ : Eq_ unit := fun _ k => k {| op_zeze____ := fun x y => true; op_zsze____ := fun x y => false; |}. +#[global] Instance Ord_unit___ : Ord unit := fun _ k => k {| op_zl____ := fun x y => false; op_zlze____ := fun x y => true; @@ -259,6 +271,7 @@ Definition eq_comparison (x : comparison) (y: comparison) := | _ , _ => false end. +#[global] Instance Eq_comparison___ : Eq_ comparison := fun _ k => k {| op_zeze____ := eq_comparison; @@ -293,6 +306,7 @@ Definition ord_default {a} (comp : a -> a -> comparison) `{Eq_ a} : Ord a := | _ => x end)). +#[global] Instance Ord_comparison___ : Ord comparison := ord_default compare_comparison. Definition eq_pair {t1} {t2} `{Eq_ t1} `{Eq_ t2} (a b : (t1 * t2)) := @@ -311,11 +325,13 @@ Definition compare_pair {t1} {t2} `{Ord t1} `{Ord t2} (a b : (t1 * t2)) := end end. +#[global] Instance Eq_pair___ {a} {b} `{Eq_ a} `{Eq_ b} : Eq_ (a * b) := fun _ k => k {| op_zeze____ := eq_pair; op_zsze____ := fun x y => negb (eq_pair x y) |}. +#[global] Instance Ord_pair___ {a} {b} `{Ord a} `{Ord b} : Ord (a * b) := ord_default compare_pair. @@ -341,11 +357,13 @@ Fixpoint compare_list {a} `{Ord a} (xs : list a) (ys : list a) : comparison := end end. +#[global] Instance Eq_list {a} `{Eq_ a} : Eq_ (list a) := fun _ k => k {| op_zeze____ := eqlist; op_zsze____ := fun x y => negb (eqlist x y) |}. +#[global] Instance Ord_list {a} `{Ord a}: Ord (list a) := ord_default compare_list. diff --git a/examples/ghc/ghc b/examples/ghc/ghc index 51abb1c88..1f02b7430 160000 --- a/examples/ghc/ghc +++ b/examples/ghc/ghc @@ -1 +1 @@ -Subproject commit 51abb1c88b53e2989a2a8c2939ac4abc04bef194 +Subproject commit 1f02b7430b2fbab403d7ffdde9cfd006e884678e diff --git a/src/lib/HsToCoq/Coq/FreeVars.hs b/src/lib/HsToCoq/Coq/FreeVars.hs index a928df8d8..8bf45efdc 100644 --- a/src/lib/HsToCoq/Coq/FreeVars.hs +++ b/src/lib/HsToCoq/Coq/FreeVars.hs @@ -303,8 +303,9 @@ instance HasFV Qualid AssumptionKeyword where fvOf Hypotheses = mempty instance HasFV Qualid Locality where - fvOf Global = mempty - fvOf Local = mempty + fvOf Global = mempty + fvOf Local = mempty + fvOf ExportL = mempty instance HasFV Qualid AssertionKeyword where fvOf Theorem = mempty diff --git a/src/lib/HsToCoq/Coq/Gallina.hs b/src/lib/HsToCoq/Coq/Gallina.hs index a50b720d8..7ae5c0895 100644 --- a/src/lib/HsToCoq/Coq/Gallina.hs +++ b/src/lib/HsToCoq/Coq/Gallina.hs @@ -311,7 +311,8 @@ data Assums = Assums (NonEmpty Qualid) Term deriving (Eq, Ord, Show, Read, Typeable, Data) -- |@[Local] ::=@ – not a part of the grammar /per se/, but a common fragment -data Locality = Global -- ^@@ – (nothing – but sometimes @Global@) +data Locality = ExportL -- ^@@ – (nothing – but sometimes @Export@) + | Global -- ^@Global@ | Local -- ^@Local@ deriving (Eq, Ord, Show, Read, Enum, Bounded, Typeable, Data) diff --git a/src/lib/HsToCoq/Coq/Pretty.hs b/src/lib/HsToCoq/Coq/Pretty.hs index 8e9c86a98..0a108b595 100644 --- a/src/lib/HsToCoq/Coq/Pretty.hs +++ b/src/lib/HsToCoq/Coq/Pretty.hs @@ -550,6 +550,8 @@ instance Gallina Sentence where renderGallina' p (DefinitionSentence def) = renderGallina' p def renderGallina' p (InductiveSentence ind) = renderGallina' p ind renderGallina' p (FixpointSentence fix) = renderGallina' p fix + renderGallina' p (ProgramSentence sen@(InstanceSentence _) pf) = "#[global]" + "Program" <+> renderGallina' p sen renderObligation pf renderGallina' p (ProgramSentence sen pf) = "Program" <+> renderGallina' p sen renderObligation pf renderGallina' p (AssertionSentence ass pf) = renderGallina' p ass renderGallina' p pf renderGallina' p (ModuleSentence mod) = renderGallina' p mod @@ -581,17 +583,20 @@ instance Gallina Assums where renderAss ids ty = fillSep (renderGallina <$> ids) <> nest 2 (render_type ty) instance Gallina Locality where - renderGallina' _ Global = "(*Global*)" - renderGallina' _ Local = "Local" + renderGallina' _ ExportL = "#[export]" + renderGallina' _ Global = "#[global]" + renderGallina' _ Local = "#[local]" renderLocality :: Locality -> Doc -renderLocality Global = empty -renderLocality Local = "Local" <> space +renderLocality ExportL = empty +renderLocality Global = "#[global]" <> space +renderLocality Local = "#[local]" <> space renderFullLocality :: Maybe Locality -> Doc renderFullLocality Nothing = empty -renderFullLocality (Just Global) = "Global" <> space -renderFullLocality (Just Local) = "Local" <> space +renderFullLocality (Just ExportL) = "#[export]" <> space +renderFullLocality (Just Global) = "#[global]" <> space +renderFullLocality (Just Local) = "#[local]" <> space instance Gallina Definition where renderGallina' _ = \case diff --git a/stack.yaml b/stack.yaml index 9c28baf82..4b7fe0df3 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-12.0 +resolver: lts-18.19 packages: - '.' extra-deps: [] From c0d5a10676276e68698d94e2f9108fc1c7e65d73 Mon Sep 17 00:00:00 2001 From: Nicholas Coltharp Date: Tue, 25 Jun 2024 13:43:15 -0700 Subject: [PATCH 02/24] Use /usr/bin/echo for non-FHS systems --- examples/tests/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/tests/Makefile b/examples/tests/Makefile index 6b04604f5..1ebfec362 100644 --- a/examples/tests/Makefile +++ b/examples/tests/Makefile @@ -93,7 +93,7 @@ todo_translate: $(foreach f, $(TODO_TRANSLATE), $(f).fail_translate) @echo -------- END UNTRANSLATABLE ------------ %.pass : %.v - @/bin/echo -n "$<: " + @/usr/bin/env echo -n "$<: " @if ! test -e $<; \ then echo -e "\033[1;31mmissing\033[0m (should pass)"; exit 1;\ elif ! $(TYPECHECK) $< >&/dev/null;\ @@ -102,7 +102,7 @@ todo_translate: $(foreach f, $(TODO_TRANSLATE), $(f).fail_translate) fi %.fail : %.v - @/bin/echo -n "$<: " + @/usr/bin/env echo -n "$<: " @if ! test -e $<; \ then echo -e "\033[1;31mmissing\033[0m"; \ elif ! $(TYPECHECK) $< >&/dev/null; \ @@ -111,7 +111,7 @@ todo_translate: $(foreach f, $(TODO_TRANSLATE), $(f).fail_translate) fi %.fail_translate : %.v - @/bin/echo -n "$<: " + @/usr/bin/env echo -n "$<: " @if ! test -e $<; \ then echo -e "\033[1;31mmissing\033[0m"; \ elif ! $(TYPECHECK) $< >&/dev/null; \ From c0e79f0456e276ee2ea6c1ac667fb4dcefa7a69f Mon Sep 17 00:00:00 2001 From: Nicholas Coltharp Date: Tue, 25 Jun 2024 13:43:56 -0700 Subject: [PATCH 03/24] Use lia instead of omega in examples --- examples/tests/NonStructuralRec/edits | 2 +- examples/tests/NonStructuralRec/preamble.v | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/tests/NonStructuralRec/edits b/examples/tests/NonStructuralRec/edits index 6a00a69e6..bd3dddb6f 100644 --- a/examples/tests/NonStructuralRec/edits +++ b/examples/tests/NonStructuralRec/edits @@ -6,4 +6,4 @@ rename value NonStructuralRec.S = S rename value NonStructuralRec.add = Nat.add termination NonStructuralRec.mapTree2 { measure (NonStructuralRec.size arg_1__) } -obligations NonStructuralRec.mapTree2 prog_omega +obligations NonStructuralRec.mapTree2 prog_lia diff --git a/examples/tests/NonStructuralRec/preamble.v b/examples/tests/NonStructuralRec/preamble.v index 1f24b12e9..606c8bfde 100644 --- a/examples/tests/NonStructuralRec/preamble.v +++ b/examples/tests/NonStructuralRec/preamble.v @@ -1,3 +1,3 @@ Require Coq.Program.Tactics. -Require Omega. -Ltac prog_omega := Coq.Program.Tactics.program_simpl;simpl;Omega.omega. +Require Lia. +Ltac prog_lia := Coq.Program.Tactics.program_simpl;simpl;Lia.lia. From b48f97972a7e3862484c55f909a5793788d1bb87 Mon Sep 17 00:00:00 2001 From: Nicholas Coltharp Date: Tue, 25 Jun 2024 13:44:13 -0700 Subject: [PATCH 04/24] Add GHC.Maybe edits in tests Unclear why this is necessary. Further investigation needed. --- examples/tests/Guard2/edits | 4 ++++ examples/tests/SkipConstructor/edits | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/examples/tests/Guard2/edits b/examples/tests/Guard2/edits index 2822a0a59..fedd91125 100644 --- a/examples/tests/Guard2/edits +++ b/examples/tests/Guard2/edits @@ -1,2 +1,6 @@ skip module GHC.Err skip Guard2.Default__T + +rename type GHC.Maybe.Maybe = option +rename value GHC.Maybe.Just = Some +rename value GHC.Maybe.Nothing = None diff --git a/examples/tests/SkipConstructor/edits b/examples/tests/SkipConstructor/edits index 4c451c13e..3ebaa4dc9 100644 --- a/examples/tests/SkipConstructor/edits +++ b/examples/tests/SkipConstructor/edits @@ -8,3 +8,7 @@ skip equation SkipConstructor.extraUnderscore _ # We don't link against GHC skip module GHC.Skip # It's been copied into the preamble skip SkipConstructor.Default__T + +rename type GHC.Maybe.Maybe = option +rename value GHC.Maybe.Just = Some +rename value GHC.Maybe.Nothing = None From cbd3c9e475b9b6936d1800c615dd1875fcfcd48f Mon Sep 17 00:00:00 2001 From: Nicholas Coltharp Date: Tue, 16 Jul 2024 22:44:24 -0700 Subject: [PATCH 05/24] Emit derived instances for GHC >=8.10 GHC changed the way that derived instances are processed. The new code closely follows code from newer GHC versions, namely in the function `tcTyClsInstDecls`. --- src/lib/HsToCoq/Util/GHC/Deriving.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/HsToCoq/Util/GHC/Deriving.hs b/src/lib/HsToCoq/Util/GHC/Deriving.hs index bb62e7440..b2f8390f6 100644 --- a/src/lib/HsToCoq/Util/GHC/Deriving.hs +++ b/src/lib/HsToCoq/Util/GHC/Deriving.hs @@ -35,6 +35,9 @@ import Type import TcType import HscTypes import TcInstDcls +#if __GLASGOW_HASKELL__ >= 810 +import TcTyClsDecls +#endif import Module import SrcLoc import FastString @@ -58,7 +61,8 @@ addDerivedInstances tcm = do -- so that GHC will allow us to re-typecheck existing instances setGblEnv tcg_env_hack $ #if __GLASGOW_HASKELL__ >= 810 - tcInstDeclsDeriv [] (hs_derivds hsgroup) + do (_, _, deriv_info) <- tcTyAndClassDecls (hs_tyclds hsgroup) + tcInstDeclsDeriv deriv_info (hs_derivds hsgroup) #else tcInstDeclsDeriv [] (hs_tyclds hsgroup >>= group_tyclds) (hs_derivds hsgroup) #endif From c92b6be00e6bb44108d8682902308a2c0094beb8 Mon Sep 17 00:00:00 2001 From: Nicholas Coltharp Date: Tue, 16 Jul 2024 22:47:54 -0700 Subject: [PATCH 06/24] Fix some instance orders --- .../module-edits/Data/Semigroup/Internal/edits | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/base-src/module-edits/Data/Semigroup/Internal/edits b/examples/base-src/module-edits/Data/Semigroup/Internal/edits index 47d847571..1576f6b93 100644 --- a/examples/base-src/module-edits/Data/Semigroup/Internal/edits +++ b/examples/base-src/module-edits/Data/Semigroup/Internal/edits @@ -21,12 +21,12 @@ add Data.SemigroupInternal Instance Unpeel_Product a : HsToCoq.Unpeel.Unpeel (Pr add Data.SemigroupInternal Instance Unpeel_Sum a : HsToCoq.Unpeel.Unpeel (Sum a) a := HsToCoq.Unpeel.Build_Unpeel _ _ getSum Mk_Sum. -order Unpeel_Any Data.SemigroupInternal.Eq___Any_op_zeze__ -order Unpeel_All Data.SemigroupInternal.Eq___All_op_zeze__ +order Unpeel_Any Data.SemigroupInternal.Semigroup__Any_op_zlzlzgzg__ +order Unpeel_All Data.SemigroupInternal.Semigroup__All_op_zlzlzgzg__ order Unpeel_Alt Data.SemigroupInternal.Eq___Alt_op_zeze__ -order Unpeel_Product Data.SemigroupInternal.Eq___Product_op_zeze__ -order Unpeel_Sum Data.SemigroupInternal.Eq___Sum_op_zeze__ -order Unpeel_Dual Data.SemigroupInternal.Eq___Dual_op_zeze__ +order Unpeel_Product Data.SemigroupInternal.Semigroup__Product_op_zlzlzgzg__ +order Unpeel_Sum Data.SemigroupInternal.Semigroup__Sum_op_zlzlzgzg__ +order Unpeel_Dual Data.SemigroupInternal.Functor__Dual_fmap order Unpeel_Endo Data.SemigroupInternal.Semigroup__Endo_op_zlzlzgzg__ order Data.SemigroupInternal.Eq___Any Data.SemigroupInternal.Ord__Any From 597d5815f6f5f4f4ee37d0dfb162393344450831 Mon Sep 17 00:00:00 2001 From: Nicholas Coltharp Date: Wed, 24 Jul 2024 18:58:17 -0700 Subject: [PATCH 07/24] Merge `GHC.Maybe` into `GHC.Base` This averts a problem caused by `GHC/Base.hs` importing `GHC/Maybe.hs`. --- examples/base-src/Makefile | 22 ++++++++++++++++--- examples/base-src/edits | 2 ++ examples/base-src/module-edits/GHC/Base/edits | 1 - 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/examples/base-src/Makefile b/examples/base-src/Makefile index 9aec73b94..fc303a36b 100644 --- a/examples/base-src/Makefile +++ b/examples/base-src/Makefile @@ -31,7 +31,6 @@ HANDMOD = \ # Generated modules # generated directly from GHC/libraries/base MODULES = \ - GHC/Base \ Data/Maybe \ GHC/List \ Data/List \ @@ -74,8 +73,8 @@ RENAMED = \ DROPIN = # also generated from drop-in/ -SPECIAL_MODULES = - +SPECIAL_MODULES = \ + GHC/Base VFILES_GEN = $(addprefix $(OUT)/,$(addsuffix .v,$(MODULES))) VFILES_RENAMED = $(addprefix $(OUT)/,$(addsuffix .v,$(RENAMED))) @@ -151,6 +150,23 @@ $(OUT)/Data/SemigroupInternal.v : $(wildcard module-edits/Data/Semigroup/Interna base/Data/Semigroup/Internal.hs test -e $(OUT)/Data/SemigroupInternal.v +# We merge GHC.Maybe into GHC.Base, which requires a special rule. + +GHC_BASE_PRE = $(wildcard module-edits/GHC/Base/preamble.v module-edits/GHC/Maybe/preamble.v) +GHC_BASE_MID = $(wildcard module-edits/GHC/Base/midamble.v module-edits/GHC/Maybe/midamble.v) +GHC_BASE_EDITS = $(wildcard module-edits/GHC/Base/edits module-edits/GHC/Maybe/edits) + +$(OUT)/GHC/Base.v: $(GHC_BASE_PRE) $(GHC_BASE_MID) $(GHC_BASE_EDITS) edits + if [ -n "$(GHC_BASE_PRE)" ]; then cat $(GHC_BASE_PRE) > Base_preamble.v; fi + if [ -n "$(GHC_BASE_MID)" ]; then cat $(GHC_BASE_MID) > Base_midamble.v; fi + $(HS_TO_COQ) -p Base_preamble.v \ + --midamble Base_midamble.v \ + $(addprefix -e , $(GHC_BASE_EDITS)) \ + $(HS_TO_COQ_OPTS) \ + base/GHC/Base.hs base/GHC/Maybe.hs + test -e $(OUT)/GHC/Base.v + rm -f Base_preamble.v Base_midamble.v + $(VFILES_MAN): $(OUT)/% : manual/% rm -f $@ lndir ../examples/base-src/manual $(OUT)/ diff --git a/examples/base-src/edits b/examples/base-src/edits index 66494f4a8..420e9c40b 100644 --- a/examples/base-src/edits +++ b/examples/base-src/edits @@ -129,6 +129,8 @@ rename value GHC.Classes.not = negb rename value GHC.Classes.|| = orb rename value GHC.Classes.&& = andb +rename module GHC.Maybe GHC.Base + rename type GHC.Maybe.Maybe = option rename value GHC.Maybe.Just = Some rename value GHC.Maybe.Nothing = None diff --git a/examples/base-src/module-edits/GHC/Base/edits b/examples/base-src/module-edits/GHC/Base/edits index 44573c3f0..4c2643417 100644 --- a/examples/base-src/module-edits/GHC/Base/edits +++ b/examples/base-src/module-edits/GHC/Base/edits @@ -6,7 +6,6 @@ skip module GHC.Types # replaced with Coq types skip GHC.Base.String -skip option skip Coq.Init.Datatypes.app skip GHC.Base.Opaque # can't handle existential From ef11afa423bac51338d6e56b7177e3081dc924fa Mon Sep 17 00:00:00 2001 From: Nicholas Coltharp Date: Wed, 24 Jul 2024 19:27:38 -0700 Subject: [PATCH 08/24] Fix last commit Add `/dev/null` to the list of files to `cat` so that `cat` doesn't try to read from stdin, and also to ensure that the target files always get created. --- examples/base-src/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/base-src/Makefile b/examples/base-src/Makefile index fc303a36b..482f9c7b2 100644 --- a/examples/base-src/Makefile +++ b/examples/base-src/Makefile @@ -157,8 +157,8 @@ GHC_BASE_MID = $(wildcard module-edits/GHC/Base/midamble.v module-edits/GHC/Mayb GHC_BASE_EDITS = $(wildcard module-edits/GHC/Base/edits module-edits/GHC/Maybe/edits) $(OUT)/GHC/Base.v: $(GHC_BASE_PRE) $(GHC_BASE_MID) $(GHC_BASE_EDITS) edits - if [ -n "$(GHC_BASE_PRE)" ]; then cat $(GHC_BASE_PRE) > Base_preamble.v; fi - if [ -n "$(GHC_BASE_MID)" ]; then cat $(GHC_BASE_MID) > Base_midamble.v; fi + cat /dev/null $(GHC_BASE_PRE) > Base_preamble.v + cat /dev/null $(GHC_BASE_MID) > Base_midamble.v $(HS_TO_COQ) -p Base_preamble.v \ --midamble Base_midamble.v \ $(addprefix -e , $(GHC_BASE_EDITS)) \ From b0045b58f89e9e28fde7b1e81e20155eece4d45c Mon Sep 17 00:00:00 2001 From: Nicholas Coltharp Date: Wed, 24 Jul 2024 19:53:04 -0700 Subject: [PATCH 09/24] Avoid representation polymorphism in `$` and `$!` --- examples/base-src/module-edits/GHC/Base/edits | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/base-src/module-edits/GHC/Base/edits b/examples/base-src/module-edits/GHC/Base/edits index 4c2643417..fd67cabd0 100644 --- a/examples/base-src/module-edits/GHC/Base/edits +++ b/examples/base-src/module-edits/GHC/Base/edits @@ -62,6 +62,12 @@ redefine Local Definition GHC.Base.Applicative__NonEmpty_liftA2 {a} {b} {c} : skip GHC.Base.unsafeChr skip GHC.Base.ord +# Avoid representation polymorphism. +redefine Definition GHC.Base.op_zd__ {a} {b} : (a -> b) -> a -> b := + fun f x => f x. +redefine Definition GHC.Base.op_zdzn__ {a : Type} {b : Type} : (a -> b) -> a -> b := + fun f x => let vx := x in f vx. + skip GHC.Base.shiftRL# skip GHC.Base.shiftL# skip GHC.Base.iShiftL# From d15f7f312e016395525413be8f03d0c7f7d371f2 Mon Sep 17 00:00:00 2001 From: Nicholas Coltharp Date: Wed, 31 Jul 2024 16:42:09 -0700 Subject: [PATCH 10/24] Documentation fix --- src/lib/HsToCoq/ConvertHaskell/Declarations/Instances.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/HsToCoq/ConvertHaskell/Declarations/Instances.hs b/src/lib/HsToCoq/ConvertHaskell/Declarations/Instances.hs index 58f0a17c2..f1011cc95 100644 --- a/src/lib/HsToCoq/ConvertHaskell/Declarations/Instances.hs +++ b/src/lib/HsToCoq/ConvertHaskell/Declarations/Instances.hs @@ -415,7 +415,7 @@ makeInstanceMethodSubst params = -- When desugared naïvely into Coq, this will result in a term with type -- @ -- forall {a₁}, forall {a₂ b}, - -- (a₂ -> b) -> f (Either a₁ a₂) -> f (Either a₁ b) + -- (a₂ -> b) -> Either a₁ a₂ -> Either a₁ b -- @ -- Except without the subscripts! So we have to rename either -- the per-instance variables (here, @a₁@) or the type class From c86c82dd0109d60bc5dfbe447c569e977eb09768 Mon Sep 17 00:00:00 2001 From: Nicholas Coltharp Date: Wed, 21 Aug 2024 17:27:43 -0700 Subject: [PATCH 11/24] Add `GeneralizedNewtypeDeriving` hack As of GHC 8.10.7, the base library has typeclass instances generated by `GeneralizedNewtypeDeriving`. The following definition ```haskell class C x where g :: t newtype N a = N a deriving (C) ``` is translated into the following instance: ```haskell instance C a => C (N a) where g = GHC.Prim.coerce (g) :: t' ``` where `t'` is obtained by substituting `C a` for `x` in `t`. This causes problems when `f` is a polymorphic function. For example, if `g` is `fmap`, then `t` is `forall a b. (a -> b) -> f a -> f b`. The resulting Gallina looks roughly like ```coq Definition Functor__N_fmap {inst_a : Type} `{GHC.Base.Functor inst_a} : forall {a b, Type}, (a -> b) -> N a -> N b := fun {a b : Type} => GHC.Prim.coerce (GHC.Base.fmap) : (a -> b) -> N a -> N b. ``` The problem is that `GHC.Base.fmap` has a fully-polymorphic type, but our generated `Functor__N_fmap` has already "eaten" the type arguments that it is expecting. Coq will therefore fail to find an appropriate `Coercible` instance. The underlying problem problem is that `GeneralizedNewtypeDeriving` is breaking our assumption that the body of a Haskell definition never takes any additional type arguments; i.e., all type arguments should be (implicitly) already taken before the `=`. (Comment to that effect: "ASSUMPTION: type variables don't show up in terms. Broken by ScopedTypeVariables.") The "correct" solution probably entails inferring the type of the method body and unifying it against the expected method type. But it would also require rather fishy-looking `Unpeel` instance; something like ```coq Instance Unpeel_forall (a : Type) (p q : a -> Type) (u : forall x, HsToCoq.Unpeel.Unpeel (p x) (q x)) : HsToCoq.Unpeel.Unpeel (forall x, p x) (forall x, q x). ``` which would probably have to be given explicitly. This commit instead takes the quick-and-dirty approach of simply detecting method bodies that "look like" they were generated by `GeneralizedNewtypeDeriving` and dropping their annotations. The above Gallina code becomes instead ```coq Definition Functor__N_fmap {inst_a : Type} `{GHC.Base.Functor inst_a} : forall {a b, Type}, (a -> b) -> N a -> N b := fun {a b : Type} => GHC.Prim.coerce (GHC.Base.fmap). ``` This does result in local type changes relative to the original Haskell code (e.g., the argument to `coerce` is no longer fully-quantified), but that is probably okay. Also, it could theoretically result in false positives, but that is also probably okay. --- .../ConvertHaskell/Declarations/Instances.hs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/lib/HsToCoq/ConvertHaskell/Declarations/Instances.hs b/src/lib/HsToCoq/ConvertHaskell/Declarations/Instances.hs index f1011cc95..c2ab4f5e7 100644 --- a/src/lib/HsToCoq/ConvertHaskell/Declarations/Instances.hs +++ b/src/lib/HsToCoq/ConvertHaskell/Declarations/Instances.hs @@ -16,6 +16,7 @@ import Data.Semigroup (Semigroup(..), (<>)) import Data.Traversable import HsToCoq.Util.Traversable import Data.Maybe +import Data.List.NonEmpty (NonEmpty(..)) import qualified Data.List.NonEmpty as NE import Data.Bifunctor import Data.Monoid @@ -288,7 +289,18 @@ convertClsInstDecl env cid@ClsInstDecl{..} = do (Just bind, _, _) -> local (envFor meth) $ convertMethodBinding localMeth bind >>= \case ConvertedDefinitionBinding cd -> - pure . CM_Defined CL_Term $ maybeFun (cd^.convDefArgs) (cd^.convDefBody) + let body = case cd^.convDefBody of + -- HACK Detect definitions emitted by + -- GeneralizedNewtypeDeriving (in GHC 8.10.7) and adjust + -- to avoid `Unpeel` instance resolution problems. This + -- is a liberal heuristic: it will identify any body of + -- the form `coerce f :: t` as having been generated by + -- GeneralizedNewtypeDeriving. In practice, this is + -- unlikely to be a problem, since all we do is throw away + -- the ascription. + HasType app@(App (Qualid (Qualified "GHC.Prim" "coerce")) (PosArg (Parens (Qualid _)) :| [])) _ -> app + b -> b + in pure . CM_Defined CL_Term $ maybeFun (cd^.convDefArgs) body -- We have a tough time handling recursion (including mutual -- recursion) here because of name overloading ConvertedPatternBinding {} -> From 8b4f82d4d14baa3683bcc37d0d516b09d4d6c522 Mon Sep 17 00:00:00 2001 From: Nicholas Coltharp Date: Wed, 21 Aug 2024 18:19:37 -0700 Subject: [PATCH 12/24] `Data.Monoid` edits --- examples/base-src/module-edits/Data/Monoid/edits | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/base-src/module-edits/Data/Monoid/edits b/examples/base-src/module-edits/Data/Monoid/edits index 7e0faaeb1..af2da37ef 100644 --- a/examples/base-src/module-edits/Data/Monoid/edits +++ b/examples/base-src/module-edits/Data/Monoid/edits @@ -1,9 +1,12 @@ -data kinds Data.Monoid.Ap (Type -> Type), Type +polykinds Data.Monoid.Ap k +data kinds Data.Monoid.Ap (k -> Type), k add Data.Monoid Instance Unpeel_First a : HsToCoq.Unpeel.Unpeel (First a) (option a) := HsToCoq.Unpeel.Build_Unpeel _ _ getFirst Mk_First. add Data.Monoid Instance Unpeel_Last a : HsToCoq.Unpeel.Unpeel (Last a) (option a) := HsToCoq.Unpeel.Build_Unpeel _ _ getLast Mk_Last. +add Data.Monoid Instance Unpeel_Ap (k : Type) (f : k -> Type) (a : k) : HsToCoq.Unpeel.Unpeel (Ap f a) (f a) := + HsToCoq.Unpeel.Build_Unpeel _ _ getAp Mk_Ap. order Unpeel_Dual Data.Monoid.Eq___Dual_op_zeze__ order Unpeel_Dual Data.Monoid.Eq___Dual_op_zsze__ @@ -22,6 +25,9 @@ order Data.Monoid.Eq___First Data.Monoid.Ord__First order Unpeel_First Data.Monoid.Functor__First Data.Monoid.Applicative__First Data.Monoid.Monad__First order Data.Monoid.Semigroup__First Data.Monoid.Monoid__First_mappend +order Unpeel_Ap Data.Monoid.Applicative__Ap_liftA2 +order Data.Monoid.Functor__Ap Data.Monoid.Applicative__Ap + # Read and Show instances skip Data.Monoid.Read__Last skip Data.Monoid.Read__First From 8c96aae3c8b98a59a6b416d954925f1564f9f712 Mon Sep 17 00:00:00 2001 From: Nicholas Coltharp Date: Wed, 21 Aug 2024 18:23:44 -0700 Subject: [PATCH 13/24] `Data.Semigroup.Internal` edits --- .../base-src/module-edits/Data/Semigroup/Internal/edits | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/base-src/module-edits/Data/Semigroup/Internal/edits b/examples/base-src/module-edits/Data/Semigroup/Internal/edits index 1576f6b93..5783aa840 100644 --- a/examples/base-src/module-edits/Data/Semigroup/Internal/edits +++ b/examples/base-src/module-edits/Data/Semigroup/Internal/edits @@ -21,12 +21,18 @@ add Data.SemigroupInternal Instance Unpeel_Product a : HsToCoq.Unpeel.Unpeel (Pr add Data.SemigroupInternal Instance Unpeel_Sum a : HsToCoq.Unpeel.Unpeel (Sum a) a := HsToCoq.Unpeel.Build_Unpeel _ _ getSum Mk_Sum. +order Unpeel_Any Data.SemigroupInternal.Eq___Any_op_zeze__ order Unpeel_Any Data.SemigroupInternal.Semigroup__Any_op_zlzlzgzg__ +order Unpeel_All Data.SemigroupInternal.Eq___All_op_zeze__ order Unpeel_All Data.SemigroupInternal.Semigroup__All_op_zlzlzgzg__ order Unpeel_Alt Data.SemigroupInternal.Eq___Alt_op_zeze__ +order Unpeel_Alt Data.SemigroupInternal.Semigroup__Alt_op_zlzlzgzg__ +order Unpeel_Product Data.SemigroupInternal.Eq___Product_op_zeze__ order Unpeel_Product Data.SemigroupInternal.Semigroup__Product_op_zlzlzgzg__ +order Unpeel_Sum Data.SemigroupInternal.Eq___Sum_op_zeze__ order Unpeel_Sum Data.SemigroupInternal.Semigroup__Sum_op_zlzlzgzg__ -order Unpeel_Dual Data.SemigroupInternal.Functor__Dual_fmap +order Unpeel_Dual Data.SemigroupInternal.Eq___Dual_op_zeze__ +order Unpeel_Dual Data.SemigroupInternal.Semigroup__Dual_op_zlzlzgzg__ order Unpeel_Endo Data.SemigroupInternal.Semigroup__Endo_op_zlzlzgzg__ order Data.SemigroupInternal.Eq___Any Data.SemigroupInternal.Ord__Any From 7d48c5904c0eec5758b99fa32cfbc5db937bf21b Mon Sep 17 00:00:00 2001 From: Nicholas Coltharp Date: Wed, 21 Aug 2024 18:27:22 -0700 Subject: [PATCH 14/24] Remove `Data.Ord` midamble --- examples/base-src/module-edits/Data/Ord/midamble.v | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 examples/base-src/module-edits/Data/Ord/midamble.v diff --git a/examples/base-src/module-edits/Data/Ord/midamble.v b/examples/base-src/module-edits/Data/Ord/midamble.v deleted file mode 100644 index 1b7596d21..000000000 --- a/examples/base-src/module-edits/Data/Ord/midamble.v +++ /dev/null @@ -1,13 +0,0 @@ -#[local] Definition Eq___Down_op_zeze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} - : Down inst_a -> Down inst_a -> bool := - GHC.Prim.coerce _GHC.Base.==_. - -#[local] Definition Eq___Down_op_zsze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} - : Down inst_a -> Down inst_a -> bool := - GHC.Prim.coerce _GHC.Base./=_. - -#[global] Program Instance Eq___Down {a : Type} `{GHC.Base.Eq_ a} - : GHC.Base.Eq_ (Down a) := - fun _ k__ => - k__ {| GHC.Base.op_zeze____ := Eq___Down_op_zeze__ ; - GHC.Base.op_zsze____ := Eq___Down_op_zsze__ |}. From 0820bac5afc315e0dab7b2779f5c68f8b5c943b0 Mon Sep 17 00:00:00 2001 From: Nicholas Coltharp Date: Thu, 22 Aug 2024 16:44:42 -0700 Subject: [PATCH 15/24] Don't generate an `option` type --- examples/base-src/edits | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/base-src/edits b/examples/base-src/edits index 420e9c40b..913eecd75 100644 --- a/examples/base-src/edits +++ b/examples/base-src/edits @@ -134,6 +134,7 @@ rename module GHC.Maybe GHC.Base rename type GHC.Maybe.Maybe = option rename value GHC.Maybe.Just = Some rename value GHC.Maybe.Nothing = None +skip option skip method GHC.Base.Monad fail skip method GHC.Enum.Enum enumFromThen From 36fa55201b36f6701e7b7d4e79301341a1839a87 Mon Sep 17 00:00:00 2001 From: Nicholas Coltharp Date: Thu, 22 Aug 2024 18:40:17 -0700 Subject: [PATCH 16/24] Add `foldMap'` to `default_foldable` --- base/Data/Foldable.v | 3 +++ examples/base-src/module-edits/Data/Foldable/midamble.v | 2 ++ 2 files changed, 5 insertions(+) diff --git a/base/Data/Foldable.v b/base/Data/Foldable.v index 770b227ff..9e25cde75 100644 --- a/base/Data/Foldable.v +++ b/base/Data/Foldable.v @@ -131,6 +131,9 @@ Definition default_foldable {f:Type -> Type} (fun m (S : GHC.Base.Semigroup m) (M : GHC.Base.Monoid m) => foldMap _ _ _ _ GHC.Base.id) (* foldMap *) (@foldMap) + (* foldMap' *) + (fun m a (S : GHC.Base.Semigroup m) (M : GHC.Base.Monoid m) f => + foldl' (fun acc a => GHC.Base.op_zlzlzgzg__ acc (f a)) GHC.Base.mempty) (* foldl *) (@foldl) (* foldl' *) diff --git a/examples/base-src/module-edits/Data/Foldable/midamble.v b/examples/base-src/module-edits/Data/Foldable/midamble.v index 92b3e67f5..8b6e88192 100644 --- a/examples/base-src/module-edits/Data/Foldable/midamble.v +++ b/examples/base-src/module-edits/Data/Foldable/midamble.v @@ -23,6 +23,8 @@ Definition default_foldable {f:Type -> Type} (fun m (S : GHC.Base.Semigroup m) (M : GHC.Base.Monoid m) => foldMap _ _ _ _ GHC.Base.id) (* foldMap *) (@foldMap) + (* foldMap' *) + (fun m a (S : GHC.Base.Semigroup m) (M : GHC.Base.Monoid m) f => foldl' (fun acc a => GHC.Base.op_zlzlzgzg__ acc (f a)) GHC.Base.mempty) (* foldl *) (@foldl) (* foldl' *) From 10e3c529e900b5ef4f5cc1bec790004bca2cc92e Mon Sep 17 00:00:00 2001 From: Nicholas Coltharp Date: Thu, 22 Aug 2024 19:07:28 -0700 Subject: [PATCH 17/24] Make `Data.Monoid` depend on `Control.Monad.Fail` --- examples/base-src/deps/Data.Monoid.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/base-src/deps/Data.Monoid.mk b/examples/base-src/deps/Data.Monoid.mk index cad3a77bf..630f9c174 100644 --- a/examples/base-src/deps/Data.Monoid.mk +++ b/examples/base-src/deps/Data.Monoid.mk @@ -1 +1 @@ -../../base/Data/Monoid.v: ../../base/GHC/Base.h2ci +../../base/Data/Monoid.v: ../../base/Control/Monad/Fail.h2ci ../../base/GHC/Base.h2ci From 786739206079b2622ae345f54bd749bc0ee46640 Mon Sep 17 00:00:00 2001 From: Nicholas Coltharp Date: Thu, 22 Aug 2024 20:25:59 -0700 Subject: [PATCH 18/24] Add `Data.Foldable` edits --- examples/base-src/module-edits/Data/Foldable/edits | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/examples/base-src/module-edits/Data/Foldable/edits b/examples/base-src/module-edits/Data/Foldable/edits index cdf03ef8f..9b062a5b7 100644 --- a/examples/base-src/module-edits/Data/Foldable/edits +++ b/examples/base-src/module-edits/Data/Foldable/edits @@ -1,5 +1,8 @@ skip module GHC.Types +# For typeclass instances +import module Data.SemigroupInternal + # partial skip Data.Foldable.minimumBy @@ -48,3 +51,9 @@ skip Data.Foldable.Foldable__Par1 skip Data.Foldable.Foldable__op_ZCziZC__ skip Data.Foldable.Foldable__op_ZCztZC__ skip Data.Foldable.Foldable__op_ZCzpZC__ +skip Data.Foldable.Foldable__UWord +skip Data.Foldable.Foldable__UInt +skip Data.Foldable.Foldable__UFloat +skip Data.Foldable.Foldable__UDouble +skip Data.Foldable.Foldable__UChar +skip Data.Foldable.Foldable__UAddr From 8cbc60f4cdf94e2e9002c1c4fb3657d8a1876d0e Mon Sep 17 00:00:00 2001 From: Nicholas Coltharp Date: Fri, 23 Aug 2024 00:07:07 -0700 Subject: [PATCH 19/24] Add `Data.Traversable` edits --- examples/base-src/module-edits/Data/Traversable/edits | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/examples/base-src/module-edits/Data/Traversable/edits b/examples/base-src/module-edits/Data/Traversable/edits index 91bc1b4dc..099cd7b8a 100644 --- a/examples/base-src/module-edits/Data/Traversable/edits +++ b/examples/base-src/module-edits/Data/Traversable/edits @@ -1,3 +1,6 @@ +# For typeclass instances +import module Data.Functor.Identity + order Data.Traversable.Functor__Id Data.Traversable.Applicative__Id # instance method requires another instance of the same class @@ -33,3 +36,9 @@ skip Data.Traversable.Traversable__K1 skip Data.Traversable.Traversable__Rec1 skip Data.Traversable.Traversable__Par1 skip Data.Traversable.Traversable__V1 +skip Data.Traversable.Traversable__UWord +skip Data.Traversable.Traversable__UInt +skip Data.Traversable.Traversable__UFloat +skip Data.Traversable.Traversable__UDouble +skip Data.Traversable.Traversable__UChar +skip Data.Traversable.Traversable__UAddr From d80cc67b3403cf53f205c775ad3bc440136859f8 Mon Sep 17 00:00:00 2001 From: Nicholas Coltharp Date: Fri, 23 Aug 2024 00:22:49 -0700 Subject: [PATCH 20/24] Fix `Data.OldList` --- .../module-edits/Data/OldList/midamble.v | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/base-src/module-edits/Data/OldList/midamble.v b/examples/base-src/module-edits/Data/OldList/midamble.v index 2f8221867..69c83d8b1 100644 --- a/examples/base-src/module-edits/Data/OldList/midamble.v +++ b/examples/base-src/module-edits/Data/OldList/midamble.v @@ -1,7 +1,7 @@ Require Import GHC.Char. Require GHC.Unicode. Require Coq.Lists.List. -Require Import Omega. +Require Import Lia. Import Ascii.AsciiSyntax. Import String.StringSyntax. @@ -80,13 +80,13 @@ Lemma mergePairs_length : forall n, forall a cmp (xs : list (list a)) x y, induction n. intros; simpl. destruct xs; inversion H. simpl. auto. intros. destruct xs. -simpl in *. omega. +simpl in *. lia. destruct xs. -simpl in *. omega. +simpl in *. lia. assert (L : le (length xs) n). -simpl in H. omega. +simpl in H. lia. specialize (IHn a cmp xs l l0 L). -simpl in *. omega. +simpl in *. lia. Qed. Program Fixpoint mergeAll {a0} (cmp: a0 -> a0 -> comparison) @@ -100,10 +100,10 @@ Next Obligation. simpl. destruct xs. simpl. auto. destruct xs. simpl. auto. -apply lt_n_S. +apply Nat.succ_lt_mono. pose (MP := mergePairs_length (length xs) a0 cmp xs l l0 ltac:(auto)). clearbody MP. simpl in *. -omega. +lia. Defined. Definition sortBy {a} (cmp : a -> a -> comparison) (xs : list a): list a := @@ -132,7 +132,7 @@ Proof. + intros p s' H. simpl in *. destruct (p a) eqn:Hp. pose (K := IHs p s' H). clearbody K. - omega. + lia. inversion H. subst. auto. Qed. @@ -171,7 +171,7 @@ Next Obligation. inversion Heq_anonymous. subst. symmetry in B. pose (h2 := break_length B). - omega. + lia. Defined. Program Fixpoint lines (s : GHC.Base.String) { measure (length s) } @@ -184,5 +184,5 @@ Program Fixpoint lines (s : GHC.Base.String) { measure (length s) } pair l (match s' with | nil => nil | cons _ s'' => lines s'' end)). Next Obligation. pose (h0 := break_length Heq_anonymous). clearbody h0. simpl in h0. - omega. + lia. Defined. From 6967c8a073e9cd063e65b812c51da6842208d192 Mon Sep 17 00:00:00 2001 From: Nicholas Coltharp Date: Fri, 23 Aug 2024 00:32:08 -0700 Subject: [PATCH 21/24] Fix `Data.Bitraversable` --- examples/base-src/module-edits/Data/Bitraversable/edits | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/base-src/module-edits/Data/Bitraversable/edits b/examples/base-src/module-edits/Data/Bitraversable/edits index d36b33b83..1889dea10 100644 --- a/examples/base-src/module-edits/Data/Bitraversable/edits +++ b/examples/base-src/module-edits/Data/Bitraversable/edits @@ -1,3 +1,6 @@ +# For typeclass instances +import module Data.Functor.Identity + skip Data.Bitraversable.Bitraversable__K1 skip Data.Bitraversable.bifoldMapDefault From 7383331869e2d9052e0c9a127e0f763f0d4006d7 Mon Sep 17 00:00:00 2001 From: Nicholas Coltharp Date: Sat, 24 Aug 2024 15:36:53 -0700 Subject: [PATCH 22/24] Minor comment fix --- src/lib/HsToCoq/ConvertHaskell/Declarations/Instances.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/HsToCoq/ConvertHaskell/Declarations/Instances.hs b/src/lib/HsToCoq/ConvertHaskell/Declarations/Instances.hs index c2ab4f5e7..369696306 100644 --- a/src/lib/HsToCoq/ConvertHaskell/Declarations/Instances.hs +++ b/src/lib/HsToCoq/ConvertHaskell/Declarations/Instances.hs @@ -294,10 +294,10 @@ convertClsInstDecl env cid@ClsInstDecl{..} = do -- GeneralizedNewtypeDeriving (in GHC 8.10.7) and adjust -- to avoid `Unpeel` instance resolution problems. This -- is a liberal heuristic: it will identify any body of - -- the form `coerce f :: t` as having been generated by - -- GeneralizedNewtypeDeriving. In practice, this is - -- unlikely to be a problem, since all we do is throw away - -- the ascription. + -- the form `GHC.Prim.coerce (f) :: t` as having been + -- generated by GeneralizedNewtypeDeriving. In practice, + -- this is unlikely to be a problem, since all we do is + -- throw away the ascription. HasType app@(App (Qualid (Qualified "GHC.Prim" "coerce")) (PosArg (Parens (Qualid _)) :| [])) _ -> app b -> b in pure . CM_Defined CL_Term $ maybeFun (cd^.convDefArgs) body From bb23c5adde76e24e75d72b596e49119aff5edd7a Mon Sep 17 00:00:00 2001 From: Nicholas Coltharp Date: Tue, 27 Aug 2024 13:03:12 -0700 Subject: [PATCH 23/24] Fix `Data.Functor.Compose` --- examples/base-src/module-edits/Data/Functor/Compose/edits | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/base-src/module-edits/Data/Functor/Compose/edits b/examples/base-src/module-edits/Data/Functor/Compose/edits index ea14af7be..33ad8b34a 100644 --- a/examples/base-src/module-edits/Data/Functor/Compose/edits +++ b/examples/base-src/module-edits/Data/Functor/Compose/edits @@ -1,4 +1,5 @@ in Data.Functor.Compose.Applicative__Compose_op_zlztzg__ rewrite forall , Data.Functor.Compose.Applicative__Compose_liftA2 = GHC.Base.liftA2 +in Data.Functor.Compose.Functor__Compose_op_zlzd__ rewrite forall , Data.Functor.Compose.Functor__Compose_fmap = GHC.Base.fmap polykinds Data.Functor.Compose.Compose k k1 data kinds Data.Functor.Compose.Compose (k -> Type), (k1 -> k), k1 From a1bcedc370e16e564545b7a7c6196b6cb8a3ce78 Mon Sep 17 00:00:00 2001 From: Nicholas Coltharp Date: Tue, 27 Aug 2024 13:04:11 -0700 Subject: [PATCH 24/24] Check-in generated files --- base/Control/Applicative.v | 119 ++++- base/Data/Bitraversable.v | 22 +- base/Data/Either.v | 102 +++- base/Data/Foldable.v | 930 +++++----------------------------- base/Data/Functor/Compose.v | 11 +- base/Data/Functor/Const.v | 191 ++++++- base/Data/Functor/Identity.v | 163 +++++- base/Data/Functor/Product.v | 9 + base/Data/Functor/Sum.v | 9 + base/Data/Monoid.v | 480 +++++++++++++++++- base/Data/OldList.v | 20 +- base/Data/Ord.v | 107 +++- base/Data/Proxy.v | 6 + base/Data/Semigroup.v | 536 ++++++++++++++++++-- base/Data/SemigroupInternal.v | 556 +++++++++++++++++++- base/Data/Traversable.v | 370 +------------- base/Data/Void.v | 63 ++- base/GHC/Base.v | 115 ++++- base/_CoqProject | 4 +- 19 files changed, 2463 insertions(+), 1350 deletions(-) diff --git a/base/Control/Applicative.v b/base/Control/Applicative.v index de457f7b2..74118bb86 100644 --- a/base/Control/Applicative.v +++ b/base/Control/Applicative.v @@ -16,6 +16,7 @@ Require Control.Arrow. Require Control.Category. Require Data.Tuple. Require GHC.Base. +Require GHC.Prim. Require HsToCoq.Unpeel. Import Control.Arrow.Notations. Import Control.Category.Notations. @@ -45,31 +46,65 @@ Arguments WrapArrow {_} {_} {_} _. (* Converted value declarations: *) -#[local] Definition Functor__WrappedMonad_fmap {inst_m : Type -> Type} +(* Skipping all instances of class `GHC.Show.Show', including + `Control.Applicative.Show__ZipList' *) + +(* Skipping instance `Control.Applicative.Eq___ZipList' of class + `GHC.Base.Eq_' *) + +(* Skipping instance `Control.Applicative.Ord__ZipList' of class + `GHC.Base.Ord' *) + +(* Skipping all instances of class `GHC.Read.Read', including + `Control.Applicative.Read__ZipList' *) + +(* Skipping instance `Control.Applicative.Functor__ZipList' of class + `GHC.Base.Functor' *) + +(* Skipping instance `Control.Applicative.Foldable__ZipList' of class + `Data.Foldable.Foldable' *) + +(* Skipping all instances of class `GHC.Generics.Generic', including + `Control.Applicative.Generic__ZipList' *) + +(* Skipping all instances of class `GHC.Generics.Generic1', including + `Control.Applicative.Generic1__TYPE__ZipList__LiftedRep' *) + +(* Skipping all instances of class `GHC.Generics.Generic', including + `Control.Applicative.Generic__WrappedArrow' *) + +(* Skipping all instances of class `GHC.Generics.Generic1', including + `Control.Applicative.Generic1__TYPE__WrappedArrow__LiftedRep' *) + +(* Skipping all instances of class `GHC.Generics.Generic', including + `Control.Applicative.Generic__WrappedMonad' *) + +(* Skipping all instances of class `GHC.Generics.Generic1', including + `Control.Applicative.Generic1__TYPE__WrappedMonad__LiftedRep' *) + +Instance Unpeel_WrappedMonad {m} {a} + : HsToCoq.Unpeel.Unpeel (WrappedMonad m a) (m a) := + HsToCoq.Unpeel.Build_Unpeel _ _ unwrapMonad WrapMonad. + +#[local] Definition Monad__WrappedMonad_op_zgzg__ {inst_m : Type -> Type} `{GHC.Base.Monad inst_m} : forall {a : Type}, - forall {b : Type}, (a -> b) -> WrappedMonad inst_m a -> WrappedMonad inst_m b := - fun {a : Type} {b : Type} => - fun arg_0__ arg_1__ => - match arg_0__, arg_1__ with - | f, WrapMonad v => WrapMonad (GHC.Base.liftM f v) - end. + forall {b : Type}, + WrappedMonad inst_m a -> WrappedMonad inst_m b -> WrappedMonad inst_m b := + fun {a : Type} {b : Type} => GHC.Prim.coerce (_GHC.Base.>>_). -#[local] Definition Functor__WrappedMonad_op_zlzd__ {inst_m : Type -> Type} +#[local] Definition Monad__WrappedMonad_op_zgzgze__ {inst_m : Type -> Type} `{GHC.Base.Monad inst_m} : forall {a : Type}, - forall {b : Type}, a -> WrappedMonad inst_m b -> WrappedMonad inst_m a := - fun {a : Type} {b : Type} => - Functor__WrappedMonad_fmap GHC.Base.∘ GHC.Base.const. + forall {b : Type}, + WrappedMonad inst_m a -> + (a -> WrappedMonad inst_m b) -> WrappedMonad inst_m b := + fun {a : Type} {b : Type} => GHC.Prim.coerce (_GHC.Base.>>=_). -#[global] -Program Instance Functor__WrappedMonad {m : Type -> Type} `{GHC.Base.Monad m} - : GHC.Base.Functor (WrappedMonad m) := - fun _ k__ => - k__ {| GHC.Base.fmap__ := fun {a : Type} {b : Type} => - Functor__WrappedMonad_fmap ; - GHC.Base.op_zlzd____ := fun {a : Type} {b : Type} => - Functor__WrappedMonad_op_zlzd__ |}. +#[local] Definition Monad__WrappedMonad_return_ {inst_m : Type -> Type} + `{GHC.Base.Monad inst_m} + : forall {a : Type}, a -> WrappedMonad inst_m a := + fun {a : Type} => GHC.Prim.coerce (GHC.Base.return_). #[local] Definition Applicative__WrappedMonad_liftA2 {inst_m : Type -> Type} `{GHC.Base.Monad inst_m} @@ -96,6 +131,32 @@ Program Instance Functor__WrappedMonad {m : Type -> Type} `{GHC.Base.Monad m} | WrapMonad f, WrapMonad v => WrapMonad (GHC.Base.ap f v) end. +#[local] Definition Functor__WrappedMonad_fmap {inst_m : Type -> Type} + `{GHC.Base.Monad inst_m} + : forall {a : Type}, + forall {b : Type}, (a -> b) -> WrappedMonad inst_m a -> WrappedMonad inst_m b := + fun {a : Type} {b : Type} => + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | f, WrapMonad v => WrapMonad (GHC.Base.liftM f v) + end. + +#[local] Definition Functor__WrappedMonad_op_zlzd__ {inst_m : Type -> Type} + `{GHC.Base.Monad inst_m} + : forall {a : Type}, + forall {b : Type}, a -> WrappedMonad inst_m b -> WrappedMonad inst_m a := + fun {a : Type} {b : Type} => + Functor__WrappedMonad_fmap GHC.Base.∘ GHC.Base.const. + +#[global] +Program Instance Functor__WrappedMonad {m : Type -> Type} `{GHC.Base.Monad m} + : GHC.Base.Functor (WrappedMonad m) := + fun _ k__ => + k__ {| GHC.Base.fmap__ := fun {a : Type} {b : Type} => + Functor__WrappedMonad_fmap ; + GHC.Base.op_zlzd____ := fun {a : Type} {b : Type} => + Functor__WrappedMonad_op_zlzd__ |}. + #[local] Definition Applicative__WrappedMonad_op_ztzg__ {inst_m : Type -> Type} `{GHC.Base.Monad inst_m} : forall {a : Type}, @@ -123,6 +184,16 @@ Program Instance Applicative__WrappedMonad {m : Type -> Type} `{GHC.Base.Monad Applicative__WrappedMonad_op_ztzg__ ; GHC.Base.pure__ := fun {a : Type} => Applicative__WrappedMonad_pure |}. +#[global] +Program Instance Monad__WrappedMonad {m : Type -> Type} `{GHC.Base.Monad m} + : GHC.Base.Monad (WrappedMonad m) := + fun _ k__ => + k__ {| GHC.Base.op_zgzg____ := fun {a : Type} {b : Type} => + Monad__WrappedMonad_op_zgzg__ ; + GHC.Base.op_zgzgze____ := fun {a : Type} {b : Type} => + Monad__WrappedMonad_op_zgzgze__ ; + GHC.Base.return___ := fun {a : Type} => Monad__WrappedMonad_return_ |}. + (* Skipping all instances of class `GHC.Base.Alternative', including `Control.Applicative.Alternative__WrappedMonad' *) @@ -222,16 +293,14 @@ Instance Unpeel_WrappedArrow {a} {b} {c} : HsToCoq.Unpeel.Unpeel (WrappedArrow a b c) (a b c) := HsToCoq.Unpeel.Build_Unpeel _ _ unwrapArrow WrapArrow. -Instance Unpeel_WrappedMonad {m} {a} - : HsToCoq.Unpeel.Unpeel (WrappedMonad m a) (m a) := - HsToCoq.Unpeel.Build_Unpeel _ _ unwrapMonad WrapMonad. - (* External variables: Type Control.Arrow.Arrow Control.Arrow.arr Control.Arrow.op_zazaza__ Control.Category.op_zgzgzg__ Data.Tuple.uncurry GHC.Base.Applicative GHC.Base.Functor GHC.Base.Monad GHC.Base.ap GHC.Base.const GHC.Base.fmap__ GHC.Base.id GHC.Base.liftA2__ GHC.Base.liftM GHC.Base.liftM2 - GHC.Base.op_z2218U__ GHC.Base.op_zlzd__ GHC.Base.op_zlzd____ - GHC.Base.op_zlztzg____ GHC.Base.op_ztzg____ GHC.Base.pure GHC.Base.pure__ + GHC.Base.op_z2218U__ GHC.Base.op_zgzg__ GHC.Base.op_zgzg____ + GHC.Base.op_zgzgze__ GHC.Base.op_zgzgze____ GHC.Base.op_zlzd__ + GHC.Base.op_zlzd____ GHC.Base.op_zlztzg____ GHC.Base.op_ztzg____ GHC.Base.pure + GHC.Base.pure__ GHC.Base.return_ GHC.Base.return___ GHC.Prim.coerce HsToCoq.Unpeel.Build_Unpeel HsToCoq.Unpeel.Unpeel *) diff --git a/base/Data/Bitraversable.v b/base/Data/Bitraversable.v index 3d3bddf28..594ed1b80 100644 --- a/base/Data/Bitraversable.v +++ b/base/Data/Bitraversable.v @@ -17,7 +17,7 @@ Require Data.Bifunctor. Require Data.Either. Require Data.Functor. Require Data.Functor.Const. -Require Data.Functor.Identity. +Require Import Data.Functor.Identity. Require Data.Functor.Utils. Require GHC.Base. Require GHC.Prim. @@ -384,21 +384,19 @@ Program Instance Bitraversable__Const #[global] Definition bimapDefault {t : Type -> Type -> Type} {a : Type} {b : Type} {c : Type} {d : Type} `{Bitraversable t} : (a -> b) -> (c -> d) -> t a c -> t b d := - GHC.Prim.coerce (bitraverse : (a -> Data.Functor.Identity.Identity b) -> - (c -> Data.Functor.Identity.Identity d) -> - t a c -> Data.Functor.Identity.Identity (t b d)). + GHC.Prim.coerce (bitraverse : (a -> Identity b) -> + (c -> Identity d) -> t a c -> Identity (t b d)). (* Skipping definition `Data.Bitraversable.bifoldMapDefault' *) (* External variables: - Type op_zt__ pair Data.Bifoldable.Bifoldable Data.Bifunctor.Bifunctor + Identity Type op_zt__ pair Data.Bifoldable.Bifoldable Data.Bifunctor.Bifunctor Data.Either.Either Data.Either.Left Data.Either.Right Data.Functor.op_zlzdzg__ Data.Functor.Const.Const Data.Functor.Const.Mk_Const - Data.Functor.Identity.Identity Data.Functor.Utils.Mk_StateL - Data.Functor.Utils.Mk_StateR Data.Functor.Utils.runStateL - Data.Functor.Utils.runStateR GHC.Base.Applicative GHC.Base.flip GHC.Base.id - GHC.Base.liftA2 GHC.Base.op_z2218U__ GHC.Prim.coerce GHC.Tuple.pair2 - GHC.Tuple.pair3 GHC.Tuple.pair4 GHC.Tuple.pair5 GHC.Tuple.pair6 GHC.Tuple.pair7 - GHC.Tuple.pair_type GHC.Tuple.quad_type GHC.Tuple.quint_type GHC.Tuple.sept_type - GHC.Tuple.sext_type GHC.Tuple.triple_type + Data.Functor.Utils.Mk_StateL Data.Functor.Utils.Mk_StateR + Data.Functor.Utils.runStateL Data.Functor.Utils.runStateR GHC.Base.Applicative + GHC.Base.flip GHC.Base.id GHC.Base.liftA2 GHC.Base.op_z2218U__ GHC.Prim.coerce + GHC.Tuple.pair2 GHC.Tuple.pair3 GHC.Tuple.pair4 GHC.Tuple.pair5 GHC.Tuple.pair6 + GHC.Tuple.pair7 GHC.Tuple.pair_type GHC.Tuple.quad_type GHC.Tuple.quint_type + GHC.Tuple.sept_type GHC.Tuple.sext_type GHC.Tuple.triple_type *) diff --git a/base/Data/Either.v b/base/Data/Either.v index 6ed35ff16..d65fb8731 100644 --- a/base/Data/Either.v +++ b/base/Data/Either.v @@ -28,6 +28,91 @@ Arguments Right {_} {_} _. (* Converted value declarations: *) +#[local] Definition Eq___Either_op_zeze__ {inst_a : Type} {inst_b : Type} + `{GHC.Base.Eq_ inst_a} `{GHC.Base.Eq_ inst_b} + : Either inst_a inst_b -> Either inst_a inst_b -> bool := + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | Left a1, Left b1 => ((a1 GHC.Base.== b1)) + | Right a1, Right b1 => ((a1 GHC.Base.== b1)) + | _, _ => false + end. + +#[local] Definition Eq___Either_op_zsze__ {inst_a : Type} {inst_b : Type} + `{GHC.Base.Eq_ inst_a} `{GHC.Base.Eq_ inst_b} + : Either inst_a inst_b -> Either inst_a inst_b -> bool := + fun x y => negb (Eq___Either_op_zeze__ x y). + +#[global] +Program Instance Eq___Either {a : Type} {b : Type} `{GHC.Base.Eq_ a} + `{GHC.Base.Eq_ b} + : GHC.Base.Eq_ (Either a b) := + fun _ k__ => + k__ {| GHC.Base.op_zeze____ := Eq___Either_op_zeze__ ; + GHC.Base.op_zsze____ := Eq___Either_op_zsze__ |}. + +#[local] Definition Ord__Either_op_zl__ {inst_a : Type} {inst_b : Type} + `{GHC.Base.Ord inst_a} `{GHC.Base.Ord inst_b} + : Either inst_a inst_b -> Either inst_a inst_b -> bool := + fun a b => + match a with + | Left a1 => match b with | Left b1 => (a1 GHC.Base.< b1) | _ => true end + | Right a1 => match b with | Right b1 => (a1 GHC.Base.< b1) | _ => false end + end. + +#[local] Definition Ord__Either_op_zlze__ {inst_a : Type} {inst_b : Type} + `{GHC.Base.Ord inst_a} `{GHC.Base.Ord inst_b} + : Either inst_a inst_b -> Either inst_a inst_b -> bool := + fun a b => negb (Ord__Either_op_zl__ b a). + +#[local] Definition Ord__Either_op_zg__ {inst_a : Type} {inst_b : Type} + `{GHC.Base.Ord inst_a} `{GHC.Base.Ord inst_b} + : Either inst_a inst_b -> Either inst_a inst_b -> bool := + fun a b => Ord__Either_op_zl__ b a. + +#[local] Definition Ord__Either_op_zgze__ {inst_a : Type} {inst_b : Type} + `{GHC.Base.Ord inst_a} `{GHC.Base.Ord inst_b} + : Either inst_a inst_b -> Either inst_a inst_b -> bool := + fun a b => negb (Ord__Either_op_zl__ a b). + +#[local] Definition Ord__Either_compare {inst_a : Type} {inst_b : Type} + `{GHC.Base.Ord inst_a} `{GHC.Base.Ord inst_b} + : Either inst_a inst_b -> Either inst_a inst_b -> comparison := + fun a b => + match a with + | Left a1 => match b with | Left b1 => (GHC.Base.compare a1 b1) | _ => Lt end + | Right a1 => match b with | Right b1 => (GHC.Base.compare a1 b1) | _ => Gt end + end. + +#[local] Definition Ord__Either_max {inst_a : Type} {inst_b : Type} + `{GHC.Base.Ord inst_a} `{GHC.Base.Ord inst_b} + : Either inst_a inst_b -> Either inst_a inst_b -> Either inst_a inst_b := + fun x y => if Ord__Either_op_zlze__ x y : bool then y else x. + +#[local] Definition Ord__Either_min {inst_a : Type} {inst_b : Type} + `{GHC.Base.Ord inst_a} `{GHC.Base.Ord inst_b} + : Either inst_a inst_b -> Either inst_a inst_b -> Either inst_a inst_b := + fun x y => if Ord__Either_op_zlze__ x y : bool then x else y. + +#[global] +Program Instance Ord__Either {a : Type} {b : Type} `{GHC.Base.Ord a} + `{GHC.Base.Ord b} + : GHC.Base.Ord (Either a b) := + fun _ k__ => + k__ {| GHC.Base.op_zl____ := Ord__Either_op_zl__ ; + GHC.Base.op_zlze____ := Ord__Either_op_zlze__ ; + GHC.Base.op_zg____ := Ord__Either_op_zg__ ; + GHC.Base.op_zgze____ := Ord__Either_op_zgze__ ; + GHC.Base.compare__ := Ord__Either_compare ; + GHC.Base.max__ := Ord__Either_max ; + GHC.Base.min__ := Ord__Either_min |}. + +(* Skipping all instances of class `GHC.Read.Read', including + `Data.Either.Read__Either' *) + +(* Skipping all instances of class `GHC.Show.Show', including + `Data.Either.Show__Either' *) + #[local] Definition Functor__Either_fmap {inst_a : Type} : forall {a : Type}, forall {b : Type}, (a -> b) -> Either inst_a a -> Either inst_a b := @@ -199,11 +284,14 @@ Program Instance Monad__Either {e : Type} : GHC.Base.Monad (Either e) := end. (* External variables: - Type bool cons false list nil op_zt__ pair true Coq.Lists.List.flat_map - GHC.Base.Applicative GHC.Base.Functor GHC.Base.Monad GHC.Base.Semigroup - GHC.Base.const GHC.Base.fmap GHC.Base.fmap__ GHC.Base.foldr GHC.Base.id - GHC.Base.liftA2__ GHC.Base.op_z2218U__ GHC.Base.op_zgzg____ - GHC.Base.op_zgzgze____ GHC.Base.op_zlzd__ GHC.Base.op_zlzd____ - GHC.Base.op_zlzlzgzg____ GHC.Base.op_zlztzg____ GHC.Base.op_ztzg____ - GHC.Base.pure GHC.Base.pure__ GHC.Base.return___ + Gt Lt Type bool comparison cons false list negb nil op_zt__ pair true + Coq.Lists.List.flat_map GHC.Base.Applicative GHC.Base.Eq_ GHC.Base.Functor + GHC.Base.Monad GHC.Base.Ord GHC.Base.Semigroup GHC.Base.compare + GHC.Base.compare__ GHC.Base.const GHC.Base.fmap GHC.Base.fmap__ GHC.Base.foldr + GHC.Base.id GHC.Base.liftA2__ GHC.Base.max__ GHC.Base.min__ GHC.Base.op_z2218U__ + GHC.Base.op_zeze__ GHC.Base.op_zeze____ GHC.Base.op_zg____ GHC.Base.op_zgze____ + GHC.Base.op_zgzg____ GHC.Base.op_zgzgze____ GHC.Base.op_zl__ GHC.Base.op_zl____ + GHC.Base.op_zlzd__ GHC.Base.op_zlzd____ GHC.Base.op_zlze____ + GHC.Base.op_zlzlzgzg____ GHC.Base.op_zlztzg____ GHC.Base.op_zsze____ + GHC.Base.op_ztzg____ GHC.Base.pure GHC.Base.pure__ GHC.Base.return___ *) diff --git a/base/Data/Foldable.v b/base/Data/Foldable.v index 9e25cde75..9ee470ce9 100644 --- a/base/Data/Foldable.v +++ b/base/Data/Foldable.v @@ -21,7 +21,7 @@ Require Data.Maybe. Require Data.Monoid. Require Data.Ord. Require Data.Proxy. -Require Data.SemigroupInternal. +Require Import Data.SemigroupInternal. Require GHC.Base. Require GHC.List. Require GHC.Num. @@ -132,8 +132,7 @@ Definition default_foldable {f:Type -> Type} (* foldMap *) (@foldMap) (* foldMap' *) - (fun m a (S : GHC.Base.Semigroup m) (M : GHC.Base.Monoid m) f => - foldl' (fun acc a => GHC.Base.op_zlzlzgzg__ acc (f a)) GHC.Base.mempty) + (fun m a (S : GHC.Base.Semigroup m) (M : GHC.Base.Monoid m) f => foldl' (fun acc a => GHC.Base.op_zlzlzgzg__ acc (f a)) GHC.Base.mempty) (* foldl *) (@foldl) (* foldl' *) @@ -227,10 +226,8 @@ Definition default_foldable_foldr (f : Type -> Type) forall {a : Type}, (b -> a -> b) -> b -> Data.Ord.Down a -> b := fun {b : Type} {a : Type} => fun f z t => - Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual - (Foldable__Down_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ - (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ - GHC.Base.flip f)) t)) z. + appEndo (getDual (Foldable__Down_foldMap (Mk_Dual GHC.Base.∘ + (Mk_Endo GHC.Base.∘ GHC.Base.flip f)) t)) z. #[local] Definition Foldable__Down_foldr' : forall {a : Type}, @@ -254,14 +251,12 @@ Definition default_foldable_foldr (f : Type -> Type) #[local] Definition Foldable__Down_product : forall {a : Type}, forall `{GHC.Num.Num a}, Data.Ord.Down a -> a := fun {a : Type} `{GHC.Num.Num a} => - Coq.Program.Basics.compose Data.SemigroupInternal.getProduct - (Foldable__Down_foldMap Data.SemigroupInternal.Mk_Product). + Coq.Program.Basics.compose getProduct (Foldable__Down_foldMap Mk_Product). #[local] Definition Foldable__Down_sum : forall {a : Type}, forall `{GHC.Num.Num a}, Data.Ord.Down a -> a := fun {a : Type} `{GHC.Num.Num a} => - Coq.Program.Basics.compose Data.SemigroupInternal.getSum (Foldable__Down_foldMap - Data.SemigroupInternal.Mk_Sum). + Coq.Program.Basics.compose getSum (Foldable__Down_foldMap Mk_Sum). #[local] Definition Foldable__Down_toList : forall {a : Type}, Data.Ord.Down a -> list a := @@ -286,620 +281,23 @@ Program Instance Foldable__Down : Foldable Data.Ord.Down := sum__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__Down_sum ; toList__ := fun {a : Type} => Foldable__Down_toList |}. -#[local] Definition Foldable__UWord_foldMap - : forall {m : Type}, - forall {a : Type}, - forall `{GHC.Base.Monoid m}, (a -> m) -> GHC.Generics.UWord a -> m := - fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => - fun arg_0__ arg_1__ => - match arg_0__, arg_1__ with - | f, GHC.Generics.UWord a1 => GHC.Base.mempty - end. - -#[local] Definition Foldable__UWord_fold - : forall {m : Type}, forall `{GHC.Base.Monoid m}, GHC.Generics.UWord m -> m := - fun {m : Type} `{GHC.Base.Monoid m} => Foldable__UWord_foldMap GHC.Base.id. - -#[local] Definition Foldable__UWord_foldr - : forall {a : Type}, - forall {b : Type}, (a -> b -> b) -> b -> GHC.Generics.UWord a -> b := - fun {a : Type} {b : Type} => - fun arg_0__ arg_1__ arg_2__ => - match arg_0__, arg_1__, arg_2__ with - | f, z, GHC.Generics.UWord a1 => z - end. - -#[local] Definition Foldable__UWord_foldl' - : forall {b : Type}, - forall {a : Type}, (b -> a -> b) -> b -> GHC.Generics.UWord a -> b := - fun {b : Type} {a : Type} => - fun f z0 xs => - let f' := fun x k z => k (f z x) in Foldable__UWord_foldr f' GHC.Base.id xs z0. - -#[local] Definition Foldable__UWord_foldMap' - : forall {m : Type}, - forall {a : Type}, - forall `{GHC.Base.Monoid m}, (a -> m) -> GHC.Generics.UWord a -> m := - fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => - fun f => - Foldable__UWord_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. - -#[local] Definition Foldable__UWord_foldl - : forall {b : Type}, - forall {a : Type}, (b -> a -> b) -> b -> GHC.Generics.UWord a -> b := - fun {b : Type} {a : Type} => - fun f z t => - Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual - (Foldable__UWord_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ - (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ - GHC.Base.flip f)) t)) z. - -#[local] Definition Foldable__UWord_foldr' - : forall {a : Type}, - forall {b : Type}, (a -> b -> b) -> b -> GHC.Generics.UWord a -> b := - fun {a : Type} {b : Type} => - fun f z0 xs => - let f' := fun k x z => k (f x z) in Foldable__UWord_foldl f' GHC.Base.id xs z0. - -#[local] Definition Foldable__UWord_length - : forall {a : Type}, GHC.Generics.UWord a -> GHC.Num.Int := - fun {a : Type} => - Foldable__UWord_foldl' (fun arg_0__ arg_1__ => - match arg_0__, arg_1__ with - | c, _ => c GHC.Num.+ #1 - end) #0. - -#[local] Definition Foldable__UWord_null - : forall {a : Type}, GHC.Generics.UWord a -> bool := - fun {a : Type} => fun '(GHC.Generics.UWord a1) => true. - -#[local] Definition Foldable__UWord_product - : forall {a : Type}, forall `{GHC.Num.Num a}, GHC.Generics.UWord a -> a := - fun {a : Type} `{GHC.Num.Num a} => - Coq.Program.Basics.compose Data.SemigroupInternal.getProduct - (Foldable__UWord_foldMap Data.SemigroupInternal.Mk_Product). - -#[local] Definition Foldable__UWord_sum - : forall {a : Type}, forall `{GHC.Num.Num a}, GHC.Generics.UWord a -> a := - fun {a : Type} `{GHC.Num.Num a} => - Coq.Program.Basics.compose Data.SemigroupInternal.getSum - (Foldable__UWord_foldMap Data.SemigroupInternal.Mk_Sum). - -#[local] Definition Foldable__UWord_toList - : forall {a : Type}, GHC.Generics.UWord a -> list a := - fun {a : Type} => - fun t => GHC.Base.build' (fun _ => (fun c n => Foldable__UWord_foldr c n t)). - -#[global] -Program Instance Foldable__UWord : Foldable GHC.Generics.UWord := - fun _ k__ => - k__ {| fold__ := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__UWord_fold ; - foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => - Foldable__UWord_foldMap ; - foldMap'__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => - Foldable__UWord_foldMap' ; - foldl__ := fun {b : Type} {a : Type} => Foldable__UWord_foldl ; - foldl'__ := fun {b : Type} {a : Type} => Foldable__UWord_foldl' ; - foldr__ := fun {a : Type} {b : Type} => Foldable__UWord_foldr ; - foldr'__ := fun {a : Type} {b : Type} => Foldable__UWord_foldr' ; - length__ := fun {a : Type} => Foldable__UWord_length ; - null__ := fun {a : Type} => Foldable__UWord_null ; - product__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__UWord_product ; - sum__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__UWord_sum ; - toList__ := fun {a : Type} => Foldable__UWord_toList |}. - -#[local] Definition Foldable__UInt_foldMap - : forall {m : Type}, - forall {a : Type}, - forall `{GHC.Base.Monoid m}, (a -> m) -> GHC.Generics.UInt a -> m := - fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => - fun arg_0__ arg_1__ => - match arg_0__, arg_1__ with - | f, GHC.Generics.UInt a1 => GHC.Base.mempty - end. - -#[local] Definition Foldable__UInt_fold - : forall {m : Type}, forall `{GHC.Base.Monoid m}, GHC.Generics.UInt m -> m := - fun {m : Type} `{GHC.Base.Monoid m} => Foldable__UInt_foldMap GHC.Base.id. - -#[local] Definition Foldable__UInt_foldr - : forall {a : Type}, - forall {b : Type}, (a -> b -> b) -> b -> GHC.Generics.UInt a -> b := - fun {a : Type} {b : Type} => - fun arg_0__ arg_1__ arg_2__ => - match arg_0__, arg_1__, arg_2__ with - | f, z, GHC.Generics.UInt a1 => z - end. - -#[local] Definition Foldable__UInt_foldl' - : forall {b : Type}, - forall {a : Type}, (b -> a -> b) -> b -> GHC.Generics.UInt a -> b := - fun {b : Type} {a : Type} => - fun f z0 xs => - let f' := fun x k z => k (f z x) in Foldable__UInt_foldr f' GHC.Base.id xs z0. - -#[local] Definition Foldable__UInt_foldMap' - : forall {m : Type}, - forall {a : Type}, - forall `{GHC.Base.Monoid m}, (a -> m) -> GHC.Generics.UInt a -> m := - fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => - fun f => - Foldable__UInt_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. - -#[local] Definition Foldable__UInt_foldl - : forall {b : Type}, - forall {a : Type}, (b -> a -> b) -> b -> GHC.Generics.UInt a -> b := - fun {b : Type} {a : Type} => - fun f z t => - Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual - (Foldable__UInt_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ - (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ - GHC.Base.flip f)) t)) z. - -#[local] Definition Foldable__UInt_foldr' - : forall {a : Type}, - forall {b : Type}, (a -> b -> b) -> b -> GHC.Generics.UInt a -> b := - fun {a : Type} {b : Type} => - fun f z0 xs => - let f' := fun k x z => k (f x z) in Foldable__UInt_foldl f' GHC.Base.id xs z0. - -#[local] Definition Foldable__UInt_length - : forall {a : Type}, GHC.Generics.UInt a -> GHC.Num.Int := - fun {a : Type} => - Foldable__UInt_foldl' (fun arg_0__ arg_1__ => - match arg_0__, arg_1__ with - | c, _ => c GHC.Num.+ #1 - end) #0. - -#[local] Definition Foldable__UInt_null - : forall {a : Type}, GHC.Generics.UInt a -> bool := - fun {a : Type} => fun '(GHC.Generics.UInt a1) => true. - -#[local] Definition Foldable__UInt_product - : forall {a : Type}, forall `{GHC.Num.Num a}, GHC.Generics.UInt a -> a := - fun {a : Type} `{GHC.Num.Num a} => - Coq.Program.Basics.compose Data.SemigroupInternal.getProduct - (Foldable__UInt_foldMap Data.SemigroupInternal.Mk_Product). - -#[local] Definition Foldable__UInt_sum - : forall {a : Type}, forall `{GHC.Num.Num a}, GHC.Generics.UInt a -> a := - fun {a : Type} `{GHC.Num.Num a} => - Coq.Program.Basics.compose Data.SemigroupInternal.getSum (Foldable__UInt_foldMap - Data.SemigroupInternal.Mk_Sum). - -#[local] Definition Foldable__UInt_toList - : forall {a : Type}, GHC.Generics.UInt a -> list a := - fun {a : Type} => - fun t => GHC.Base.build' (fun _ => (fun c n => Foldable__UInt_foldr c n t)). - -#[global] -Program Instance Foldable__UInt : Foldable GHC.Generics.UInt := - fun _ k__ => - k__ {| fold__ := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__UInt_fold ; - foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => - Foldable__UInt_foldMap ; - foldMap'__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => - Foldable__UInt_foldMap' ; - foldl__ := fun {b : Type} {a : Type} => Foldable__UInt_foldl ; - foldl'__ := fun {b : Type} {a : Type} => Foldable__UInt_foldl' ; - foldr__ := fun {a : Type} {b : Type} => Foldable__UInt_foldr ; - foldr'__ := fun {a : Type} {b : Type} => Foldable__UInt_foldr' ; - length__ := fun {a : Type} => Foldable__UInt_length ; - null__ := fun {a : Type} => Foldable__UInt_null ; - product__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__UInt_product ; - sum__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__UInt_sum ; - toList__ := fun {a : Type} => Foldable__UInt_toList |}. - -#[local] Definition Foldable__UFloat_foldMap - : forall {m : Type}, - forall {a : Type}, - forall `{GHC.Base.Monoid m}, (a -> m) -> GHC.Generics.UFloat a -> m := - fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => - fun arg_0__ arg_1__ => - match arg_0__, arg_1__ with - | f, GHC.Generics.UFloat a1 => GHC.Base.mempty - end. - -#[local] Definition Foldable__UFloat_fold - : forall {m : Type}, forall `{GHC.Base.Monoid m}, GHC.Generics.UFloat m -> m := - fun {m : Type} `{GHC.Base.Monoid m} => Foldable__UFloat_foldMap GHC.Base.id. - -#[local] Definition Foldable__UFloat_foldr - : forall {a : Type}, - forall {b : Type}, (a -> b -> b) -> b -> GHC.Generics.UFloat a -> b := - fun {a : Type} {b : Type} => - fun arg_0__ arg_1__ arg_2__ => - match arg_0__, arg_1__, arg_2__ with - | f, z, GHC.Generics.UFloat a1 => z - end. - -#[local] Definition Foldable__UFloat_foldl' - : forall {b : Type}, - forall {a : Type}, (b -> a -> b) -> b -> GHC.Generics.UFloat a -> b := - fun {b : Type} {a : Type} => - fun f z0 xs => - let f' := fun x k z => k (f z x) in Foldable__UFloat_foldr f' GHC.Base.id xs z0. - -#[local] Definition Foldable__UFloat_foldMap' - : forall {m : Type}, - forall {a : Type}, - forall `{GHC.Base.Monoid m}, (a -> m) -> GHC.Generics.UFloat a -> m := - fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => - fun f => - Foldable__UFloat_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. - -#[local] Definition Foldable__UFloat_foldl - : forall {b : Type}, - forall {a : Type}, (b -> a -> b) -> b -> GHC.Generics.UFloat a -> b := - fun {b : Type} {a : Type} => - fun f z t => - Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual - (Foldable__UFloat_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ - (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ - GHC.Base.flip f)) t)) z. - -#[local] Definition Foldable__UFloat_foldr' - : forall {a : Type}, - forall {b : Type}, (a -> b -> b) -> b -> GHC.Generics.UFloat a -> b := - fun {a : Type} {b : Type} => - fun f z0 xs => - let f' := fun k x z => k (f x z) in Foldable__UFloat_foldl f' GHC.Base.id xs z0. - -#[local] Definition Foldable__UFloat_length - : forall {a : Type}, GHC.Generics.UFloat a -> GHC.Num.Int := - fun {a : Type} => - Foldable__UFloat_foldl' (fun arg_0__ arg_1__ => - match arg_0__, arg_1__ with - | c, _ => c GHC.Num.+ #1 - end) #0. - -#[local] Definition Foldable__UFloat_null - : forall {a : Type}, GHC.Generics.UFloat a -> bool := - fun {a : Type} => fun '(GHC.Generics.UFloat a1) => true. - -#[local] Definition Foldable__UFloat_product - : forall {a : Type}, forall `{GHC.Num.Num a}, GHC.Generics.UFloat a -> a := - fun {a : Type} `{GHC.Num.Num a} => - Coq.Program.Basics.compose Data.SemigroupInternal.getProduct - (Foldable__UFloat_foldMap Data.SemigroupInternal.Mk_Product). - -#[local] Definition Foldable__UFloat_sum - : forall {a : Type}, forall `{GHC.Num.Num a}, GHC.Generics.UFloat a -> a := - fun {a : Type} `{GHC.Num.Num a} => - Coq.Program.Basics.compose Data.SemigroupInternal.getSum - (Foldable__UFloat_foldMap Data.SemigroupInternal.Mk_Sum). - -#[local] Definition Foldable__UFloat_toList - : forall {a : Type}, GHC.Generics.UFloat a -> list a := - fun {a : Type} => - fun t => GHC.Base.build' (fun _ => (fun c n => Foldable__UFloat_foldr c n t)). - -#[global] -Program Instance Foldable__UFloat : Foldable GHC.Generics.UFloat := - fun _ k__ => - k__ {| fold__ := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__UFloat_fold ; - foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => - Foldable__UFloat_foldMap ; - foldMap'__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => - Foldable__UFloat_foldMap' ; - foldl__ := fun {b : Type} {a : Type} => Foldable__UFloat_foldl ; - foldl'__ := fun {b : Type} {a : Type} => Foldable__UFloat_foldl' ; - foldr__ := fun {a : Type} {b : Type} => Foldable__UFloat_foldr ; - foldr'__ := fun {a : Type} {b : Type} => Foldable__UFloat_foldr' ; - length__ := fun {a : Type} => Foldable__UFloat_length ; - null__ := fun {a : Type} => Foldable__UFloat_null ; - product__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__UFloat_product ; - sum__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__UFloat_sum ; - toList__ := fun {a : Type} => Foldable__UFloat_toList |}. - -#[local] Definition Foldable__UDouble_foldMap - : forall {m : Type}, - forall {a : Type}, - forall `{GHC.Base.Monoid m}, (a -> m) -> GHC.Generics.UDouble a -> m := - fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => - fun arg_0__ arg_1__ => - match arg_0__, arg_1__ with - | f, GHC.Generics.UDouble a1 => GHC.Base.mempty - end. - -#[local] Definition Foldable__UDouble_fold - : forall {m : Type}, - forall `{GHC.Base.Monoid m}, GHC.Generics.UDouble m -> m := - fun {m : Type} `{GHC.Base.Monoid m} => Foldable__UDouble_foldMap GHC.Base.id. - -#[local] Definition Foldable__UDouble_foldr - : forall {a : Type}, - forall {b : Type}, (a -> b -> b) -> b -> GHC.Generics.UDouble a -> b := - fun {a : Type} {b : Type} => - fun arg_0__ arg_1__ arg_2__ => - match arg_0__, arg_1__, arg_2__ with - | f, z, GHC.Generics.UDouble a1 => z - end. - -#[local] Definition Foldable__UDouble_foldl' - : forall {b : Type}, - forall {a : Type}, (b -> a -> b) -> b -> GHC.Generics.UDouble a -> b := - fun {b : Type} {a : Type} => - fun f z0 xs => - let f' := fun x k z => k (f z x) in - Foldable__UDouble_foldr f' GHC.Base.id xs z0. - -#[local] Definition Foldable__UDouble_foldMap' - : forall {m : Type}, - forall {a : Type}, - forall `{GHC.Base.Monoid m}, (a -> m) -> GHC.Generics.UDouble a -> m := - fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => - fun f => - Foldable__UDouble_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. - -#[local] Definition Foldable__UDouble_foldl - : forall {b : Type}, - forall {a : Type}, (b -> a -> b) -> b -> GHC.Generics.UDouble a -> b := - fun {b : Type} {a : Type} => - fun f z t => - Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual - (Foldable__UDouble_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ - (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ - GHC.Base.flip f)) t)) z. - -#[local] Definition Foldable__UDouble_foldr' - : forall {a : Type}, - forall {b : Type}, (a -> b -> b) -> b -> GHC.Generics.UDouble a -> b := - fun {a : Type} {b : Type} => - fun f z0 xs => - let f' := fun k x z => k (f x z) in - Foldable__UDouble_foldl f' GHC.Base.id xs z0. - -#[local] Definition Foldable__UDouble_length - : forall {a : Type}, GHC.Generics.UDouble a -> GHC.Num.Int := - fun {a : Type} => - Foldable__UDouble_foldl' (fun arg_0__ arg_1__ => - match arg_0__, arg_1__ with - | c, _ => c GHC.Num.+ #1 - end) #0. - -#[local] Definition Foldable__UDouble_null - : forall {a : Type}, GHC.Generics.UDouble a -> bool := - fun {a : Type} => fun '(GHC.Generics.UDouble a1) => true. - -#[local] Definition Foldable__UDouble_product - : forall {a : Type}, forall `{GHC.Num.Num a}, GHC.Generics.UDouble a -> a := - fun {a : Type} `{GHC.Num.Num a} => - Coq.Program.Basics.compose Data.SemigroupInternal.getProduct - (Foldable__UDouble_foldMap Data.SemigroupInternal.Mk_Product). - -#[local] Definition Foldable__UDouble_sum - : forall {a : Type}, forall `{GHC.Num.Num a}, GHC.Generics.UDouble a -> a := - fun {a : Type} `{GHC.Num.Num a} => - Coq.Program.Basics.compose Data.SemigroupInternal.getSum - (Foldable__UDouble_foldMap Data.SemigroupInternal.Mk_Sum). - -#[local] Definition Foldable__UDouble_toList - : forall {a : Type}, GHC.Generics.UDouble a -> list a := - fun {a : Type} => - fun t => GHC.Base.build' (fun _ => (fun c n => Foldable__UDouble_foldr c n t)). - -#[global] -Program Instance Foldable__UDouble : Foldable GHC.Generics.UDouble := - fun _ k__ => - k__ {| fold__ := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__UDouble_fold ; - foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => - Foldable__UDouble_foldMap ; - foldMap'__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => - Foldable__UDouble_foldMap' ; - foldl__ := fun {b : Type} {a : Type} => Foldable__UDouble_foldl ; - foldl'__ := fun {b : Type} {a : Type} => Foldable__UDouble_foldl' ; - foldr__ := fun {a : Type} {b : Type} => Foldable__UDouble_foldr ; - foldr'__ := fun {a : Type} {b : Type} => Foldable__UDouble_foldr' ; - length__ := fun {a : Type} => Foldable__UDouble_length ; - null__ := fun {a : Type} => Foldable__UDouble_null ; - product__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__UDouble_product ; - sum__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__UDouble_sum ; - toList__ := fun {a : Type} => Foldable__UDouble_toList |}. - -#[local] Definition Foldable__UChar_foldMap - : forall {m : Type}, - forall {a : Type}, - forall `{GHC.Base.Monoid m}, (a -> m) -> GHC.Generics.UChar a -> m := - fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => - fun arg_0__ arg_1__ => - match arg_0__, arg_1__ with - | f, GHC.Generics.UChar a1 => GHC.Base.mempty - end. - -#[local] Definition Foldable__UChar_fold - : forall {m : Type}, forall `{GHC.Base.Monoid m}, GHC.Generics.UChar m -> m := - fun {m : Type} `{GHC.Base.Monoid m} => Foldable__UChar_foldMap GHC.Base.id. - -#[local] Definition Foldable__UChar_foldr - : forall {a : Type}, - forall {b : Type}, (a -> b -> b) -> b -> GHC.Generics.UChar a -> b := - fun {a : Type} {b : Type} => - fun arg_0__ arg_1__ arg_2__ => - match arg_0__, arg_1__, arg_2__ with - | f, z, GHC.Generics.UChar a1 => z - end. - -#[local] Definition Foldable__UChar_foldl' - : forall {b : Type}, - forall {a : Type}, (b -> a -> b) -> b -> GHC.Generics.UChar a -> b := - fun {b : Type} {a : Type} => - fun f z0 xs => - let f' := fun x k z => k (f z x) in Foldable__UChar_foldr f' GHC.Base.id xs z0. - -#[local] Definition Foldable__UChar_foldMap' - : forall {m : Type}, - forall {a : Type}, - forall `{GHC.Base.Monoid m}, (a -> m) -> GHC.Generics.UChar a -> m := - fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => - fun f => - Foldable__UChar_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. - -#[local] Definition Foldable__UChar_foldl - : forall {b : Type}, - forall {a : Type}, (b -> a -> b) -> b -> GHC.Generics.UChar a -> b := - fun {b : Type} {a : Type} => - fun f z t => - Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual - (Foldable__UChar_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ - (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ - GHC.Base.flip f)) t)) z. - -#[local] Definition Foldable__UChar_foldr' - : forall {a : Type}, - forall {b : Type}, (a -> b -> b) -> b -> GHC.Generics.UChar a -> b := - fun {a : Type} {b : Type} => - fun f z0 xs => - let f' := fun k x z => k (f x z) in Foldable__UChar_foldl f' GHC.Base.id xs z0. - -#[local] Definition Foldable__UChar_length - : forall {a : Type}, GHC.Generics.UChar a -> GHC.Num.Int := - fun {a : Type} => - Foldable__UChar_foldl' (fun arg_0__ arg_1__ => - match arg_0__, arg_1__ with - | c, _ => c GHC.Num.+ #1 - end) #0. - -#[local] Definition Foldable__UChar_null - : forall {a : Type}, GHC.Generics.UChar a -> bool := - fun {a : Type} => fun '(GHC.Generics.UChar a1) => true. - -#[local] Definition Foldable__UChar_product - : forall {a : Type}, forall `{GHC.Num.Num a}, GHC.Generics.UChar a -> a := - fun {a : Type} `{GHC.Num.Num a} => - Coq.Program.Basics.compose Data.SemigroupInternal.getProduct - (Foldable__UChar_foldMap Data.SemigroupInternal.Mk_Product). - -#[local] Definition Foldable__UChar_sum - : forall {a : Type}, forall `{GHC.Num.Num a}, GHC.Generics.UChar a -> a := - fun {a : Type} `{GHC.Num.Num a} => - Coq.Program.Basics.compose Data.SemigroupInternal.getSum - (Foldable__UChar_foldMap Data.SemigroupInternal.Mk_Sum). - -#[local] Definition Foldable__UChar_toList - : forall {a : Type}, GHC.Generics.UChar a -> list a := - fun {a : Type} => - fun t => GHC.Base.build' (fun _ => (fun c n => Foldable__UChar_foldr c n t)). - -#[global] -Program Instance Foldable__UChar : Foldable GHC.Generics.UChar := - fun _ k__ => - k__ {| fold__ := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__UChar_fold ; - foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => - Foldable__UChar_foldMap ; - foldMap'__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => - Foldable__UChar_foldMap' ; - foldl__ := fun {b : Type} {a : Type} => Foldable__UChar_foldl ; - foldl'__ := fun {b : Type} {a : Type} => Foldable__UChar_foldl' ; - foldr__ := fun {a : Type} {b : Type} => Foldable__UChar_foldr ; - foldr'__ := fun {a : Type} {b : Type} => Foldable__UChar_foldr' ; - length__ := fun {a : Type} => Foldable__UChar_length ; - null__ := fun {a : Type} => Foldable__UChar_null ; - product__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__UChar_product ; - sum__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__UChar_sum ; - toList__ := fun {a : Type} => Foldable__UChar_toList |}. - -#[local] Definition Foldable__UAddr_foldMap - : forall {m : Type}, - forall {a : Type}, - forall `{GHC.Base.Monoid m}, (a -> m) -> GHC.Generics.UAddr a -> m := - fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => - fun arg_0__ arg_1__ => - match arg_0__, arg_1__ with - | f, GHC.Generics.UAddr a1 => GHC.Base.mempty - end. - -#[local] Definition Foldable__UAddr_fold - : forall {m : Type}, forall `{GHC.Base.Monoid m}, GHC.Generics.UAddr m -> m := - fun {m : Type} `{GHC.Base.Monoid m} => Foldable__UAddr_foldMap GHC.Base.id. - -#[local] Definition Foldable__UAddr_foldr - : forall {a : Type}, - forall {b : Type}, (a -> b -> b) -> b -> GHC.Generics.UAddr a -> b := - fun {a : Type} {b : Type} => - fun arg_0__ arg_1__ arg_2__ => - match arg_0__, arg_1__, arg_2__ with - | f, z, GHC.Generics.UAddr a1 => z - end. - -#[local] Definition Foldable__UAddr_foldl' - : forall {b : Type}, - forall {a : Type}, (b -> a -> b) -> b -> GHC.Generics.UAddr a -> b := - fun {b : Type} {a : Type} => - fun f z0 xs => - let f' := fun x k z => k (f z x) in Foldable__UAddr_foldr f' GHC.Base.id xs z0. - -#[local] Definition Foldable__UAddr_foldMap' - : forall {m : Type}, - forall {a : Type}, - forall `{GHC.Base.Monoid m}, (a -> m) -> GHC.Generics.UAddr a -> m := - fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => - fun f => - Foldable__UAddr_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. - -#[local] Definition Foldable__UAddr_foldl - : forall {b : Type}, - forall {a : Type}, (b -> a -> b) -> b -> GHC.Generics.UAddr a -> b := - fun {b : Type} {a : Type} => - fun f z t => - Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual - (Foldable__UAddr_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ - (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ - GHC.Base.flip f)) t)) z. - -#[local] Definition Foldable__UAddr_foldr' - : forall {a : Type}, - forall {b : Type}, (a -> b -> b) -> b -> GHC.Generics.UAddr a -> b := - fun {a : Type} {b : Type} => - fun f z0 xs => - let f' := fun k x z => k (f x z) in Foldable__UAddr_foldl f' GHC.Base.id xs z0. - -#[local] Definition Foldable__UAddr_length - : forall {a : Type}, GHC.Generics.UAddr a -> GHC.Num.Int := - fun {a : Type} => - Foldable__UAddr_foldl' (fun arg_0__ arg_1__ => - match arg_0__, arg_1__ with - | c, _ => c GHC.Num.+ #1 - end) #0. +(* Skipping instance `Data.Foldable.Foldable__UWord' of class + `Data.Foldable.Foldable' *) -#[local] Definition Foldable__UAddr_null - : forall {a : Type}, GHC.Generics.UAddr a -> bool := - fun {a : Type} => fun '(GHC.Generics.UAddr a1) => true. +(* Skipping instance `Data.Foldable.Foldable__UInt' of class + `Data.Foldable.Foldable' *) -#[local] Definition Foldable__UAddr_product - : forall {a : Type}, forall `{GHC.Num.Num a}, GHC.Generics.UAddr a -> a := - fun {a : Type} `{GHC.Num.Num a} => - Coq.Program.Basics.compose Data.SemigroupInternal.getProduct - (Foldable__UAddr_foldMap Data.SemigroupInternal.Mk_Product). +(* Skipping instance `Data.Foldable.Foldable__UFloat' of class + `Data.Foldable.Foldable' *) -#[local] Definition Foldable__UAddr_sum - : forall {a : Type}, forall `{GHC.Num.Num a}, GHC.Generics.UAddr a -> a := - fun {a : Type} `{GHC.Num.Num a} => - Coq.Program.Basics.compose Data.SemigroupInternal.getSum - (Foldable__UAddr_foldMap Data.SemigroupInternal.Mk_Sum). +(* Skipping instance `Data.Foldable.Foldable__UDouble' of class + `Data.Foldable.Foldable' *) -#[local] Definition Foldable__UAddr_toList - : forall {a : Type}, GHC.Generics.UAddr a -> list a := - fun {a : Type} => - fun t => GHC.Base.build' (fun _ => (fun c n => Foldable__UAddr_foldr c n t)). +(* Skipping instance `Data.Foldable.Foldable__UChar' of class + `Data.Foldable.Foldable' *) -#[global] -Program Instance Foldable__UAddr : Foldable GHC.Generics.UAddr := - fun _ k__ => - k__ {| fold__ := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__UAddr_fold ; - foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => - Foldable__UAddr_foldMap ; - foldMap'__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => - Foldable__UAddr_foldMap' ; - foldl__ := fun {b : Type} {a : Type} => Foldable__UAddr_foldl ; - foldl'__ := fun {b : Type} {a : Type} => Foldable__UAddr_foldl' ; - foldr__ := fun {a : Type} {b : Type} => Foldable__UAddr_foldr ; - foldr'__ := fun {a : Type} {b : Type} => Foldable__UAddr_foldr' ; - length__ := fun {a : Type} => Foldable__UAddr_length ; - null__ := fun {a : Type} => Foldable__UAddr_null ; - product__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__UAddr_product ; - sum__ := fun {a : Type} `{GHC.Num.Num a} => Foldable__UAddr_sum ; - toList__ := fun {a : Type} => Foldable__UAddr_toList |}. +(* Skipping instance `Data.Foldable.Foldable__UAddr' of class + `Data.Foldable.Foldable' *) (* Skipping instance `Data.Foldable.Foldable__op_ZCziZC__' of class `Data.Foldable.Foldable' *) @@ -987,14 +385,12 @@ Program Instance Foldable__UAddr : Foldable GHC.Generics.UAddr := #[local] Definition Foldable__option_product : forall {a : Type}, forall `{GHC.Num.Num a}, option a -> a := fun {a : Type} `{GHC.Num.Num a} => - Coq.Program.Basics.compose Data.SemigroupInternal.getProduct - (Foldable__option_foldMap Data.SemigroupInternal.Mk_Product). + Coq.Program.Basics.compose getProduct (Foldable__option_foldMap Mk_Product). #[local] Definition Foldable__option_sum : forall {a : Type}, forall `{GHC.Num.Num a}, option a -> a := fun {a : Type} `{GHC.Num.Num a} => - Coq.Program.Basics.compose Data.SemigroupInternal.getSum - (Foldable__option_foldMap Data.SemigroupInternal.Mk_Sum). + Coq.Program.Basics.compose getSum (Foldable__option_foldMap Mk_Sum). #[local] Definition Foldable__option_toList : forall {a : Type}, option a -> list a := @@ -1163,14 +559,12 @@ Program Instance Foldable__list : Foldable list := #[local] Definition Foldable__NonEmpty_product : forall {a : Type}, forall `{GHC.Num.Num a}, GHC.Base.NonEmpty a -> a := fun {a : Type} `{GHC.Num.Num a} => - Coq.Program.Basics.compose Data.SemigroupInternal.getProduct - (Foldable__NonEmpty_foldMap Data.SemigroupInternal.Mk_Product). + Coq.Program.Basics.compose getProduct (Foldable__NonEmpty_foldMap Mk_Product). #[local] Definition Foldable__NonEmpty_sum : forall {a : Type}, forall `{GHC.Num.Num a}, GHC.Base.NonEmpty a -> a := fun {a : Type} `{GHC.Num.Num a} => - Coq.Program.Basics.compose Data.SemigroupInternal.getSum - (Foldable__NonEmpty_foldMap Data.SemigroupInternal.Mk_Sum). + Coq.Program.Basics.compose getSum (Foldable__NonEmpty_foldMap Mk_Sum). #[local] Definition Foldable__NonEmpty_toList : forall {a : Type}, GHC.Base.NonEmpty a -> list a := @@ -1241,10 +635,8 @@ Program Instance Foldable__NonEmpty : Foldable GHC.Base.NonEmpty := forall {a : Type}, (b -> a -> b) -> b -> Data.Either.Either inst_a a -> b := fun {b : Type} {a : Type} => fun f z t => - Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual - (Foldable__Either_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ - (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ - GHC.Base.flip f)) t)) z. + appEndo (getDual (Foldable__Either_foldMap (Mk_Dual GHC.Base.∘ + (Mk_Endo GHC.Base.∘ GHC.Base.flip f)) t)) z. #[local] Definition Foldable__Either_foldr' {inst_a : Type} : forall {a : Type}, @@ -1270,15 +662,13 @@ Program Instance Foldable__NonEmpty : Foldable GHC.Base.NonEmpty := : forall {a : Type}, forall `{GHC.Num.Num a}, Data.Either.Either inst_a a -> a := fun {a : Type} `{GHC.Num.Num a} => - Coq.Program.Basics.compose Data.SemigroupInternal.getProduct - (Foldable__Either_foldMap Data.SemigroupInternal.Mk_Product). + Coq.Program.Basics.compose getProduct (Foldable__Either_foldMap Mk_Product). #[local] Definition Foldable__Either_sum {inst_a : Type} : forall {a : Type}, forall `{GHC.Num.Num a}, Data.Either.Either inst_a a -> a := fun {a : Type} `{GHC.Num.Num a} => - Coq.Program.Basics.compose Data.SemigroupInternal.getSum - (Foldable__Either_foldMap Data.SemigroupInternal.Mk_Sum). + Coq.Program.Basics.compose getSum (Foldable__Either_foldMap Mk_Sum). #[local] Definition Foldable__Either_toList {inst_a : Type} : forall {a : Type}, Data.Either.Either inst_a a -> list a := @@ -1346,10 +736,8 @@ Program Instance Foldable__Either {a : Type} forall {a : Type}, (b -> a -> b) -> b -> GHC.Tuple.pair_type inst_a a -> b := fun {b : Type} {a : Type} => fun f z t => - Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual - (Foldable__pair_type_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ - (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ - GHC.Base.flip f)) t)) z. + appEndo (getDual (Foldable__pair_type_foldMap (Mk_Dual GHC.Base.∘ + (Mk_Endo GHC.Base.∘ GHC.Base.flip f)) t)) z. #[local] Definition Foldable__pair_type_foldr' {inst_a : Type} : forall {a : Type}, @@ -1371,15 +759,13 @@ Program Instance Foldable__Either {a : Type} : forall {a : Type}, forall `{GHC.Num.Num a}, GHC.Tuple.pair_type inst_a a -> a := fun {a : Type} `{GHC.Num.Num a} => - Coq.Program.Basics.compose Data.SemigroupInternal.getProduct - (Foldable__pair_type_foldMap Data.SemigroupInternal.Mk_Product). + Coq.Program.Basics.compose getProduct (Foldable__pair_type_foldMap Mk_Product). #[local] Definition Foldable__pair_type_sum {inst_a : Type} : forall {a : Type}, forall `{GHC.Num.Num a}, GHC.Tuple.pair_type inst_a a -> a := fun {a : Type} `{GHC.Num.Num a} => - Coq.Program.Basics.compose Data.SemigroupInternal.getSum - (Foldable__pair_type_foldMap Data.SemigroupInternal.Mk_Sum). + Coq.Program.Basics.compose getSum (Foldable__pair_type_foldMap Mk_Sum). #[local] Definition Foldable__pair_type_toList {inst_a : Type} : forall {a : Type}, GHC.Tuple.pair_type inst_a a -> list a := @@ -1502,71 +888,61 @@ Program Instance Foldable__Proxy : Foldable Data.Proxy.Proxy := #[local] Definition Foldable__Dual_foldMap : forall {m : Type}, - forall {a : Type}, - forall `{GHC.Base.Monoid m}, (a -> m) -> Data.SemigroupInternal.Dual a -> m := + forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> Dual a -> m := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => GHC.Prim.coerce. #[local] Definition Foldable__Dual_fold - : forall {m : Type}, - forall `{GHC.Base.Monoid m}, Data.SemigroupInternal.Dual m -> m := + : forall {m : Type}, forall `{GHC.Base.Monoid m}, Dual m -> m := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Dual_foldMap GHC.Base.id. #[local] Definition Foldable__Dual_foldl' - : forall {b : Type}, - forall {a : Type}, (b -> a -> b) -> b -> Data.SemigroupInternal.Dual a -> b := + : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> Dual a -> b := fun {b : Type} {a : Type} => GHC.Prim.coerce. #[local] Definition Foldable__Dual_foldMap' : forall {m : Type}, - forall {a : Type}, - forall `{GHC.Base.Monoid m}, (a -> m) -> Data.SemigroupInternal.Dual a -> m := + forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> Dual a -> m := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => fun f => Foldable__Dual_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. #[local] Definition Foldable__Dual_foldl - : forall {b : Type}, - forall {a : Type}, (b -> a -> b) -> b -> Data.SemigroupInternal.Dual a -> b := + : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> Dual a -> b := fun {b : Type} {a : Type} => GHC.Prim.coerce. #[local] Definition Foldable__Dual_foldr - : forall {a : Type}, - forall {b : Type}, (a -> b -> b) -> b -> Data.SemigroupInternal.Dual a -> b := + : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> Dual a -> b := fun {a : Type} {b : Type} => fun arg_0__ arg_1__ arg_2__ => match arg_0__, arg_1__, arg_2__ with - | f, z, Data.SemigroupInternal.Mk_Dual x => f x z + | f, z, Mk_Dual x => f x z end. #[local] Definition Foldable__Dual_foldr' - : forall {a : Type}, - forall {b : Type}, (a -> b -> b) -> b -> Data.SemigroupInternal.Dual a -> b := + : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> Dual a -> b := fun {a : Type} {b : Type} => Foldable__Dual_foldr. #[local] Definition Foldable__Dual_length - : forall {a : Type}, Data.SemigroupInternal.Dual a -> GHC.Num.Int := + : forall {a : Type}, Dual a -> GHC.Num.Int := fun {a : Type} => fun arg_0__ => #1. -#[local] Definition Foldable__Dual_null - : forall {a : Type}, Data.SemigroupInternal.Dual a -> bool := +#[local] Definition Foldable__Dual_null : forall {a : Type}, Dual a -> bool := fun {a : Type} => fun arg_0__ => false. #[local] Definition Foldable__Dual_product - : forall {a : Type}, - forall `{GHC.Num.Num a}, Data.SemigroupInternal.Dual a -> a := - fun {a : Type} `{GHC.Num.Num a} => Data.SemigroupInternal.getDual. + : forall {a : Type}, forall `{GHC.Num.Num a}, Dual a -> a := + fun {a : Type} `{GHC.Num.Num a} => getDual. #[local] Definition Foldable__Dual_sum - : forall {a : Type}, - forall `{GHC.Num.Num a}, Data.SemigroupInternal.Dual a -> a := - fun {a : Type} `{GHC.Num.Num a} => Data.SemigroupInternal.getDual. + : forall {a : Type}, forall `{GHC.Num.Num a}, Dual a -> a := + fun {a : Type} `{GHC.Num.Num a} => getDual. #[local] Definition Foldable__Dual_toList - : forall {a : Type}, Data.SemigroupInternal.Dual a -> list a := - fun {a : Type} => fun '(Data.SemigroupInternal.Mk_Dual x) => cons x nil. + : forall {a : Type}, Dual a -> list a := + fun {a : Type} => fun '(Mk_Dual x) => cons x nil. #[global] -Program Instance Foldable__Dual : Foldable Data.SemigroupInternal.Dual := +Program Instance Foldable__Dual : Foldable Dual := fun _ k__ => k__ {| fold__ := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Dual_fold ; foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => @@ -1585,71 +961,60 @@ Program Instance Foldable__Dual : Foldable Data.SemigroupInternal.Dual := #[local] Definition Foldable__Sum_foldMap : forall {m : Type}, - forall {a : Type}, - forall `{GHC.Base.Monoid m}, (a -> m) -> Data.SemigroupInternal.Sum a -> m := + forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> Sum a -> m := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => GHC.Prim.coerce. #[local] Definition Foldable__Sum_fold - : forall {m : Type}, - forall `{GHC.Base.Monoid m}, Data.SemigroupInternal.Sum m -> m := + : forall {m : Type}, forall `{GHC.Base.Monoid m}, Sum m -> m := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Sum_foldMap GHC.Base.id. #[local] Definition Foldable__Sum_foldl' - : forall {b : Type}, - forall {a : Type}, (b -> a -> b) -> b -> Data.SemigroupInternal.Sum a -> b := + : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> Sum a -> b := fun {b : Type} {a : Type} => GHC.Prim.coerce. #[local] Definition Foldable__Sum_foldMap' : forall {m : Type}, - forall {a : Type}, - forall `{GHC.Base.Monoid m}, (a -> m) -> Data.SemigroupInternal.Sum a -> m := + forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> Sum a -> m := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => fun f => Foldable__Sum_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. #[local] Definition Foldable__Sum_foldl - : forall {b : Type}, - forall {a : Type}, (b -> a -> b) -> b -> Data.SemigroupInternal.Sum a -> b := + : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> Sum a -> b := fun {b : Type} {a : Type} => GHC.Prim.coerce. #[local] Definition Foldable__Sum_foldr - : forall {a : Type}, - forall {b : Type}, (a -> b -> b) -> b -> Data.SemigroupInternal.Sum a -> b := + : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> Sum a -> b := fun {a : Type} {b : Type} => fun arg_0__ arg_1__ arg_2__ => match arg_0__, arg_1__, arg_2__ with - | f, z, Data.SemigroupInternal.Mk_Sum x => f x z + | f, z, Mk_Sum x => f x z end. #[local] Definition Foldable__Sum_foldr' - : forall {a : Type}, - forall {b : Type}, (a -> b -> b) -> b -> Data.SemigroupInternal.Sum a -> b := + : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> Sum a -> b := fun {a : Type} {b : Type} => Foldable__Sum_foldr. #[local] Definition Foldable__Sum_length - : forall {a : Type}, Data.SemigroupInternal.Sum a -> GHC.Num.Int := + : forall {a : Type}, Sum a -> GHC.Num.Int := fun {a : Type} => fun arg_0__ => #1. -#[local] Definition Foldable__Sum_null - : forall {a : Type}, Data.SemigroupInternal.Sum a -> bool := +#[local] Definition Foldable__Sum_null : forall {a : Type}, Sum a -> bool := fun {a : Type} => fun arg_0__ => false. #[local] Definition Foldable__Sum_product - : forall {a : Type}, - forall `{GHC.Num.Num a}, Data.SemigroupInternal.Sum a -> a := - fun {a : Type} `{GHC.Num.Num a} => Data.SemigroupInternal.getSum. + : forall {a : Type}, forall `{GHC.Num.Num a}, Sum a -> a := + fun {a : Type} `{GHC.Num.Num a} => getSum. #[local] Definition Foldable__Sum_sum - : forall {a : Type}, - forall `{GHC.Num.Num a}, Data.SemigroupInternal.Sum a -> a := - fun {a : Type} `{GHC.Num.Num a} => Data.SemigroupInternal.getSum. + : forall {a : Type}, forall `{GHC.Num.Num a}, Sum a -> a := + fun {a : Type} `{GHC.Num.Num a} => getSum. -#[local] Definition Foldable__Sum_toList - : forall {a : Type}, Data.SemigroupInternal.Sum a -> list a := - fun {a : Type} => fun '(Data.SemigroupInternal.Mk_Sum x) => cons x nil. +#[local] Definition Foldable__Sum_toList : forall {a : Type}, Sum a -> list a := + fun {a : Type} => fun '(Mk_Sum x) => cons x nil. #[global] -Program Instance Foldable__Sum : Foldable Data.SemigroupInternal.Sum := +Program Instance Foldable__Sum : Foldable Sum := fun _ k__ => k__ {| fold__ := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Sum_fold ; foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => @@ -1668,77 +1033,62 @@ Program Instance Foldable__Sum : Foldable Data.SemigroupInternal.Sum := #[local] Definition Foldable__Product_foldMap : forall {m : Type}, - forall {a : Type}, - forall `{GHC.Base.Monoid m}, - (a -> m) -> Data.SemigroupInternal.Product a -> m := + forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> Product a -> m := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => GHC.Prim.coerce. #[local] Definition Foldable__Product_fold - : forall {m : Type}, - forall `{GHC.Base.Monoid m}, Data.SemigroupInternal.Product m -> m := + : forall {m : Type}, forall `{GHC.Base.Monoid m}, Product m -> m := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Product_foldMap GHC.Base.id. #[local] Definition Foldable__Product_foldl' - : forall {b : Type}, - forall {a : Type}, - (b -> a -> b) -> b -> Data.SemigroupInternal.Product a -> b := + : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> Product a -> b := fun {b : Type} {a : Type} => GHC.Prim.coerce. #[local] Definition Foldable__Product_foldMap' : forall {m : Type}, - forall {a : Type}, - forall `{GHC.Base.Monoid m}, - (a -> m) -> Data.SemigroupInternal.Product a -> m := + forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> Product a -> m := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => fun f => Foldable__Product_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. #[local] Definition Foldable__Product_foldl - : forall {b : Type}, - forall {a : Type}, - (b -> a -> b) -> b -> Data.SemigroupInternal.Product a -> b := + : forall {b : Type}, forall {a : Type}, (b -> a -> b) -> b -> Product a -> b := fun {b : Type} {a : Type} => GHC.Prim.coerce. #[local] Definition Foldable__Product_foldr - : forall {a : Type}, - forall {b : Type}, - (a -> b -> b) -> b -> Data.SemigroupInternal.Product a -> b := + : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> Product a -> b := fun {a : Type} {b : Type} => fun arg_0__ arg_1__ arg_2__ => match arg_0__, arg_1__, arg_2__ with - | f, z, Data.SemigroupInternal.Mk_Product x => f x z + | f, z, Mk_Product x => f x z end. #[local] Definition Foldable__Product_foldr' - : forall {a : Type}, - forall {b : Type}, - (a -> b -> b) -> b -> Data.SemigroupInternal.Product a -> b := + : forall {a : Type}, forall {b : Type}, (a -> b -> b) -> b -> Product a -> b := fun {a : Type} {b : Type} => Foldable__Product_foldr. #[local] Definition Foldable__Product_length - : forall {a : Type}, Data.SemigroupInternal.Product a -> GHC.Num.Int := + : forall {a : Type}, Product a -> GHC.Num.Int := fun {a : Type} => fun arg_0__ => #1. #[local] Definition Foldable__Product_null - : forall {a : Type}, Data.SemigroupInternal.Product a -> bool := + : forall {a : Type}, Product a -> bool := fun {a : Type} => fun arg_0__ => false. #[local] Definition Foldable__Product_product - : forall {a : Type}, - forall `{GHC.Num.Num a}, Data.SemigroupInternal.Product a -> a := - fun {a : Type} `{GHC.Num.Num a} => Data.SemigroupInternal.getProduct. + : forall {a : Type}, forall `{GHC.Num.Num a}, Product a -> a := + fun {a : Type} `{GHC.Num.Num a} => getProduct. #[local] Definition Foldable__Product_sum - : forall {a : Type}, - forall `{GHC.Num.Num a}, Data.SemigroupInternal.Product a -> a := - fun {a : Type} `{GHC.Num.Num a} => Data.SemigroupInternal.getProduct. + : forall {a : Type}, forall `{GHC.Num.Num a}, Product a -> a := + fun {a : Type} `{GHC.Num.Num a} => getProduct. #[local] Definition Foldable__Product_toList - : forall {a : Type}, Data.SemigroupInternal.Product a -> list a := - fun {a : Type} => fun '(Data.SemigroupInternal.Mk_Product x) => cons x nil. + : forall {a : Type}, Product a -> list a := + fun {a : Type} => fun '(Mk_Product x) => cons x nil. #[global] -Program Instance Foldable__Product : Foldable Data.SemigroupInternal.Product := +Program Instance Foldable__Product : Foldable Product := fun _ k__ => k__ {| fold__ := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Product_fold ; foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => @@ -1764,33 +1114,27 @@ Program Instance Foldable__Product : Foldable Data.SemigroupInternal.Product := #[local] Definition Foldable__Alt_foldMap {inst_f : Type -> Type} `{(Foldable inst_f)} : forall {m : Type}, - forall {a : Type}, - forall `{GHC.Base.Monoid m}, - (a -> m) -> Data.SemigroupInternal.Alt inst_f a -> m := + forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> Alt inst_f a -> m := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => - fun f => foldMap f GHC.Base.∘ Data.SemigroupInternal.getAlt. + fun f => foldMap f GHC.Base.∘ getAlt. #[local] Definition Foldable__Alt_fold {inst_f : Type -> Type} `{(Foldable inst_f)} - : forall {m : Type}, - forall `{GHC.Base.Monoid m}, Data.SemigroupInternal.Alt inst_f m -> m := + : forall {m : Type}, forall `{GHC.Base.Monoid m}, Alt inst_f m -> m := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Alt_foldMap GHC.Base.id. #[local] Definition Foldable__Alt_foldr {inst_f : Type -> Type} `{(Foldable inst_f)} : forall {a : Type}, - forall {b : Type}, - (a -> b -> b) -> b -> Data.SemigroupInternal.Alt inst_f a -> b := + forall {b : Type}, (a -> b -> b) -> b -> Alt inst_f a -> b := fun {a : Type} {b : Type} => fun f z t => - Data.SemigroupInternal.appEndo (Foldable__Alt_foldMap - (Coq.Program.Basics.compose Data.SemigroupInternal.Mk_Endo f) t) z. + appEndo (Foldable__Alt_foldMap (Coq.Program.Basics.compose Mk_Endo f) t) z. #[local] Definition Foldable__Alt_foldl' {inst_f : Type -> Type} `{(Foldable inst_f)} : forall {b : Type}, - forall {a : Type}, - (b -> a -> b) -> b -> Data.SemigroupInternal.Alt inst_f a -> b := + forall {a : Type}, (b -> a -> b) -> b -> Alt inst_f a -> b := fun {b : Type} {a : Type} => fun f z0 xs => let f' := fun x k z => k (f z x) in Foldable__Alt_foldr f' GHC.Base.id xs z0. @@ -1798,9 +1142,7 @@ Program Instance Foldable__Product : Foldable Data.SemigroupInternal.Product := #[local] Definition Foldable__Alt_foldMap' {inst_f : Type -> Type} `{(Foldable inst_f)} : forall {m : Type}, - forall {a : Type}, - forall `{GHC.Base.Monoid m}, - (a -> m) -> Data.SemigroupInternal.Alt inst_f a -> m := + forall {a : Type}, forall `{GHC.Base.Monoid m}, (a -> m) -> Alt inst_f a -> m := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => fun f => Foldable__Alt_foldl' (fun acc a => acc GHC.Base.<<>> f a) GHC.Base.mempty. @@ -1808,27 +1150,23 @@ Program Instance Foldable__Product : Foldable Data.SemigroupInternal.Product := #[local] Definition Foldable__Alt_foldl {inst_f : Type -> Type} `{(Foldable inst_f)} : forall {b : Type}, - forall {a : Type}, - (b -> a -> b) -> b -> Data.SemigroupInternal.Alt inst_f a -> b := + forall {a : Type}, (b -> a -> b) -> b -> Alt inst_f a -> b := fun {b : Type} {a : Type} => fun f z t => - Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual - (Foldable__Alt_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ - (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ - GHC.Base.flip f)) t)) z. + appEndo (getDual (Foldable__Alt_foldMap (Mk_Dual GHC.Base.∘ + (Mk_Endo GHC.Base.∘ GHC.Base.flip f)) t)) z. #[local] Definition Foldable__Alt_foldr' {inst_f : Type -> Type} `{(Foldable inst_f)} : forall {a : Type}, - forall {b : Type}, - (a -> b -> b) -> b -> Data.SemigroupInternal.Alt inst_f a -> b := + forall {b : Type}, (a -> b -> b) -> b -> Alt inst_f a -> b := fun {a : Type} {b : Type} => fun f z0 xs => let f' := fun k x z => k (f x z) in Foldable__Alt_foldl f' GHC.Base.id xs z0. #[local] Definition Foldable__Alt_length {inst_f : Type -> Type} `{(Foldable inst_f)} - : forall {a : Type}, Data.SemigroupInternal.Alt inst_f a -> GHC.Num.Int := + : forall {a : Type}, Alt inst_f a -> GHC.Num.Int := fun {a : Type} => Foldable__Alt_foldl' (fun arg_0__ arg_1__ => match arg_0__, arg_1__ with @@ -1837,34 +1175,30 @@ Program Instance Foldable__Product : Foldable Data.SemigroupInternal.Product := #[local] Definition Foldable__Alt_null {inst_f : Type -> Type} `{(Foldable inst_f)} - : forall {a : Type}, Data.SemigroupInternal.Alt inst_f a -> bool := + : forall {a : Type}, Alt inst_f a -> bool := fun {a : Type} => Foldable__Alt_foldr (fun arg_0__ arg_1__ => false) true. #[local] Definition Foldable__Alt_product {inst_f : Type -> Type} `{(Foldable inst_f)} - : forall {a : Type}, - forall `{GHC.Num.Num a}, Data.SemigroupInternal.Alt inst_f a -> a := + : forall {a : Type}, forall `{GHC.Num.Num a}, Alt inst_f a -> a := fun {a : Type} `{GHC.Num.Num a} => - Coq.Program.Basics.compose Data.SemigroupInternal.getProduct - (Foldable__Alt_foldMap Data.SemigroupInternal.Mk_Product). + Coq.Program.Basics.compose getProduct (Foldable__Alt_foldMap Mk_Product). #[local] Definition Foldable__Alt_sum {inst_f : Type -> Type} `{(Foldable inst_f)} - : forall {a : Type}, - forall `{GHC.Num.Num a}, Data.SemigroupInternal.Alt inst_f a -> a := + : forall {a : Type}, forall `{GHC.Num.Num a}, Alt inst_f a -> a := fun {a : Type} `{GHC.Num.Num a} => - Coq.Program.Basics.compose Data.SemigroupInternal.getSum (Foldable__Alt_foldMap - Data.SemigroupInternal.Mk_Sum). + Coq.Program.Basics.compose getSum (Foldable__Alt_foldMap Mk_Sum). #[local] Definition Foldable__Alt_toList {inst_f : Type -> Type} `{(Foldable inst_f)} - : forall {a : Type}, Data.SemigroupInternal.Alt inst_f a -> list a := + : forall {a : Type}, Alt inst_f a -> list a := fun {a : Type} => fun t => GHC.Base.build' (fun _ => (fun c n => Foldable__Alt_foldr c n t)). #[global] Program Instance Foldable__Alt {f : Type -> Type} `{(Foldable f)} - : Foldable (Data.SemigroupInternal.Alt f) := + : Foldable (Alt f) := fun _ k__ => k__ {| fold__ := fun {m : Type} `{GHC.Base.Monoid m} => Foldable__Alt_fold ; foldMap__ := fun {m : Type} {a : Type} `{GHC.Base.Monoid m} => @@ -1901,8 +1235,7 @@ Program Instance Foldable__Alt {f : Type -> Type} `{(Foldable f)} forall {b : Type}, (a -> b -> b) -> b -> Data.Monoid.Ap inst_f a -> b := fun {a : Type} {b : Type} => fun f z t => - Data.SemigroupInternal.appEndo (Foldable__Ap_foldMap (Coq.Program.Basics.compose - Data.SemigroupInternal.Mk_Endo f) t) z. + appEndo (Foldable__Ap_foldMap (Coq.Program.Basics.compose Mk_Endo f) t) z. #[local] Definition Foldable__Ap_foldl' {inst_f : Type -> Type} `{(Foldable inst_f)} @@ -1927,10 +1260,8 @@ Program Instance Foldable__Alt {f : Type -> Type} `{(Foldable f)} forall {a : Type}, (b -> a -> b) -> b -> Data.Monoid.Ap inst_f a -> b := fun {b : Type} {a : Type} => fun f z t => - Data.SemigroupInternal.appEndo (Data.SemigroupInternal.getDual - (Foldable__Ap_foldMap (Data.SemigroupInternal.Mk_Dual GHC.Base.∘ - (Data.SemigroupInternal.Mk_Endo GHC.Base.∘ - GHC.Base.flip f)) t)) z. + appEndo (getDual (Foldable__Ap_foldMap (Mk_Dual GHC.Base.∘ + (Mk_Endo GHC.Base.∘ GHC.Base.flip f)) t)) z. #[local] Definition Foldable__Ap_foldr' {inst_f : Type -> Type} `{(Foldable inst_f)} @@ -1958,15 +1289,13 @@ Program Instance Foldable__Alt {f : Type -> Type} `{(Foldable f)} inst_f)} : forall {a : Type}, forall `{GHC.Num.Num a}, Data.Monoid.Ap inst_f a -> a := fun {a : Type} `{GHC.Num.Num a} => - Coq.Program.Basics.compose Data.SemigroupInternal.getProduct - (Foldable__Ap_foldMap Data.SemigroupInternal.Mk_Product). + Coq.Program.Basics.compose getProduct (Foldable__Ap_foldMap Mk_Product). #[local] Definition Foldable__Ap_sum {inst_f : Type -> Type} `{(Foldable inst_f)} : forall {a : Type}, forall `{GHC.Num.Num a}, Data.Monoid.Ap inst_f a -> a := fun {a : Type} `{GHC.Num.Num a} => - Coq.Program.Basics.compose Data.SemigroupInternal.getSum (Foldable__Ap_foldMap - Data.SemigroupInternal.Mk_Sum). + Coq.Program.Basics.compose getSum (Foldable__Ap_foldMap Mk_Sum). #[local] Definition Foldable__Ap_toList {inst_f : Type -> Type} `{(Foldable inst_f)} @@ -2055,24 +1384,22 @@ Program Instance Foldable__Ap {f : Type -> Type} `{(Foldable f)} fun c n => foldr (fun x y => (@foldr _ Foldable__list _ _ c y x)) n xs). #[global] Definition and {t : Type -> Type} `{Foldable t} : t bool -> bool := - Coq.Program.Basics.compose Data.SemigroupInternal.getAll (foldMap - Data.SemigroupInternal.Mk_All). + Coq.Program.Basics.compose getAll (foldMap Mk_All). #[global] Definition or {t : Type -> Type} `{Foldable t} : t bool -> bool := - Coq.Program.Basics.compose Data.SemigroupInternal.getAny (foldMap - Data.SemigroupInternal.Mk_Any). + Coq.Program.Basics.compose getAny (foldMap Mk_Any). #[global] Definition any {t : Type -> Type} {a : Type} `{Foldable t} : (a -> bool) -> t a -> bool := fun p => - Coq.Program.Basics.compose Data.SemigroupInternal.getAny (foldMap - (Coq.Program.Basics.compose Data.SemigroupInternal.Mk_Any p)). + Coq.Program.Basics.compose getAny (foldMap (Coq.Program.Basics.compose Mk_Any + p)). #[global] Definition all {t : Type -> Type} {a : Type} `{Foldable t} : (a -> bool) -> t a -> bool := fun p => - Coq.Program.Basics.compose Data.SemigroupInternal.getAll (foldMap - (Coq.Program.Basics.compose Data.SemigroupInternal.Mk_All p)). + Coq.Program.Basics.compose getAll (foldMap (Coq.Program.Basics.compose Mk_All + p)). (* Skipping definition `Data.Foldable.maximumBy' *) @@ -2094,25 +1421,18 @@ Program Instance Foldable__Ap {f : Type -> Type} `{(Foldable f)} foldMap (fun x => Data.Monoid.Mk_First (if p x : bool then Some x else None)). (* External variables: - None Some Type bool cons false list negb nil option pair true tt unit - Coq.Program.Basics.compose Data.Either.Either Data.Either.Left Data.Either.Right - Data.Either.isLeft Data.Maybe.maybe Data.Monoid.Ap Data.Monoid.Mk_First - Data.Monoid.getAp Data.Monoid.getFirst Data.Ord.Down Data.Ord.Mk_Down - Data.Proxy.Proxy Data.SemigroupInternal.Alt Data.SemigroupInternal.Dual - Data.SemigroupInternal.Mk_All Data.SemigroupInternal.Mk_Any - Data.SemigroupInternal.Mk_Dual Data.SemigroupInternal.Mk_Endo - Data.SemigroupInternal.Mk_Product Data.SemigroupInternal.Mk_Sum - Data.SemigroupInternal.Product Data.SemigroupInternal.Sum - Data.SemigroupInternal.appEndo Data.SemigroupInternal.getAll - Data.SemigroupInternal.getAlt Data.SemigroupInternal.getAny - Data.SemigroupInternal.getDual Data.SemigroupInternal.getProduct - Data.SemigroupInternal.getSum GHC.Base.Applicative GHC.Base.Eq_ GHC.Base.Monad - GHC.Base.Monoid GHC.Base.NEcons GHC.Base.NonEmpty GHC.Base.build' GHC.Base.flip - GHC.Base.foldl GHC.Base.foldl' GHC.Base.foldr GHC.Base.id GHC.Base.mappend - GHC.Base.mempty GHC.Base.op_z2218U__ GHC.Base.op_zeze__ GHC.Base.op_zgzg__ - GHC.Base.op_zgzgze__ GHC.Base.op_zlzlzgzg__ GHC.Base.op_ztzg__ GHC.Base.pure - GHC.Base.return_ GHC.Generics.UAddr GHC.Generics.UChar GHC.Generics.UDouble - GHC.Generics.UFloat GHC.Generics.UInt GHC.Generics.UWord GHC.List.length - GHC.List.null GHC.List.product GHC.List.sum GHC.Num.Int GHC.Num.Num - GHC.Num.fromInteger GHC.Num.op_zp__ GHC.Prim.coerce GHC.Tuple.pair_type + Alt Dual Mk_All Mk_Any Mk_Dual Mk_Endo Mk_Product Mk_Sum None Product Some Sum + Type appEndo bool cons false getAll getAlt getAny getDual getProduct getSum list + negb nil option pair true tt unit Coq.Program.Basics.compose Data.Either.Either + Data.Either.Left Data.Either.Right Data.Either.isLeft Data.Maybe.maybe + Data.Monoid.Ap Data.Monoid.Mk_First Data.Monoid.getAp Data.Monoid.getFirst + Data.Ord.Down Data.Ord.Mk_Down Data.Proxy.Proxy GHC.Base.Applicative + GHC.Base.Eq_ GHC.Base.Monad GHC.Base.Monoid GHC.Base.NEcons GHC.Base.NonEmpty + GHC.Base.build' GHC.Base.flip GHC.Base.foldl GHC.Base.foldl' GHC.Base.foldr + GHC.Base.id GHC.Base.mappend GHC.Base.mempty GHC.Base.op_z2218U__ + GHC.Base.op_zeze__ GHC.Base.op_zgzg__ GHC.Base.op_zgzgze__ + GHC.Base.op_zlzlzgzg__ GHC.Base.op_ztzg__ GHC.Base.pure GHC.Base.return_ + GHC.List.length GHC.List.null GHC.List.product GHC.List.sum GHC.Num.Int + GHC.Num.Num GHC.Num.fromInteger GHC.Num.op_zp__ GHC.Prim.coerce + GHC.Tuple.pair_type *) diff --git a/base/Data/Functor/Compose.v b/base/Data/Functor/Compose.v index d28b41df8..097eea20c 100644 --- a/base/Data/Functor/Compose.v +++ b/base/Data/Functor/Compose.v @@ -39,6 +39,15 @@ Arguments Mk_Compose {_} {_} {_} {_} {_} _. (* Converted value declarations: *) +(* Skipping all instances of class `Data.Data.Data', including + `Data.Functor.Compose.Data__Compose' *) + +(* Skipping all instances of class `GHC.Generics.Generic', including + `Data.Functor.Compose.Generic__Compose' *) + +(* Skipping all instances of class `GHC.Generics.Generic1', including + `Data.Functor.Compose.Generic1__Compose__5' *) + #[local] Definition Eq1__Compose_liftEq {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Functor.Classes.Eq1 inst_f} `{Data.Functor.Classes.Eq1 inst_g} @@ -191,7 +200,7 @@ Program Instance Ord__Compose {f : Type -> Type} {g : Type -> Type} {a : Type} fun arg_0__ arg_1__ => match arg_0__, arg_1__ with | a, Mk_Compose x => - Mk_Compose (Functor__Compose_fmap (fun arg_2__ => a GHC.Base.<$ arg_2__) x) + Mk_Compose (GHC.Base.fmap (fun arg_2__ => a GHC.Base.<$ arg_2__) x) end. #[global] diff --git a/base/Data/Functor/Const.v b/base/Data/Functor/Const.v index de056ded5..4dfafc114 100644 --- a/base/Data/Functor/Const.v +++ b/base/Data/Functor/Const.v @@ -46,6 +46,155 @@ Arguments Mk_Const {_} {_} {_} _. (* Converted value declarations: *) +(* Skipping all instances of class `Data.Bits.Bits', including + `Data.Functor.Const.Bits__Const' *) + +(* Skipping all instances of class `GHC.Enum.Bounded', including + `Data.Functor.Const.Bounded__Const' *) + +(* Skipping all instances of class `GHC.Enum.Enum', including + `Data.Functor.Const.Enum__Const' *) + +Instance Unpeel_Const (k a : Type) (b : k) + : HsToCoq.Unpeel.Unpeel (Const a b) a := + HsToCoq.Unpeel.Build_Unpeel _ _ getConst Mk_Const. + +#[local] Definition Eq___Const_op_zeze__ {inst_a : Type} {inst_k : Type} {inst_b + : inst_k} `{GHC.Base.Eq_ inst_a} + : Const inst_a inst_b -> Const inst_a inst_b -> bool := + GHC.Prim.coerce (_GHC.Base.==_). + +#[local] Definition Eq___Const_op_zsze__ {inst_a : Type} {inst_k : Type} {inst_b + : inst_k} `{GHC.Base.Eq_ inst_a} + : Const inst_a inst_b -> Const inst_a inst_b -> bool := + GHC.Prim.coerce (_GHC.Base./=_). + +#[global] +Program Instance Eq___Const {a : Type} {k : Type} {b : k} `{GHC.Base.Eq_ a} + : GHC.Base.Eq_ (Const a b) := + fun _ k__ => + k__ {| GHC.Base.op_zeze____ := Eq___Const_op_zeze__ ; + GHC.Base.op_zsze____ := Eq___Const_op_zsze__ |}. + +(* Skipping all instances of class `Data.Bits.FiniteBits', including + `Data.Functor.Const.FiniteBits__Const' *) + +(* Skipping all instances of class `GHC.Float.Floating', including + `Data.Functor.Const.Floating__Const' *) + +(* Skipping all instances of class `GHC.Real.Fractional', including + `Data.Functor.Const.Fractional__Const' *) + +(* Skipping all instances of class `GHC.Generics.Generic', including + `Data.Functor.Const.Generic__Const' *) + +(* Skipping all instances of class `GHC.Generics.Generic1', including + `Data.Functor.Const.Generic1__Const__5' *) + +(* Skipping all instances of class `GHC.Real.Integral', including + `Data.Functor.Const.Integral__Const' *) + +(* Skipping all instances of class `GHC.Ix.Ix', including + `Data.Functor.Const.Ix__Const' *) + +#[local] Definition Semigroup__Const_op_zlzlzgzg__ {inst_a : Type} {inst_k + : Type} {inst_b : inst_k} `{GHC.Base.Semigroup inst_a} + : Const inst_a inst_b -> Const inst_a inst_b -> Const inst_a inst_b := + GHC.Prim.coerce (_GHC.Base.<<>>_). + +#[global] +Program Instance Semigroup__Const {a : Type} {k : Type} {b : k} + `{GHC.Base.Semigroup a} + : GHC.Base.Semigroup (Const a b) := + fun _ k__ => + k__ {| GHC.Base.op_zlzlzgzg____ := Semigroup__Const_op_zlzlzgzg__ |}. + +#[local] Definition Monoid__Const_mappend {inst_a : Type} {inst_k : Type} + {inst_b : inst_k} `{GHC.Base.Monoid inst_a} + : Const inst_a inst_b -> Const inst_a inst_b -> Const inst_a inst_b := + GHC.Prim.coerce (GHC.Base.mappend). + +#[local] Definition Monoid__Const_mconcat {inst_a : Type} {inst_k : Type} + {inst_b : inst_k} `{GHC.Base.Monoid inst_a} + : list (Const inst_a inst_b) -> Const inst_a inst_b := + GHC.Prim.coerce (GHC.Base.mconcat). + +#[local] Definition Monoid__Const_mempty {inst_a : Type} {inst_k : Type} {inst_b + : inst_k} `{GHC.Base.Monoid inst_a} + : Const inst_a inst_b := + GHC.Prim.coerce (GHC.Base.mempty). + +#[global] +Program Instance Monoid__Const {a : Type} {k : Type} {b : k} `{GHC.Base.Monoid + a} + : GHC.Base.Monoid (Const a b) := + fun _ k__ => + k__ {| GHC.Base.mappend__ := Monoid__Const_mappend ; + GHC.Base.mconcat__ := Monoid__Const_mconcat ; + GHC.Base.mempty__ := Monoid__Const_mempty |}. + +(* Skipping all instances of class `GHC.Num.Num', including + `Data.Functor.Const.Num__Const' *) + +#[local] Definition Ord__Const_op_zl__ {inst_a : Type} {inst_k : Type} {inst_b + : inst_k} `{GHC.Base.Ord inst_a} + : Const inst_a inst_b -> Const inst_a inst_b -> bool := + GHC.Prim.coerce (_GHC.Base.<_). + +#[local] Definition Ord__Const_op_zlze__ {inst_a : Type} {inst_k : Type} {inst_b + : inst_k} `{GHC.Base.Ord inst_a} + : Const inst_a inst_b -> Const inst_a inst_b -> bool := + GHC.Prim.coerce (_GHC.Base.<=_). + +#[local] Definition Ord__Const_op_zg__ {inst_a : Type} {inst_k : Type} {inst_b + : inst_k} `{GHC.Base.Ord inst_a} + : Const inst_a inst_b -> Const inst_a inst_b -> bool := + GHC.Prim.coerce (_GHC.Base.>_). + +#[local] Definition Ord__Const_op_zgze__ {inst_a : Type} {inst_k : Type} {inst_b + : inst_k} `{GHC.Base.Ord inst_a} + : Const inst_a inst_b -> Const inst_a inst_b -> bool := + GHC.Prim.coerce (_GHC.Base.>=_). + +#[local] Definition Ord__Const_compare {inst_a : Type} {inst_k : Type} {inst_b + : inst_k} `{GHC.Base.Ord inst_a} + : Const inst_a inst_b -> Const inst_a inst_b -> comparison := + GHC.Prim.coerce (GHC.Base.compare). + +#[local] Definition Ord__Const_max {inst_a : Type} {inst_k : Type} {inst_b + : inst_k} `{GHC.Base.Ord inst_a} + : Const inst_a inst_b -> Const inst_a inst_b -> Const inst_a inst_b := + GHC.Prim.coerce (GHC.Base.max). + +#[local] Definition Ord__Const_min {inst_a : Type} {inst_k : Type} {inst_b + : inst_k} `{GHC.Base.Ord inst_a} + : Const inst_a inst_b -> Const inst_a inst_b -> Const inst_a inst_b := + GHC.Prim.coerce (GHC.Base.min). + +#[global] +Program Instance Ord__Const {a : Type} {k : Type} {b : k} `{GHC.Base.Ord a} + : GHC.Base.Ord (Const a b) := + fun _ k__ => + k__ {| GHC.Base.op_zl____ := Ord__Const_op_zl__ ; + GHC.Base.op_zlze____ := Ord__Const_op_zlze__ ; + GHC.Base.op_zg____ := Ord__Const_op_zg__ ; + GHC.Base.op_zgze____ := Ord__Const_op_zgze__ ; + GHC.Base.compare__ := Ord__Const_compare ; + GHC.Base.max__ := Ord__Const_max ; + GHC.Base.min__ := Ord__Const_min |}. + +(* Skipping all instances of class `GHC.Real.Real', including + `Data.Functor.Const.Real__Const' *) + +(* Skipping all instances of class `GHC.Real.RealFrac', including + `Data.Functor.Const.RealFrac__Const' *) + +(* Skipping all instances of class `GHC.Float.RealFloat', including + `Data.Functor.Const.RealFloat__Const' *) + +(* Skipping all instances of class `Foreign.Storable.Storable', including + `Data.Functor.Const.Storable__Const' *) + (* Skipping all instances of class `GHC.Read.Read', including `Data.Functor.Const.Read__Const' *) @@ -217,25 +366,27 @@ Program Instance Applicative__Const {m : Type} `{GHC.Base.Monoid m} Applicative__Const_op_ztzg__ ; GHC.Base.pure__ := fun {a : Type} => Applicative__Const_pure |}. -Instance Unpeel_Const (k a : Type) (b : k) - : HsToCoq.Unpeel.Unpeel (Const a b) a := - HsToCoq.Unpeel.Build_Unpeel _ _ getConst Mk_Const. - (* External variables: - Type bool false list true Coq.Program.Basics.compose Data.Foldable.Foldable - Data.Foldable.foldMap'__ Data.Foldable.foldMap__ Data.Foldable.fold__ - Data.Foldable.foldl'__ Data.Foldable.foldl__ Data.Foldable.foldr'__ - Data.Foldable.foldr__ Data.Foldable.length__ Data.Foldable.null__ - Data.Foldable.product__ Data.Foldable.sum__ Data.Foldable.toList__ - Data.SemigroupInternal.Mk_Dual Data.SemigroupInternal.Mk_Endo - Data.SemigroupInternal.Mk_Product Data.SemigroupInternal.Mk_Sum - Data.SemigroupInternal.appEndo Data.SemigroupInternal.getDual - Data.SemigroupInternal.getProduct Data.SemigroupInternal.getSum - GHC.Base.Applicative GHC.Base.Functor GHC.Base.Monoid GHC.Base.build' - GHC.Base.const GHC.Base.flip GHC.Base.fmap__ GHC.Base.id GHC.Base.liftA2__ - GHC.Base.mappend GHC.Base.mempty GHC.Base.op_z2218U__ GHC.Base.op_zlzd__ - GHC.Base.op_zlzd____ GHC.Base.op_zlzlzgzg__ GHC.Base.op_zlztzg____ - GHC.Base.op_ztzg____ GHC.Base.pure__ GHC.Num.Int GHC.Num.Num GHC.Num.fromInteger - GHC.Num.op_zp__ GHC.Prim.coerce HsToCoq.Unpeel.Build_Unpeel - HsToCoq.Unpeel.Unpeel + Type bool comparison false list true Coq.Program.Basics.compose + Data.Foldable.Foldable Data.Foldable.foldMap'__ Data.Foldable.foldMap__ + Data.Foldable.fold__ Data.Foldable.foldl'__ Data.Foldable.foldl__ + Data.Foldable.foldr'__ Data.Foldable.foldr__ Data.Foldable.length__ + Data.Foldable.null__ Data.Foldable.product__ Data.Foldable.sum__ + Data.Foldable.toList__ Data.SemigroupInternal.Mk_Dual + Data.SemigroupInternal.Mk_Endo Data.SemigroupInternal.Mk_Product + Data.SemigroupInternal.Mk_Sum Data.SemigroupInternal.appEndo + Data.SemigroupInternal.getDual Data.SemigroupInternal.getProduct + Data.SemigroupInternal.getSum GHC.Base.Applicative GHC.Base.Eq_ GHC.Base.Functor + GHC.Base.Monoid GHC.Base.Ord GHC.Base.Semigroup GHC.Base.build' GHC.Base.compare + GHC.Base.compare__ GHC.Base.const GHC.Base.flip GHC.Base.fmap__ GHC.Base.id + GHC.Base.liftA2__ GHC.Base.mappend GHC.Base.mappend__ GHC.Base.max + GHC.Base.max__ GHC.Base.mconcat GHC.Base.mconcat__ GHC.Base.mempty + GHC.Base.mempty__ GHC.Base.min GHC.Base.min__ GHC.Base.op_z2218U__ + GHC.Base.op_zeze__ GHC.Base.op_zeze____ GHC.Base.op_zg__ GHC.Base.op_zg____ + GHC.Base.op_zgze__ GHC.Base.op_zgze____ GHC.Base.op_zl__ GHC.Base.op_zl____ + GHC.Base.op_zlzd__ GHC.Base.op_zlzd____ GHC.Base.op_zlze__ GHC.Base.op_zlze____ + GHC.Base.op_zlzlzgzg__ GHC.Base.op_zlzlzgzg____ GHC.Base.op_zlztzg____ + GHC.Base.op_zsze__ GHC.Base.op_zsze____ GHC.Base.op_ztzg____ GHC.Base.pure__ + GHC.Num.Int GHC.Num.Num GHC.Num.fromInteger GHC.Num.op_zp__ GHC.Prim.coerce + HsToCoq.Unpeel.Build_Unpeel HsToCoq.Unpeel.Unpeel *) diff --git a/base/Data/Functor/Identity.v b/base/Data/Functor/Identity.v index 0fabb7321..fa8dda86d 100644 --- a/base/Data/Functor/Identity.v +++ b/base/Data/Functor/Identity.v @@ -36,6 +36,144 @@ Instance Unpeel_Identity a : HsToCoq.Unpeel.Unpeel (Identity a) a := (* Converted value declarations: *) +(* Skipping all instances of class `Data.Bits.Bits', including + `Data.Functor.Identity.Bits__Identity' *) + +(* Skipping all instances of class `GHC.Enum.Bounded', including + `Data.Functor.Identity.Bounded__Identity' *) + +(* Skipping all instances of class `GHC.Enum.Enum', including + `Data.Functor.Identity.Enum__Identity' *) + +#[local] Definition Eq___Identity_op_zeze__ {inst_a : Type} `{GHC.Base.Eq_ + inst_a} + : Identity inst_a -> Identity inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.==_). + +#[local] Definition Eq___Identity_op_zsze__ {inst_a : Type} `{GHC.Base.Eq_ + inst_a} + : Identity inst_a -> Identity inst_a -> bool := + GHC.Prim.coerce (_GHC.Base./=_). + +#[global] +Program Instance Eq___Identity {a : Type} `{GHC.Base.Eq_ a} + : GHC.Base.Eq_ (Identity a) := + fun _ k__ => + k__ {| GHC.Base.op_zeze____ := Eq___Identity_op_zeze__ ; + GHC.Base.op_zsze____ := Eq___Identity_op_zsze__ |}. + +(* Skipping all instances of class `Data.Bits.FiniteBits', including + `Data.Functor.Identity.FiniteBits__Identity' *) + +(* Skipping all instances of class `GHC.Float.Floating', including + `Data.Functor.Identity.Floating__Identity' *) + +(* Skipping all instances of class `GHC.Real.Fractional', including + `Data.Functor.Identity.Fractional__Identity' *) + +(* Skipping all instances of class `GHC.Generics.Generic', including + `Data.Functor.Identity.Generic__Identity' *) + +(* Skipping all instances of class `GHC.Generics.Generic1', including + `Data.Functor.Identity.Generic1__TYPE__Identity__LiftedRep' *) + +(* Skipping all instances of class `GHC.Real.Integral', including + `Data.Functor.Identity.Integral__Identity' *) + +(* Skipping all instances of class `GHC.Ix.Ix', including + `Data.Functor.Identity.Ix__Identity' *) + +#[local] Definition Semigroup__Identity_op_zlzlzgzg__ {inst_a : Type} + `{GHC.Base.Semigroup inst_a} + : Identity inst_a -> Identity inst_a -> Identity inst_a := + GHC.Prim.coerce (_GHC.Base.<<>>_). + +#[global] +Program Instance Semigroup__Identity {a : Type} `{GHC.Base.Semigroup a} + : GHC.Base.Semigroup (Identity a) := + fun _ k__ => + k__ {| GHC.Base.op_zlzlzgzg____ := Semigroup__Identity_op_zlzlzgzg__ |}. + +#[local] Definition Monoid__Identity_mappend {inst_a : Type} `{GHC.Base.Monoid + inst_a} + : Identity inst_a -> Identity inst_a -> Identity inst_a := + GHC.Prim.coerce (GHC.Base.mappend). + +#[local] Definition Monoid__Identity_mconcat {inst_a : Type} `{GHC.Base.Monoid + inst_a} + : list (Identity inst_a) -> Identity inst_a := + GHC.Prim.coerce (GHC.Base.mconcat). + +#[local] Definition Monoid__Identity_mempty {inst_a : Type} `{GHC.Base.Monoid + inst_a} + : Identity inst_a := + GHC.Prim.coerce (GHC.Base.mempty). + +#[global] +Program Instance Monoid__Identity {a : Type} `{GHC.Base.Monoid a} + : GHC.Base.Monoid (Identity a) := + fun _ k__ => + k__ {| GHC.Base.mappend__ := Monoid__Identity_mappend ; + GHC.Base.mconcat__ := Monoid__Identity_mconcat ; + GHC.Base.mempty__ := Monoid__Identity_mempty |}. + +(* Skipping all instances of class `GHC.Num.Num', including + `Data.Functor.Identity.Num__Identity' *) + +#[local] Definition Ord__Identity_op_zl__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : Identity inst_a -> Identity inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.<_). + +#[local] Definition Ord__Identity_op_zlze__ {inst_a : Type} `{GHC.Base.Ord + inst_a} + : Identity inst_a -> Identity inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.<=_). + +#[local] Definition Ord__Identity_op_zg__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : Identity inst_a -> Identity inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.>_). + +#[local] Definition Ord__Identity_op_zgze__ {inst_a : Type} `{GHC.Base.Ord + inst_a} + : Identity inst_a -> Identity inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.>=_). + +#[local] Definition Ord__Identity_compare {inst_a : Type} `{GHC.Base.Ord inst_a} + : Identity inst_a -> Identity inst_a -> comparison := + GHC.Prim.coerce (GHC.Base.compare). + +#[local] Definition Ord__Identity_max {inst_a : Type} `{GHC.Base.Ord inst_a} + : Identity inst_a -> Identity inst_a -> Identity inst_a := + GHC.Prim.coerce (GHC.Base.max). + +#[local] Definition Ord__Identity_min {inst_a : Type} `{GHC.Base.Ord inst_a} + : Identity inst_a -> Identity inst_a -> Identity inst_a := + GHC.Prim.coerce (GHC.Base.min). + +#[global] +Program Instance Ord__Identity {a : Type} `{GHC.Base.Ord a} + : GHC.Base.Ord (Identity a) := + fun _ k__ => + k__ {| GHC.Base.op_zl____ := Ord__Identity_op_zl__ ; + GHC.Base.op_zlze____ := Ord__Identity_op_zlze__ ; + GHC.Base.op_zg____ := Ord__Identity_op_zg__ ; + GHC.Base.op_zgze____ := Ord__Identity_op_zgze__ ; + GHC.Base.compare__ := Ord__Identity_compare ; + GHC.Base.max__ := Ord__Identity_max ; + GHC.Base.min__ := Ord__Identity_min |}. + +(* Skipping all instances of class `GHC.Real.Real', including + `Data.Functor.Identity.Real__Identity' *) + +(* Skipping all instances of class `GHC.Real.RealFrac', including + `Data.Functor.Identity.RealFrac__Identity' *) + +(* Skipping all instances of class `GHC.Float.RealFloat', including + `Data.Functor.Identity.RealFloat__Identity' *) + +(* Skipping all instances of class `Foreign.Storable.Storable', including + `Data.Functor.Identity.Storable__Identity' *) + (* Skipping all instances of class `GHC.Read.Read', including `Data.Functor.Identity.Read__Identity' *) @@ -200,15 +338,22 @@ Program Instance Monad__Identity : GHC.Base.Monad Identity := `Data.Functor.Identity.MonadFix__Identity' *) (* External variables: - Type bool cons false list nil Data.Foldable.Foldable Data.Foldable.foldMap'__ - Data.Foldable.foldMap__ Data.Foldable.fold__ Data.Foldable.foldl'__ - Data.Foldable.foldl__ Data.Foldable.foldr'__ Data.Foldable.foldr__ - Data.Foldable.length__ Data.Foldable.null__ Data.Foldable.product__ - Data.Foldable.sum__ Data.Foldable.toList__ GHC.Base.Applicative GHC.Base.Functor - GHC.Base.Monad GHC.Base.Monoid GHC.Base.const GHC.Base.fmap__ GHC.Base.id - GHC.Base.liftA2__ GHC.Base.mempty GHC.Base.op_z2218U__ GHC.Base.op_zgzg____ - GHC.Base.op_zgzgze____ GHC.Base.op_zlzd__ GHC.Base.op_zlzd____ - GHC.Base.op_zlzlzgzg__ GHC.Base.op_zlztzg____ GHC.Base.op_ztzg____ GHC.Base.pure + Type bool comparison cons false list nil Data.Foldable.Foldable + Data.Foldable.foldMap'__ Data.Foldable.foldMap__ Data.Foldable.fold__ + Data.Foldable.foldl'__ Data.Foldable.foldl__ Data.Foldable.foldr'__ + Data.Foldable.foldr__ Data.Foldable.length__ Data.Foldable.null__ + Data.Foldable.product__ Data.Foldable.sum__ Data.Foldable.toList__ + GHC.Base.Applicative GHC.Base.Eq_ GHC.Base.Functor GHC.Base.Monad + GHC.Base.Monoid GHC.Base.Ord GHC.Base.Semigroup GHC.Base.compare + GHC.Base.compare__ GHC.Base.const GHC.Base.fmap__ GHC.Base.id GHC.Base.liftA2__ + GHC.Base.mappend GHC.Base.mappend__ GHC.Base.max GHC.Base.max__ GHC.Base.mconcat + GHC.Base.mconcat__ GHC.Base.mempty GHC.Base.mempty__ GHC.Base.min GHC.Base.min__ + GHC.Base.op_z2218U__ GHC.Base.op_zeze__ GHC.Base.op_zeze____ GHC.Base.op_zg__ + GHC.Base.op_zg____ GHC.Base.op_zgze__ GHC.Base.op_zgze____ GHC.Base.op_zgzg____ + GHC.Base.op_zgzgze____ GHC.Base.op_zl__ GHC.Base.op_zl____ GHC.Base.op_zlzd__ + GHC.Base.op_zlzd____ GHC.Base.op_zlze__ GHC.Base.op_zlze____ + GHC.Base.op_zlzlzgzg__ GHC.Base.op_zlzlzgzg____ GHC.Base.op_zlztzg____ + GHC.Base.op_zsze__ GHC.Base.op_zsze____ GHC.Base.op_ztzg____ GHC.Base.pure GHC.Base.pure__ GHC.Base.return___ GHC.Num.Int GHC.Num.Num GHC.Num.fromInteger GHC.Prim.coerce *) diff --git a/base/Data/Functor/Product.v b/base/Data/Functor/Product.v index 4f14ffeb7..2f9ded24f 100644 --- a/base/Data/Functor/Product.v +++ b/base/Data/Functor/Product.v @@ -34,6 +34,15 @@ Arguments Pair {_} {_} {_} {_} _ _. (* Converted value declarations: *) +(* Skipping all instances of class `Data.Data.Data', including + `Data.Functor.Product.Data__Product' *) + +(* Skipping all instances of class `GHC.Generics.Generic', including + `Data.Functor.Product.Generic__Product' *) + +(* Skipping all instances of class `GHC.Generics.Generic1', including + `Data.Functor.Product.Generic1__Product__5' *) + #[local] Definition Eq1__Product_liftEq {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Functor.Classes.Eq1 inst_f} `{Data.Functor.Classes.Eq1 inst_g} diff --git a/base/Data/Functor/Sum.v b/base/Data/Functor/Sum.v index 3d4f90c28..270944eca 100644 --- a/base/Data/Functor/Sum.v +++ b/base/Data/Functor/Sum.v @@ -36,6 +36,15 @@ Arguments InR {_} {_} {_} {_} _. (* Converted value declarations: *) +(* Skipping all instances of class `Data.Data.Data', including + `Data.Functor.Sum.Data__Sum' *) + +(* Skipping all instances of class `GHC.Generics.Generic', including + `Data.Functor.Sum.Generic__Sum' *) + +(* Skipping all instances of class `GHC.Generics.Generic1', including + `Data.Functor.Sum.Generic1__Sum__5' *) + #[local] Definition Eq1__Sum_liftEq {inst_f : Type -> Type} {inst_g : Type -> Type} `{Data.Functor.Classes.Eq1 inst_f} `{Data.Functor.Classes.Eq1 inst_g} diff --git a/base/Data/Monoid.v b/base/Data/Monoid.v index 32729e7c3..98ce5019c 100644 --- a/base/Data/Monoid.v +++ b/base/Data/Monoid.v @@ -12,7 +12,9 @@ Require Coq.Program.Wf. (* Converted imports: *) +Require Control.Monad.Fail. Require GHC.Base. +Require GHC.Prim. Require HsToCoq.Unpeel. Import GHC.Base.Notations. @@ -22,14 +24,14 @@ Inductive Last a : Type := | Mk_Last (getLast : option a) : Last a. Inductive First a : Type := | Mk_First (getFirst : option a) : First a. -Inductive Ap (f : Type -> Type) (a : Type) : Type := +Inductive Ap {k : Type} (f : k -> Type) (a : k) : Type := | Mk_Ap (getAp : f a) : Ap f a. Arguments Mk_Last {_} _. Arguments Mk_First {_} _. -Arguments Mk_Ap {_} {_} _. +Arguments Mk_Ap {_} {_} {_} _. #[global] Definition getLast {a} (arg_0__ : Last a) := let 'Mk_Last getLast := arg_0__ in @@ -39,12 +41,459 @@ Arguments Mk_Ap {_} {_} _. let 'Mk_First getFirst := arg_0__ in getFirst. -#[global] Definition getAp {f : Type -> Type} {a : Type} (arg_0__ : Ap f a) := +#[global] Definition getAp {k : Type} {f : k -> Type} {a : k} (arg_0__ + : Ap f a) := let 'Mk_Ap getAp := arg_0__ in getAp. (* Converted value declarations: *) +(* Skipping all instances of class `GHC.Base.Alternative', including + `Data.Monoid.Alternative__Ap' *) + +Instance Unpeel_Ap (k : Type) (f : k -> Type) (a : k) + : HsToCoq.Unpeel.Unpeel (Ap f a) (f a) := + HsToCoq.Unpeel.Build_Unpeel _ _ getAp Mk_Ap. + +#[local] Definition Applicative__Ap_liftA2 {inst_f : Type -> Type} + `{GHC.Base.Applicative inst_f} + : forall {a : Type}, + forall {b : Type}, + forall {c : Type}, (a -> b -> c) -> Ap inst_f a -> Ap inst_f b -> Ap inst_f c := + fun {a : Type} {b : Type} {c : Type} => GHC.Prim.coerce (GHC.Base.liftA2). + +#[local] Definition Applicative__Ap_op_zlztzg__ {inst_f : Type -> Type} + `{GHC.Base.Applicative inst_f} + : forall {a : Type}, + forall {b : Type}, Ap inst_f (a -> b) -> Ap inst_f a -> Ap inst_f b := + fun {a : Type} {b : Type} => GHC.Prim.coerce (_GHC.Base.<*>_). + +#[local] Definition Applicative__Ap_op_ztzg__ {inst_f : Type -> Type} + `{GHC.Base.Applicative inst_f} + : forall {a : Type}, + forall {b : Type}, Ap inst_f a -> Ap inst_f b -> Ap inst_f b := + fun {a : Type} {b : Type} => GHC.Prim.coerce (_GHC.Base.*>_). + +#[local] Definition Applicative__Ap_pure {inst_f : Type -> Type} + `{GHC.Base.Applicative inst_f} + : forall {a : Type}, a -> Ap inst_f a := + fun {a : Type} => GHC.Prim.coerce (GHC.Base.pure). + +#[local] Definition Functor__Ap_fmap {inst_f : Type -> Type} `{GHC.Base.Functor + inst_f} + : forall {a : Type}, + forall {b : Type}, (a -> b) -> Ap inst_f a -> Ap inst_f b := + fun {a : Type} {b : Type} => GHC.Prim.coerce (GHC.Base.fmap). + +#[local] Definition Functor__Ap_op_zlzd__ {inst_f : Type -> Type} + `{GHC.Base.Functor inst_f} + : forall {a : Type}, forall {b : Type}, a -> Ap inst_f b -> Ap inst_f a := + fun {a : Type} {b : Type} => GHC.Prim.coerce (_GHC.Base.<$_). + +#[global] +Program Instance Functor__Ap {f : Type -> Type} `{GHC.Base.Functor f} + : GHC.Base.Functor (Ap f) := + fun _ k__ => + k__ {| GHC.Base.fmap__ := fun {a : Type} {b : Type} => Functor__Ap_fmap ; + GHC.Base.op_zlzd____ := fun {a : Type} {b : Type} => Functor__Ap_op_zlzd__ |}. + +#[global] +Program Instance Applicative__Ap {f : Type -> Type} `{GHC.Base.Applicative f} + : GHC.Base.Applicative (Ap f) := + fun _ k__ => + k__ {| GHC.Base.liftA2__ := fun {a : Type} {b : Type} {c : Type} => + Applicative__Ap_liftA2 ; + GHC.Base.op_zlztzg____ := fun {a : Type} {b : Type} => + Applicative__Ap_op_zlztzg__ ; + GHC.Base.op_ztzg____ := fun {a : Type} {b : Type} => Applicative__Ap_op_ztzg__ ; + GHC.Base.pure__ := fun {a : Type} => Applicative__Ap_pure |}. + +(* Skipping all instances of class `GHC.Enum.Enum', including + `Data.Monoid.Enum__Ap' *) + +#[local] Definition Eq___Ap_op_zeze__ {inst_k : Type} {inst_f : inst_k -> Type} + {inst_a : inst_k} `{GHC.Base.Eq_ (inst_f inst_a)} + : Ap inst_f inst_a -> Ap inst_f inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.==_). + +#[local] Definition Eq___Ap_op_zsze__ {inst_k : Type} {inst_f : inst_k -> Type} + {inst_a : inst_k} `{GHC.Base.Eq_ (inst_f inst_a)} + : Ap inst_f inst_a -> Ap inst_f inst_a -> bool := + GHC.Prim.coerce (_GHC.Base./=_). + +#[global] +Program Instance Eq___Ap {k : Type} {f : k -> Type} {a : k} `{GHC.Base.Eq_ (f + a)} + : GHC.Base.Eq_ (Ap f a) := + fun _ k__ => + k__ {| GHC.Base.op_zeze____ := Eq___Ap_op_zeze__ ; + GHC.Base.op_zsze____ := Eq___Ap_op_zsze__ |}. + +(* Skipping all instances of class `GHC.Generics.Generic', including + `Data.Monoid.Generic__Ap' *) + +(* Skipping all instances of class `GHC.Generics.Generic1', including + `Data.Monoid.Generic1__Ap__5' *) + +#[local] Definition Monad__Ap_op_zgzg__ {inst_f : Type -> Type} `{GHC.Base.Monad + inst_f} + : forall {a : Type}, + forall {b : Type}, Ap inst_f a -> Ap inst_f b -> Ap inst_f b := + fun {a : Type} {b : Type} => GHC.Prim.coerce (_GHC.Base.>>_). + +#[local] Definition Monad__Ap_op_zgzgze__ {inst_f : Type -> Type} + `{GHC.Base.Monad inst_f} + : forall {a : Type}, + forall {b : Type}, Ap inst_f a -> (a -> Ap inst_f b) -> Ap inst_f b := + fun {a : Type} {b : Type} => GHC.Prim.coerce (_GHC.Base.>>=_). + +#[local] Definition Monad__Ap_return_ {inst_f : Type -> Type} `{GHC.Base.Monad + inst_f} + : forall {a : Type}, a -> Ap inst_f a := + fun {a : Type} => GHC.Prim.coerce (GHC.Base.return_). + +#[global] +Program Instance Monad__Ap {f : Type -> Type} `{GHC.Base.Monad f} + : GHC.Base.Monad (Ap f) := + fun _ k__ => + k__ {| GHC.Base.op_zgzg____ := fun {a : Type} {b : Type} => + Monad__Ap_op_zgzg__ ; + GHC.Base.op_zgzgze____ := fun {a : Type} {b : Type} => Monad__Ap_op_zgzgze__ ; + GHC.Base.return___ := fun {a : Type} => Monad__Ap_return_ |}. + +#[local] Definition MonadFail__Ap_fail {inst_f : Type -> Type} + `{Control.Monad.Fail.MonadFail inst_f} + : forall {a : Type}, GHC.Base.String -> Ap inst_f a := + fun {a : Type} => GHC.Prim.coerce (Control.Monad.Fail.fail). + +#[global] +Program Instance MonadFail__Ap {f : Type -> Type} `{Control.Monad.Fail.MonadFail + f} + : Control.Monad.Fail.MonadFail (Ap f) := + fun _ k__ => + k__ {| Control.Monad.Fail.fail__ := fun {a : Type} => MonadFail__Ap_fail |}. + +(* Skipping all instances of class `GHC.Base.MonadPlus', including + `Data.Monoid.MonadPlus__Ap' *) + +#[local] Definition Ord__Ap_op_zl__ {inst_k : Type} {inst_f : inst_k -> Type} + {inst_a : inst_k} `{GHC.Base.Ord (inst_f inst_a)} + : Ap inst_f inst_a -> Ap inst_f inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.<_). + +#[local] Definition Ord__Ap_op_zlze__ {inst_k : Type} {inst_f : inst_k -> Type} + {inst_a : inst_k} `{GHC.Base.Ord (inst_f inst_a)} + : Ap inst_f inst_a -> Ap inst_f inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.<=_). + +#[local] Definition Ord__Ap_op_zg__ {inst_k : Type} {inst_f : inst_k -> Type} + {inst_a : inst_k} `{GHC.Base.Ord (inst_f inst_a)} + : Ap inst_f inst_a -> Ap inst_f inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.>_). + +#[local] Definition Ord__Ap_op_zgze__ {inst_k : Type} {inst_f : inst_k -> Type} + {inst_a : inst_k} `{GHC.Base.Ord (inst_f inst_a)} + : Ap inst_f inst_a -> Ap inst_f inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.>=_). + +#[local] Definition Ord__Ap_compare {inst_k : Type} {inst_f : inst_k -> Type} + {inst_a : inst_k} `{GHC.Base.Ord (inst_f inst_a)} + : Ap inst_f inst_a -> Ap inst_f inst_a -> comparison := + GHC.Prim.coerce (GHC.Base.compare). + +#[local] Definition Ord__Ap_max {inst_k : Type} {inst_f : inst_k -> Type} + {inst_a : inst_k} `{GHC.Base.Ord (inst_f inst_a)} + : Ap inst_f inst_a -> Ap inst_f inst_a -> Ap inst_f inst_a := + GHC.Prim.coerce (GHC.Base.max). + +#[local] Definition Ord__Ap_min {inst_k : Type} {inst_f : inst_k -> Type} + {inst_a : inst_k} `{GHC.Base.Ord (inst_f inst_a)} + : Ap inst_f inst_a -> Ap inst_f inst_a -> Ap inst_f inst_a := + GHC.Prim.coerce (GHC.Base.min). + +#[global] +Program Instance Ord__Ap {k : Type} {f : k -> Type} {a : k} `{GHC.Base.Ord (f + a)} + : GHC.Base.Ord (Ap f a) := + fun _ k__ => + k__ {| GHC.Base.op_zl____ := Ord__Ap_op_zl__ ; + GHC.Base.op_zlze____ := Ord__Ap_op_zlze__ ; + GHC.Base.op_zg____ := Ord__Ap_op_zg__ ; + GHC.Base.op_zgze____ := Ord__Ap_op_zgze__ ; + GHC.Base.compare__ := Ord__Ap_compare ; + GHC.Base.max__ := Ord__Ap_max ; + GHC.Base.min__ := Ord__Ap_min |}. + +(* Skipping all instances of class `GHC.Read.Read', including + `Data.Monoid.Read__Ap' *) + +(* Skipping all instances of class `GHC.Show.Show', including + `Data.Monoid.Show__Ap' *) + +Instance Unpeel_Last a : HsToCoq.Unpeel.Unpeel (Last a) (option a) := + HsToCoq.Unpeel.Build_Unpeel _ _ getLast Mk_Last. + +#[local] Definition Eq___Last_op_zeze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} + : Last inst_a -> Last inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.==_). + +#[local] Definition Eq___Last_op_zsze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} + : Last inst_a -> Last inst_a -> bool := + GHC.Prim.coerce (_GHC.Base./=_). + +#[global] +Program Instance Eq___Last {a : Type} `{GHC.Base.Eq_ a} + : GHC.Base.Eq_ (Last a) := + fun _ k__ => + k__ {| GHC.Base.op_zeze____ := Eq___Last_op_zeze__ ; + GHC.Base.op_zsze____ := Eq___Last_op_zsze__ |}. + +#[local] Definition Ord__Last_op_zl__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : Last inst_a -> Last inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.<_). + +#[local] Definition Ord__Last_op_zlze__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : Last inst_a -> Last inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.<=_). + +#[local] Definition Ord__Last_op_zg__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : Last inst_a -> Last inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.>_). + +#[local] Definition Ord__Last_op_zgze__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : Last inst_a -> Last inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.>=_). + +#[local] Definition Ord__Last_compare {inst_a : Type} `{GHC.Base.Ord inst_a} + : Last inst_a -> Last inst_a -> comparison := + GHC.Prim.coerce (GHC.Base.compare). + +#[local] Definition Ord__Last_max {inst_a : Type} `{GHC.Base.Ord inst_a} + : Last inst_a -> Last inst_a -> Last inst_a := + GHC.Prim.coerce (GHC.Base.max). + +#[local] Definition Ord__Last_min {inst_a : Type} `{GHC.Base.Ord inst_a} + : Last inst_a -> Last inst_a -> Last inst_a := + GHC.Prim.coerce (GHC.Base.min). + +#[global] +Program Instance Ord__Last {a : Type} `{GHC.Base.Ord a} + : GHC.Base.Ord (Last a) := + fun _ k__ => + k__ {| GHC.Base.op_zl____ := Ord__Last_op_zl__ ; + GHC.Base.op_zlze____ := Ord__Last_op_zlze__ ; + GHC.Base.op_zg____ := Ord__Last_op_zg__ ; + GHC.Base.op_zgze____ := Ord__Last_op_zgze__ ; + GHC.Base.compare__ := Ord__Last_compare ; + GHC.Base.max__ := Ord__Last_max ; + GHC.Base.min__ := Ord__Last_min |}. + +(* Skipping all instances of class `GHC.Read.Read', including + `Data.Monoid.Read__Last' *) + +(* Skipping all instances of class `GHC.Show.Show', including + `Data.Monoid.Show__Last' *) + +(* Skipping all instances of class `GHC.Generics.Generic', including + `Data.Monoid.Generic__Last' *) + +(* Skipping all instances of class `GHC.Generics.Generic1', including + `Data.Monoid.Generic1__TYPE__Last__LiftedRep' *) + +#[local] Definition Functor__Last_fmap + : forall {a : Type}, forall {b : Type}, (a -> b) -> Last a -> Last b := + fun {a : Type} {b : Type} => GHC.Prim.coerce (GHC.Base.fmap). + +#[local] Definition Functor__Last_op_zlzd__ + : forall {a : Type}, forall {b : Type}, a -> Last b -> Last a := + fun {a : Type} {b : Type} => GHC.Prim.coerce (_GHC.Base.<$_). + +#[global] +Program Instance Functor__Last : GHC.Base.Functor Last := + fun _ k__ => + k__ {| GHC.Base.fmap__ := fun {a : Type} {b : Type} => Functor__Last_fmap ; + GHC.Base.op_zlzd____ := fun {a : Type} {b : Type} => Functor__Last_op_zlzd__ |}. + +#[local] Definition Applicative__Last_liftA2 + : forall {a : Type}, + forall {b : Type}, + forall {c : Type}, (a -> b -> c) -> Last a -> Last b -> Last c := + fun {a : Type} {b : Type} {c : Type} => GHC.Prim.coerce (GHC.Base.liftA2). + +#[local] Definition Applicative__Last_op_zlztzg__ + : forall {a : Type}, forall {b : Type}, Last (a -> b) -> Last a -> Last b := + fun {a : Type} {b : Type} => GHC.Prim.coerce (_GHC.Base.<*>_). + +#[local] Definition Applicative__Last_op_ztzg__ + : forall {a : Type}, forall {b : Type}, Last a -> Last b -> Last b := + fun {a : Type} {b : Type} => GHC.Prim.coerce (_GHC.Base.*>_). + +#[local] Definition Applicative__Last_pure : forall {a : Type}, a -> Last a := + fun {a : Type} => GHC.Prim.coerce (GHC.Base.pure). + +#[global] +Program Instance Applicative__Last : GHC.Base.Applicative Last := + fun _ k__ => + k__ {| GHC.Base.liftA2__ := fun {a : Type} {b : Type} {c : Type} => + Applicative__Last_liftA2 ; + GHC.Base.op_zlztzg____ := fun {a : Type} {b : Type} => + Applicative__Last_op_zlztzg__ ; + GHC.Base.op_ztzg____ := fun {a : Type} {b : Type} => + Applicative__Last_op_ztzg__ ; + GHC.Base.pure__ := fun {a : Type} => Applicative__Last_pure |}. + +#[local] Definition Monad__Last_op_zgzg__ + : forall {a : Type}, forall {b : Type}, Last a -> Last b -> Last b := + fun {a : Type} {b : Type} => GHC.Prim.coerce (_GHC.Base.>>_). + +#[local] Definition Monad__Last_op_zgzgze__ + : forall {a : Type}, forall {b : Type}, Last a -> (a -> Last b) -> Last b := + fun {a : Type} {b : Type} => GHC.Prim.coerce (_GHC.Base.>>=_). + +#[local] Definition Monad__Last_return_ : forall {a : Type}, a -> Last a := + fun {a : Type} => GHC.Prim.coerce (GHC.Base.return_). + +#[global] +Program Instance Monad__Last : GHC.Base.Monad Last := + fun _ k__ => + k__ {| GHC.Base.op_zgzg____ := fun {a : Type} {b : Type} => + Monad__Last_op_zgzg__ ; + GHC.Base.op_zgzgze____ := fun {a : Type} {b : Type} => Monad__Last_op_zgzgze__ ; + GHC.Base.return___ := fun {a : Type} => Monad__Last_return_ |}. + +Instance Unpeel_First a : HsToCoq.Unpeel.Unpeel (First a) (option a) := + HsToCoq.Unpeel.Build_Unpeel _ _ getFirst Mk_First. + +#[local] Definition Eq___First_op_zeze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} + : First inst_a -> First inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.==_). + +#[local] Definition Eq___First_op_zsze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} + : First inst_a -> First inst_a -> bool := + GHC.Prim.coerce (_GHC.Base./=_). + +#[global] +Program Instance Eq___First {a : Type} `{GHC.Base.Eq_ a} + : GHC.Base.Eq_ (First a) := + fun _ k__ => + k__ {| GHC.Base.op_zeze____ := Eq___First_op_zeze__ ; + GHC.Base.op_zsze____ := Eq___First_op_zsze__ |}. + +#[local] Definition Ord__First_op_zl__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : First inst_a -> First inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.<_). + +#[local] Definition Ord__First_op_zlze__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : First inst_a -> First inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.<=_). + +#[local] Definition Ord__First_op_zg__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : First inst_a -> First inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.>_). + +#[local] Definition Ord__First_op_zgze__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : First inst_a -> First inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.>=_). + +#[local] Definition Ord__First_compare {inst_a : Type} `{GHC.Base.Ord inst_a} + : First inst_a -> First inst_a -> comparison := + GHC.Prim.coerce (GHC.Base.compare). + +#[local] Definition Ord__First_max {inst_a : Type} `{GHC.Base.Ord inst_a} + : First inst_a -> First inst_a -> First inst_a := + GHC.Prim.coerce (GHC.Base.max). + +#[local] Definition Ord__First_min {inst_a : Type} `{GHC.Base.Ord inst_a} + : First inst_a -> First inst_a -> First inst_a := + GHC.Prim.coerce (GHC.Base.min). + +#[global] +Program Instance Ord__First {a : Type} `{GHC.Base.Ord a} + : GHC.Base.Ord (First a) := + fun _ k__ => + k__ {| GHC.Base.op_zl____ := Ord__First_op_zl__ ; + GHC.Base.op_zlze____ := Ord__First_op_zlze__ ; + GHC.Base.op_zg____ := Ord__First_op_zg__ ; + GHC.Base.op_zgze____ := Ord__First_op_zgze__ ; + GHC.Base.compare__ := Ord__First_compare ; + GHC.Base.max__ := Ord__First_max ; + GHC.Base.min__ := Ord__First_min |}. + +(* Skipping all instances of class `GHC.Read.Read', including + `Data.Monoid.Read__First' *) + +(* Skipping all instances of class `GHC.Show.Show', including + `Data.Monoid.Show__First' *) + +(* Skipping all instances of class `GHC.Generics.Generic', including + `Data.Monoid.Generic__First' *) + +(* Skipping all instances of class `GHC.Generics.Generic1', including + `Data.Monoid.Generic1__TYPE__First__LiftedRep' *) + +#[local] Definition Functor__First_fmap + : forall {a : Type}, forall {b : Type}, (a -> b) -> First a -> First b := + fun {a : Type} {b : Type} => GHC.Prim.coerce (GHC.Base.fmap). + +#[local] Definition Functor__First_op_zlzd__ + : forall {a : Type}, forall {b : Type}, a -> First b -> First a := + fun {a : Type} {b : Type} => GHC.Prim.coerce (_GHC.Base.<$_). + +#[global] +Program Instance Functor__First : GHC.Base.Functor First := + fun _ k__ => + k__ {| GHC.Base.fmap__ := fun {a : Type} {b : Type} => Functor__First_fmap ; + GHC.Base.op_zlzd____ := fun {a : Type} {b : Type} => + Functor__First_op_zlzd__ |}. + +#[local] Definition Applicative__First_liftA2 + : forall {a : Type}, + forall {b : Type}, + forall {c : Type}, (a -> b -> c) -> First a -> First b -> First c := + fun {a : Type} {b : Type} {c : Type} => GHC.Prim.coerce (GHC.Base.liftA2). + +#[local] Definition Applicative__First_op_zlztzg__ + : forall {a : Type}, forall {b : Type}, First (a -> b) -> First a -> First b := + fun {a : Type} {b : Type} => GHC.Prim.coerce (_GHC.Base.<*>_). + +#[local] Definition Applicative__First_op_ztzg__ + : forall {a : Type}, forall {b : Type}, First a -> First b -> First b := + fun {a : Type} {b : Type} => GHC.Prim.coerce (_GHC.Base.*>_). + +#[local] Definition Applicative__First_pure : forall {a : Type}, a -> First a := + fun {a : Type} => GHC.Prim.coerce (GHC.Base.pure). + +#[global] +Program Instance Applicative__First : GHC.Base.Applicative First := + fun _ k__ => + k__ {| GHC.Base.liftA2__ := fun {a : Type} {b : Type} {c : Type} => + Applicative__First_liftA2 ; + GHC.Base.op_zlztzg____ := fun {a : Type} {b : Type} => + Applicative__First_op_zlztzg__ ; + GHC.Base.op_ztzg____ := fun {a : Type} {b : Type} => + Applicative__First_op_ztzg__ ; + GHC.Base.pure__ := fun {a : Type} => Applicative__First_pure |}. + +#[local] Definition Monad__First_op_zgzg__ + : forall {a : Type}, forall {b : Type}, First a -> First b -> First b := + fun {a : Type} {b : Type} => GHC.Prim.coerce (_GHC.Base.>>_). + +#[local] Definition Monad__First_op_zgzgze__ + : forall {a : Type}, forall {b : Type}, First a -> (a -> First b) -> First b := + fun {a : Type} {b : Type} => GHC.Prim.coerce (_GHC.Base.>>=_). + +#[local] Definition Monad__First_return_ : forall {a : Type}, a -> First a := + fun {a : Type} => GHC.Prim.coerce (GHC.Base.return_). + +#[global] +Program Instance Monad__First : GHC.Base.Monad First := + fun _ k__ => + k__ {| GHC.Base.op_zgzg____ := fun {a : Type} {b : Type} => + Monad__First_op_zgzg__ ; + GHC.Base.op_zgzgze____ := fun {a : Type} {b : Type} => + Monad__First_op_zgzgze__ ; + GHC.Base.return___ := fun {a : Type} => Monad__First_return_ |}. + #[local] Definition Semigroup__First_op_zlzlzgzg__ {inst_a : Type} : First inst_a -> First inst_a -> First inst_a := fun arg_0__ arg_1__ => @@ -151,16 +600,21 @@ Program Instance Monoid__Ap {f : Type -> Type} {a : Type} `{GHC.Base.Applicative (* Skipping all instances of class `GHC.Num.Num', including `Data.Monoid.Num__Ap' *) -Instance Unpeel_Last a : HsToCoq.Unpeel.Unpeel (Last a) (option a) := - HsToCoq.Unpeel.Build_Unpeel _ _ getLast Mk_Last. - -Instance Unpeel_First a : HsToCoq.Unpeel.Unpeel (First a) (option a) := - HsToCoq.Unpeel.Build_Unpeel _ _ getFirst Mk_First. - (* External variables: - None Type list option GHC.Base.Applicative GHC.Base.Monoid GHC.Base.Semigroup - GHC.Base.foldr GHC.Base.liftA2 GHC.Base.mappend__ GHC.Base.mconcat__ - GHC.Base.mempty GHC.Base.mempty__ GHC.Base.op_zlzlzgzg__ - GHC.Base.op_zlzlzgzg____ GHC.Base.pure HsToCoq.Unpeel.Build_Unpeel + None Type bool comparison list option Control.Monad.Fail.MonadFail + Control.Monad.Fail.fail Control.Monad.Fail.fail__ GHC.Base.Applicative + GHC.Base.Eq_ GHC.Base.Functor GHC.Base.Monad GHC.Base.Monoid GHC.Base.Ord + GHC.Base.Semigroup GHC.Base.String GHC.Base.compare GHC.Base.compare__ + GHC.Base.fmap GHC.Base.fmap__ GHC.Base.foldr GHC.Base.liftA2 GHC.Base.liftA2__ + GHC.Base.mappend__ GHC.Base.max GHC.Base.max__ GHC.Base.mconcat__ + GHC.Base.mempty GHC.Base.mempty__ GHC.Base.min GHC.Base.min__ GHC.Base.op_zeze__ + GHC.Base.op_zeze____ GHC.Base.op_zg__ GHC.Base.op_zg____ GHC.Base.op_zgze__ + GHC.Base.op_zgze____ GHC.Base.op_zgzg__ GHC.Base.op_zgzg____ + GHC.Base.op_zgzgze__ GHC.Base.op_zgzgze____ GHC.Base.op_zl__ GHC.Base.op_zl____ + GHC.Base.op_zlzd__ GHC.Base.op_zlzd____ GHC.Base.op_zlze__ GHC.Base.op_zlze____ + GHC.Base.op_zlzlzgzg__ GHC.Base.op_zlzlzgzg____ GHC.Base.op_zlztzg__ + GHC.Base.op_zlztzg____ GHC.Base.op_zsze__ GHC.Base.op_zsze____ + GHC.Base.op_ztzg__ GHC.Base.op_ztzg____ GHC.Base.pure GHC.Base.pure__ + GHC.Base.return_ GHC.Base.return___ GHC.Prim.coerce HsToCoq.Unpeel.Build_Unpeel HsToCoq.Unpeel.Unpeel *) diff --git a/base/Data/OldList.v b/base/Data/OldList.v index 311375416..627ab7c13 100644 --- a/base/Data/OldList.v +++ b/base/Data/OldList.v @@ -39,7 +39,7 @@ Arguments Mk_SnocBuilder {_} _ _ _. Require Import GHC.Char. Require GHC.Unicode. Require Coq.Lists.List. -Require Import Omega. +Require Import Lia. Import Ascii.AsciiSyntax. Import String.StringSyntax. @@ -118,13 +118,13 @@ Lemma mergePairs_length : forall n, forall a cmp (xs : list (list a)) x y, induction n. intros; simpl. destruct xs; inversion H. simpl. auto. intros. destruct xs. -simpl in *. omega. +simpl in *. lia. destruct xs. -simpl in *. omega. +simpl in *. lia. assert (L : le (length xs) n). -simpl in H. omega. +simpl in H. lia. specialize (IHn a cmp xs l l0 L). -simpl in *. omega. +simpl in *. lia. Qed. Program Fixpoint mergeAll {a0} (cmp: a0 -> a0 -> comparison) @@ -138,10 +138,10 @@ Next Obligation. simpl. destruct xs. simpl. auto. destruct xs. simpl. auto. -apply lt_n_S. +apply Nat.succ_lt_mono. pose (MP := mergePairs_length (length xs) a0 cmp xs l l0 ltac:(auto)). clearbody MP. simpl in *. -omega. +lia. Defined. Definition sortBy {a} (cmp : a -> a -> comparison) (xs : list a): list a := @@ -170,7 +170,7 @@ Proof. + intros p s' H. simpl in *. destruct (p a) eqn:Hp. pose (K := IHs p s' H). clearbody K. - omega. + lia. inversion H. subst. auto. Qed. @@ -209,7 +209,7 @@ Next Obligation. inversion Heq_anonymous. subst. symmetry in B. pose (h2 := break_length B). - omega. + lia. Defined. Program Fixpoint lines (s : GHC.Base.String) { measure (length s) } @@ -222,7 +222,7 @@ Program Fixpoint lines (s : GHC.Base.String) { measure (length s) } pair l (match s' with | nil => nil | cons _ s'' => lines s'' end)). Next Obligation. pose (h0 := break_length Heq_anonymous). clearbody h0. simpl in h0. - omega. + lia. Defined. (* Converted value declarations: *) diff --git a/base/Data/Ord.v b/base/Data/Ord.v index 77f8674c5..974d1afac 100644 --- a/base/Data/Ord.v +++ b/base/Data/Ord.v @@ -27,23 +27,97 @@ Arguments Mk_Down {_} _. let 'Mk_Down getDown := arg_0__ in getDown. -(* Midamble *) +(* Converted value declarations: *) + +Instance Unpeel_Down a : HsToCoq.Unpeel.Unpeel (Down a) a := + HsToCoq.Unpeel.Build_Unpeel _ _ (fun '(Mk_Down x) => x) Mk_Down. #[local] Definition Eq___Down_op_zeze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} : Down inst_a -> Down inst_a -> bool := - GHC.Prim.coerce _GHC.Base.==_. + GHC.Prim.coerce (_GHC.Base.==_). #[local] Definition Eq___Down_op_zsze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} : Down inst_a -> Down inst_a -> bool := - GHC.Prim.coerce _GHC.Base./=_. + GHC.Prim.coerce (_GHC.Base./=_). -#[global] Program Instance Eq___Down {a : Type} `{GHC.Base.Eq_ a} +#[global] +Program Instance Eq___Down {a : Type} `{GHC.Base.Eq_ a} : GHC.Base.Eq_ (Down a) := fun _ k__ => k__ {| GHC.Base.op_zeze____ := Eq___Down_op_zeze__ ; GHC.Base.op_zsze____ := Eq___Down_op_zsze__ |}. -(* Converted value declarations: *) +(* Skipping all instances of class `GHC.Num.Num', including + `Data.Ord.Num__Down' *) + +#[local] Definition Semigroup__Down_op_zlzlzgzg__ {inst_a : Type} + `{GHC.Base.Semigroup inst_a} + : Down inst_a -> Down inst_a -> Down inst_a := + GHC.Prim.coerce (_GHC.Base.<<>>_). + +#[global] +Program Instance Semigroup__Down {a : Type} `{GHC.Base.Semigroup a} + : GHC.Base.Semigroup (Down a) := + fun _ k__ => + k__ {| GHC.Base.op_zlzlzgzg____ := Semigroup__Down_op_zlzlzgzg__ |}. + +#[local] Definition Monoid__Down_mappend {inst_a : Type} `{GHC.Base.Monoid + inst_a} + : Down inst_a -> Down inst_a -> Down inst_a := + GHC.Prim.coerce (GHC.Base.mappend). + +#[local] Definition Monoid__Down_mconcat {inst_a : Type} `{GHC.Base.Monoid + inst_a} + : list (Down inst_a) -> Down inst_a := + GHC.Prim.coerce (GHC.Base.mconcat). + +#[local] Definition Monoid__Down_mempty {inst_a : Type} `{GHC.Base.Monoid + inst_a} + : Down inst_a := + GHC.Prim.coerce (GHC.Base.mempty). + +#[global] +Program Instance Monoid__Down {a : Type} `{GHC.Base.Monoid a} + : GHC.Base.Monoid (Down a) := + fun _ k__ => + k__ {| GHC.Base.mappend__ := Monoid__Down_mappend ; + GHC.Base.mconcat__ := Monoid__Down_mconcat ; + GHC.Base.mempty__ := Monoid__Down_mempty |}. + +(* Skipping all instances of class `Data.Bits.Bits', including + `Data.Ord.Bits__Down' *) + +(* Skipping all instances of class `GHC.Enum.Bounded', including + `Data.Ord.Bounded__Down' *) + +(* Skipping all instances of class `GHC.Enum.Enum', including + `Data.Ord.Enum__Down' *) + +(* Skipping all instances of class `Data.Bits.FiniteBits', including + `Data.Ord.FiniteBits__Down' *) + +(* Skipping all instances of class `GHC.Float.Floating', including + `Data.Ord.Floating__Down' *) + +(* Skipping all instances of class `GHC.Real.Fractional', including + `Data.Ord.Fractional__Down' *) + +(* Skipping all instances of class `GHC.Real.Integral', including + `Data.Ord.Integral__Down' *) + +(* Skipping all instances of class `GHC.Ix.Ix', including `Data.Ord.Ix__Down' *) + +(* Skipping all instances of class `GHC.Real.Real', including + `Data.Ord.Real__Down' *) + +(* Skipping all instances of class `GHC.Real.RealFrac', including + `Data.Ord.RealFrac__Down' *) + +(* Skipping all instances of class `GHC.Float.RealFloat', including + `Data.Ord.RealFloat__Down' *) + +(* Skipping all instances of class `Foreign.Storable.Storable', including + `Data.Ord.Storable__Down' *) (* Skipping all instances of class `GHC.Read.Read', including `Data.Ord.Read__Down' *) @@ -163,17 +237,18 @@ Program Instance Monad__Down : GHC.Base.Monad Down := : (b -> a) -> b -> b -> comparison := fun p x y => GHC.Base.compare (p x) (p y). -Instance Unpeel_Down a : HsToCoq.Unpeel.Unpeel (Down a) a := - HsToCoq.Unpeel.Build_Unpeel _ _ (fun '(Mk_Down x) => x) Mk_Down. - (* External variables: - Gt Lt Type bool comparison GHC.Base.Applicative GHC.Base.Functor GHC.Base.Monad - GHC.Base.Ord GHC.Base.compare GHC.Base.compare__ GHC.Base.const GHC.Base.fmap - GHC.Base.fmap__ GHC.Base.id GHC.Base.liftA2__ GHC.Base.max__ GHC.Base.min__ - GHC.Base.op_z2218U__ GHC.Base.op_zeze__ GHC.Base.op_zg____ GHC.Base.op_zgze____ - GHC.Base.op_zgzg____ GHC.Base.op_zgzgze____ GHC.Base.op_zl____ - GHC.Base.op_zlzd__ GHC.Base.op_zlzd____ GHC.Base.op_zlze____ - GHC.Base.op_zlztzg____ GHC.Base.op_zsze__ GHC.Base.op_ztzg____ GHC.Base.pure - GHC.Base.pure__ GHC.Base.return___ GHC.Prim.coerce HsToCoq.Unpeel.Build_Unpeel + Gt Lt Type bool comparison list GHC.Base.Applicative GHC.Base.Eq_ + GHC.Base.Functor GHC.Base.Monad GHC.Base.Monoid GHC.Base.Ord GHC.Base.Semigroup + GHC.Base.compare GHC.Base.compare__ GHC.Base.const GHC.Base.fmap GHC.Base.fmap__ + GHC.Base.id GHC.Base.liftA2__ GHC.Base.mappend GHC.Base.mappend__ GHC.Base.max__ + GHC.Base.mconcat GHC.Base.mconcat__ GHC.Base.mempty GHC.Base.mempty__ + GHC.Base.min__ GHC.Base.op_z2218U__ GHC.Base.op_zeze__ GHC.Base.op_zeze____ + GHC.Base.op_zg____ GHC.Base.op_zgze____ GHC.Base.op_zgzg____ + GHC.Base.op_zgzgze____ GHC.Base.op_zl____ GHC.Base.op_zlzd__ + GHC.Base.op_zlzd____ GHC.Base.op_zlze____ GHC.Base.op_zlzlzgzg__ + GHC.Base.op_zlzlzgzg____ GHC.Base.op_zlztzg____ GHC.Base.op_zsze__ + GHC.Base.op_zsze____ GHC.Base.op_ztzg____ GHC.Base.pure GHC.Base.pure__ + GHC.Base.return___ GHC.Prim.coerce HsToCoq.Unpeel.Build_Unpeel HsToCoq.Unpeel.Unpeel *) diff --git a/base/Data/Proxy.v b/base/Data/Proxy.v index ffecbd86e..4f77ae287 100644 --- a/base/Data/Proxy.v +++ b/base/Data/Proxy.v @@ -31,6 +31,12 @@ Arguments Mk_KProxy {_}. (* Converted value declarations: *) +(* Skipping all instances of class `GHC.Enum.Bounded', including + `Data.Proxy.Bounded__Proxy' *) + +(* Skipping all instances of class `GHC.Read.Read', including + `Data.Proxy.Read__Proxy' *) + #[local] Definition Eq___Proxy_op_zeze__ {inst_k : Type} {inst_s : inst_k} : Proxy inst_s -> Proxy inst_s -> bool := fun arg_0__ arg_1__ => true. diff --git a/base/Data/Semigroup.v b/base/Data/Semigroup.v index 33c1a2c01..2e7e3dfff 100644 --- a/base/Data/Semigroup.v +++ b/base/Data/Semigroup.v @@ -149,6 +149,479 @@ Program Instance Semigroup__SLast {a} : GHC.Base.Semigroup (Last a) := fun _ k = (* Converted value declarations: *) +Instance Unpeel_Option a : HsToCoq.Unpeel.Unpeel (Option a) (option a) := + HsToCoq.Unpeel.Build_Unpeel _ _ getOption Mk_Option. + +#[local] Definition Eq___Option_op_zeze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} + : Option inst_a -> Option inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.==_). + +#[local] Definition Eq___Option_op_zsze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} + : Option inst_a -> Option inst_a -> bool := + GHC.Prim.coerce (_GHC.Base./=_). + +#[global] +Program Instance Eq___Option {a : Type} `{GHC.Base.Eq_ a} + : GHC.Base.Eq_ (Option a) := + fun _ k__ => + k__ {| GHC.Base.op_zeze____ := Eq___Option_op_zeze__ ; + GHC.Base.op_zsze____ := Eq___Option_op_zsze__ |}. + +#[local] Definition Ord__Option_op_zl__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : Option inst_a -> Option inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.<_). + +#[local] Definition Ord__Option_op_zlze__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : Option inst_a -> Option inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.<=_). + +#[local] Definition Ord__Option_op_zg__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : Option inst_a -> Option inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.>_). + +#[local] Definition Ord__Option_op_zgze__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : Option inst_a -> Option inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.>=_). + +#[local] Definition Ord__Option_compare {inst_a : Type} `{GHC.Base.Ord inst_a} + : Option inst_a -> Option inst_a -> comparison := + GHC.Prim.coerce (GHC.Base.compare). + +#[local] Definition Ord__Option_max {inst_a : Type} `{GHC.Base.Ord inst_a} + : Option inst_a -> Option inst_a -> Option inst_a := + GHC.Prim.coerce (GHC.Base.max). + +#[local] Definition Ord__Option_min {inst_a : Type} `{GHC.Base.Ord inst_a} + : Option inst_a -> Option inst_a -> Option inst_a := + GHC.Prim.coerce (GHC.Base.min). + +#[global] +Program Instance Ord__Option {a : Type} `{GHC.Base.Ord a} + : GHC.Base.Ord (Option a) := + fun _ k__ => + k__ {| GHC.Base.op_zl____ := Ord__Option_op_zl__ ; + GHC.Base.op_zlze____ := Ord__Option_op_zlze__ ; + GHC.Base.op_zg____ := Ord__Option_op_zg__ ; + GHC.Base.op_zgze____ := Ord__Option_op_zgze__ ; + GHC.Base.compare__ := Ord__Option_compare ; + GHC.Base.max__ := Ord__Option_max ; + GHC.Base.min__ := Ord__Option_min |}. + +(* Skipping all instances of class `GHC.Show.Show', including + `Data.Semigroup.Show__Option' *) + +(* Skipping all instances of class `GHC.Read.Read', including + `Data.Semigroup.Read__Option' *) + +(* Skipping all instances of class `Data.Data.Data', including + `Data.Semigroup.Data__Option' *) + +(* Skipping all instances of class `GHC.Generics.Generic', including + `Data.Semigroup.Generic__Option' *) + +(* Skipping all instances of class `GHC.Generics.Generic1', including + `Data.Semigroup.Generic1__TYPE__Option__LiftedRep' *) + +(* Skipping all instances of class `GHC.Enum.Bounded', including + `Data.Semigroup.Bounded__WrappedMonoid' *) + +Instance Unpeel_WrappedMonoid a : HsToCoq.Unpeel.Unpeel (WrappedMonoid a) a := + HsToCoq.Unpeel.Build_Unpeel _ _ unwrapMonoid WrapMonoid. + +#[local] Definition Eq___WrappedMonoid_op_zeze__ {inst_m : Type} `{GHC.Base.Eq_ + inst_m} + : WrappedMonoid inst_m -> WrappedMonoid inst_m -> bool := + GHC.Prim.coerce (_GHC.Base.==_). + +#[local] Definition Eq___WrappedMonoid_op_zsze__ {inst_m : Type} `{GHC.Base.Eq_ + inst_m} + : WrappedMonoid inst_m -> WrappedMonoid inst_m -> bool := + GHC.Prim.coerce (_GHC.Base./=_). + +#[global] +Program Instance Eq___WrappedMonoid {m : Type} `{GHC.Base.Eq_ m} + : GHC.Base.Eq_ (WrappedMonoid m) := + fun _ k__ => + k__ {| GHC.Base.op_zeze____ := Eq___WrappedMonoid_op_zeze__ ; + GHC.Base.op_zsze____ := Eq___WrappedMonoid_op_zsze__ |}. + +#[local] Definition Ord__WrappedMonoid_op_zl__ {inst_m : Type} `{GHC.Base.Ord + inst_m} + : WrappedMonoid inst_m -> WrappedMonoid inst_m -> bool := + GHC.Prim.coerce (_GHC.Base.<_). + +#[local] Definition Ord__WrappedMonoid_op_zlze__ {inst_m : Type} `{GHC.Base.Ord + inst_m} + : WrappedMonoid inst_m -> WrappedMonoid inst_m -> bool := + GHC.Prim.coerce (_GHC.Base.<=_). + +#[local] Definition Ord__WrappedMonoid_op_zg__ {inst_m : Type} `{GHC.Base.Ord + inst_m} + : WrappedMonoid inst_m -> WrappedMonoid inst_m -> bool := + GHC.Prim.coerce (_GHC.Base.>_). + +#[local] Definition Ord__WrappedMonoid_op_zgze__ {inst_m : Type} `{GHC.Base.Ord + inst_m} + : WrappedMonoid inst_m -> WrappedMonoid inst_m -> bool := + GHC.Prim.coerce (_GHC.Base.>=_). + +#[local] Definition Ord__WrappedMonoid_compare {inst_m : Type} `{GHC.Base.Ord + inst_m} + : WrappedMonoid inst_m -> WrappedMonoid inst_m -> comparison := + GHC.Prim.coerce (GHC.Base.compare). + +#[local] Definition Ord__WrappedMonoid_max {inst_m : Type} `{GHC.Base.Ord + inst_m} + : WrappedMonoid inst_m -> WrappedMonoid inst_m -> WrappedMonoid inst_m := + GHC.Prim.coerce (GHC.Base.max). + +#[local] Definition Ord__WrappedMonoid_min {inst_m : Type} `{GHC.Base.Ord + inst_m} + : WrappedMonoid inst_m -> WrappedMonoid inst_m -> WrappedMonoid inst_m := + GHC.Prim.coerce (GHC.Base.min). + +#[global] +Program Instance Ord__WrappedMonoid {m : Type} `{GHC.Base.Ord m} + : GHC.Base.Ord (WrappedMonoid m) := + fun _ k__ => + k__ {| GHC.Base.op_zl____ := Ord__WrappedMonoid_op_zl__ ; + GHC.Base.op_zlze____ := Ord__WrappedMonoid_op_zlze__ ; + GHC.Base.op_zg____ := Ord__WrappedMonoid_op_zg__ ; + GHC.Base.op_zgze____ := Ord__WrappedMonoid_op_zgze__ ; + GHC.Base.compare__ := Ord__WrappedMonoid_compare ; + GHC.Base.max__ := Ord__WrappedMonoid_max ; + GHC.Base.min__ := Ord__WrappedMonoid_min |}. + +(* Skipping all instances of class `GHC.Show.Show', including + `Data.Semigroup.Show__WrappedMonoid' *) + +(* Skipping all instances of class `GHC.Read.Read', including + `Data.Semigroup.Read__WrappedMonoid' *) + +(* Skipping all instances of class `Data.Data.Data', including + `Data.Semigroup.Data__WrappedMonoid' *) + +(* Skipping all instances of class `GHC.Generics.Generic', including + `Data.Semigroup.Generic__WrappedMonoid' *) + +(* Skipping all instances of class `GHC.Generics.Generic1', including + `Data.Semigroup.Generic1__TYPE__WrappedMonoid__LiftedRep' *) + +(* Skipping all instances of class `GHC.Enum.Bounded', including + `Data.Semigroup.Bounded__Last' *) + +Instance Unpeel_Last a : HsToCoq.Unpeel.Unpeel (Last a) a := + HsToCoq.Unpeel.Build_Unpeel _ _ getLast Mk_Last. + +#[local] Definition Eq___Last_op_zeze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} + : Last inst_a -> Last inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.==_). + +#[local] Definition Eq___Last_op_zsze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} + : Last inst_a -> Last inst_a -> bool := + GHC.Prim.coerce (_GHC.Base./=_). + +#[global] +Program Instance Eq___Last {a : Type} `{GHC.Base.Eq_ a} + : GHC.Base.Eq_ (Last a) := + fun _ k__ => + k__ {| GHC.Base.op_zeze____ := Eq___Last_op_zeze__ ; + GHC.Base.op_zsze____ := Eq___Last_op_zsze__ |}. + +#[local] Definition Ord__Last_op_zl__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : Last inst_a -> Last inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.<_). + +#[local] Definition Ord__Last_op_zlze__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : Last inst_a -> Last inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.<=_). + +#[local] Definition Ord__Last_op_zg__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : Last inst_a -> Last inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.>_). + +#[local] Definition Ord__Last_op_zgze__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : Last inst_a -> Last inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.>=_). + +#[local] Definition Ord__Last_compare {inst_a : Type} `{GHC.Base.Ord inst_a} + : Last inst_a -> Last inst_a -> comparison := + GHC.Prim.coerce (GHC.Base.compare). + +#[local] Definition Ord__Last_max {inst_a : Type} `{GHC.Base.Ord inst_a} + : Last inst_a -> Last inst_a -> Last inst_a := + GHC.Prim.coerce (GHC.Base.max). + +#[local] Definition Ord__Last_min {inst_a : Type} `{GHC.Base.Ord inst_a} + : Last inst_a -> Last inst_a -> Last inst_a := + GHC.Prim.coerce (GHC.Base.min). + +#[global] +Program Instance Ord__Last {a : Type} `{GHC.Base.Ord a} + : GHC.Base.Ord (Last a) := + fun _ k__ => + k__ {| GHC.Base.op_zl____ := Ord__Last_op_zl__ ; + GHC.Base.op_zlze____ := Ord__Last_op_zlze__ ; + GHC.Base.op_zg____ := Ord__Last_op_zg__ ; + GHC.Base.op_zgze____ := Ord__Last_op_zgze__ ; + GHC.Base.compare__ := Ord__Last_compare ; + GHC.Base.max__ := Ord__Last_max ; + GHC.Base.min__ := Ord__Last_min |}. + +(* Skipping all instances of class `GHC.Show.Show', including + `Data.Semigroup.Show__Last' *) + +(* Skipping all instances of class `GHC.Read.Read', including + `Data.Semigroup.Read__Last' *) + +(* Skipping all instances of class `Data.Data.Data', including + `Data.Semigroup.Data__Last' *) + +(* Skipping all instances of class `GHC.Generics.Generic', including + `Data.Semigroup.Generic__Last' *) + +(* Skipping all instances of class `GHC.Generics.Generic1', including + `Data.Semigroup.Generic1__TYPE__Last__LiftedRep' *) + +(* Skipping all instances of class `GHC.Enum.Bounded', including + `Data.Semigroup.Bounded__First' *) + +Instance Unpeel_First a : HsToCoq.Unpeel.Unpeel (First a) a := + HsToCoq.Unpeel.Build_Unpeel _ _ getFirst Mk_First. + +#[local] Definition Eq___First_op_zeze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} + : First inst_a -> First inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.==_). + +#[local] Definition Eq___First_op_zsze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} + : First inst_a -> First inst_a -> bool := + GHC.Prim.coerce (_GHC.Base./=_). + +#[global] +Program Instance Eq___First {a : Type} `{GHC.Base.Eq_ a} + : GHC.Base.Eq_ (First a) := + fun _ k__ => + k__ {| GHC.Base.op_zeze____ := Eq___First_op_zeze__ ; + GHC.Base.op_zsze____ := Eq___First_op_zsze__ |}. + +#[local] Definition Ord__First_op_zl__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : First inst_a -> First inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.<_). + +#[local] Definition Ord__First_op_zlze__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : First inst_a -> First inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.<=_). + +#[local] Definition Ord__First_op_zg__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : First inst_a -> First inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.>_). + +#[local] Definition Ord__First_op_zgze__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : First inst_a -> First inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.>=_). + +#[local] Definition Ord__First_compare {inst_a : Type} `{GHC.Base.Ord inst_a} + : First inst_a -> First inst_a -> comparison := + GHC.Prim.coerce (GHC.Base.compare). + +#[local] Definition Ord__First_max {inst_a : Type} `{GHC.Base.Ord inst_a} + : First inst_a -> First inst_a -> First inst_a := + GHC.Prim.coerce (GHC.Base.max). + +#[local] Definition Ord__First_min {inst_a : Type} `{GHC.Base.Ord inst_a} + : First inst_a -> First inst_a -> First inst_a := + GHC.Prim.coerce (GHC.Base.min). + +#[global] +Program Instance Ord__First {a : Type} `{GHC.Base.Ord a} + : GHC.Base.Ord (First a) := + fun _ k__ => + k__ {| GHC.Base.op_zl____ := Ord__First_op_zl__ ; + GHC.Base.op_zlze____ := Ord__First_op_zlze__ ; + GHC.Base.op_zg____ := Ord__First_op_zg__ ; + GHC.Base.op_zgze____ := Ord__First_op_zgze__ ; + GHC.Base.compare__ := Ord__First_compare ; + GHC.Base.max__ := Ord__First_max ; + GHC.Base.min__ := Ord__First_min |}. + +(* Skipping all instances of class `GHC.Show.Show', including + `Data.Semigroup.Show__First' *) + +(* Skipping all instances of class `GHC.Read.Read', including + `Data.Semigroup.Read__First' *) + +(* Skipping all instances of class `Data.Data.Data', including + `Data.Semigroup.Data__First' *) + +(* Skipping all instances of class `GHC.Generics.Generic', including + `Data.Semigroup.Generic__First' *) + +(* Skipping all instances of class `GHC.Generics.Generic1', including + `Data.Semigroup.Generic1__TYPE__First__LiftedRep' *) + +(* Skipping all instances of class `GHC.Show.Show', including + `Data.Semigroup.Show__Arg' *) + +(* Skipping all instances of class `GHC.Read.Read', including + `Data.Semigroup.Read__Arg' *) + +(* Skipping all instances of class `Data.Data.Data', including + `Data.Semigroup.Data__Arg' *) + +(* Skipping all instances of class `GHC.Generics.Generic', including + `Data.Semigroup.Generic__Arg' *) + +(* Skipping all instances of class `GHC.Generics.Generic1', including + `Data.Semigroup.Generic1__TYPE__Arg__LiftedRep' *) + +(* Skipping all instances of class `GHC.Enum.Bounded', including + `Data.Semigroup.Bounded__Max' *) + +Instance Unpeel_Max a : HsToCoq.Unpeel.Unpeel (Max a) a := + HsToCoq.Unpeel.Build_Unpeel _ _ getMax Mk_Max. + +#[local] Definition Eq___Max_op_zeze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} + : Max inst_a -> Max inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.==_). + +#[local] Definition Eq___Max_op_zsze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} + : Max inst_a -> Max inst_a -> bool := + GHC.Prim.coerce (_GHC.Base./=_). + +#[global] +Program Instance Eq___Max {a : Type} `{GHC.Base.Eq_ a} : GHC.Base.Eq_ (Max a) := + fun _ k__ => + k__ {| GHC.Base.op_zeze____ := Eq___Max_op_zeze__ ; + GHC.Base.op_zsze____ := Eq___Max_op_zsze__ |}. + +#[local] Definition Ord__Max_op_zl__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : Max inst_a -> Max inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.<_). + +#[local] Definition Ord__Max_op_zlze__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : Max inst_a -> Max inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.<=_). + +#[local] Definition Ord__Max_op_zg__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : Max inst_a -> Max inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.>_). + +#[local] Definition Ord__Max_op_zgze__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : Max inst_a -> Max inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.>=_). + +#[local] Definition Ord__Max_compare {inst_a : Type} `{GHC.Base.Ord inst_a} + : Max inst_a -> Max inst_a -> comparison := + GHC.Prim.coerce (GHC.Base.compare). + +#[local] Definition Ord__Max_max {inst_a : Type} `{GHC.Base.Ord inst_a} + : Max inst_a -> Max inst_a -> Max inst_a := + GHC.Prim.coerce (GHC.Base.max). + +#[local] Definition Ord__Max_min {inst_a : Type} `{GHC.Base.Ord inst_a} + : Max inst_a -> Max inst_a -> Max inst_a := + GHC.Prim.coerce (GHC.Base.min). + +#[global] +Program Instance Ord__Max {a : Type} `{GHC.Base.Ord a} : GHC.Base.Ord (Max a) := + fun _ k__ => + k__ {| GHC.Base.op_zl____ := Ord__Max_op_zl__ ; + GHC.Base.op_zlze____ := Ord__Max_op_zlze__ ; + GHC.Base.op_zg____ := Ord__Max_op_zg__ ; + GHC.Base.op_zgze____ := Ord__Max_op_zgze__ ; + GHC.Base.compare__ := Ord__Max_compare ; + GHC.Base.max__ := Ord__Max_max ; + GHC.Base.min__ := Ord__Max_min |}. + +(* Skipping all instances of class `GHC.Show.Show', including + `Data.Semigroup.Show__Max' *) + +(* Skipping all instances of class `GHC.Read.Read', including + `Data.Semigroup.Read__Max' *) + +(* Skipping all instances of class `Data.Data.Data', including + `Data.Semigroup.Data__Max' *) + +(* Skipping all instances of class `GHC.Generics.Generic', including + `Data.Semigroup.Generic__Max' *) + +(* Skipping all instances of class `GHC.Generics.Generic1', including + `Data.Semigroup.Generic1__TYPE__Max__LiftedRep' *) + +(* Skipping all instances of class `GHC.Enum.Bounded', including + `Data.Semigroup.Bounded__Min' *) + +Instance Unpeel_Min a : HsToCoq.Unpeel.Unpeel (Min a) a := + HsToCoq.Unpeel.Build_Unpeel _ _ getMin Mk_Min. + +#[local] Definition Eq___Min_op_zeze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} + : Min inst_a -> Min inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.==_). + +#[local] Definition Eq___Min_op_zsze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} + : Min inst_a -> Min inst_a -> bool := + GHC.Prim.coerce (_GHC.Base./=_). + +#[global] +Program Instance Eq___Min {a : Type} `{GHC.Base.Eq_ a} : GHC.Base.Eq_ (Min a) := + fun _ k__ => + k__ {| GHC.Base.op_zeze____ := Eq___Min_op_zeze__ ; + GHC.Base.op_zsze____ := Eq___Min_op_zsze__ |}. + +#[local] Definition Ord__Min_op_zl__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : Min inst_a -> Min inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.<_). + +#[local] Definition Ord__Min_op_zlze__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : Min inst_a -> Min inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.<=_). + +#[local] Definition Ord__Min_op_zg__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : Min inst_a -> Min inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.>_). + +#[local] Definition Ord__Min_op_zgze__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : Min inst_a -> Min inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.>=_). + +#[local] Definition Ord__Min_compare {inst_a : Type} `{GHC.Base.Ord inst_a} + : Min inst_a -> Min inst_a -> comparison := + GHC.Prim.coerce (GHC.Base.compare). + +#[local] Definition Ord__Min_max {inst_a : Type} `{GHC.Base.Ord inst_a} + : Min inst_a -> Min inst_a -> Min inst_a := + GHC.Prim.coerce (GHC.Base.max). + +#[local] Definition Ord__Min_min {inst_a : Type} `{GHC.Base.Ord inst_a} + : Min inst_a -> Min inst_a -> Min inst_a := + GHC.Prim.coerce (GHC.Base.min). + +#[global] +Program Instance Ord__Min {a : Type} `{GHC.Base.Ord a} : GHC.Base.Ord (Min a) := + fun _ k__ => + k__ {| GHC.Base.op_zl____ := Ord__Min_op_zl__ ; + GHC.Base.op_zlze____ := Ord__Min_op_zlze__ ; + GHC.Base.op_zg____ := Ord__Min_op_zg__ ; + GHC.Base.op_zgze____ := Ord__Min_op_zgze__ ; + GHC.Base.compare__ := Ord__Min_compare ; + GHC.Base.max__ := Ord__Min_max ; + GHC.Base.min__ := Ord__Min_min |}. + +(* Skipping all instances of class `GHC.Show.Show', including + `Data.Semigroup.Show__Min' *) + +(* Skipping all instances of class `GHC.Read.Read', including + `Data.Semigroup.Read__Min' *) + +(* Skipping all instances of class `Data.Data.Data', including + `Data.Semigroup.Data__Min' *) + +(* Skipping all instances of class `GHC.Generics.Generic', including + `Data.Semigroup.Generic__Min' *) + +(* Skipping all instances of class `GHC.Generics.Generic1', including + `Data.Semigroup.Generic1__TYPE__Min__LiftedRep' *) + (* Skipping all instances of class `GHC.Enum.Enum', including `Data.Semigroup.Enum__Min' *) @@ -1729,36 +2202,18 @@ Program Instance Monoid__Option {a : Type} `{GHC.Base.Semigroup a} | n, j, Mk_Option m => Data.Maybe.maybe n j m end. -Instance Unpeel_Min a : HsToCoq.Unpeel.Unpeel (Min a) a := - HsToCoq.Unpeel.Build_Unpeel _ _ getMin Mk_Min. - -Instance Unpeel_Max a : HsToCoq.Unpeel.Unpeel (Max a) a := - HsToCoq.Unpeel.Build_Unpeel _ _ getMax Mk_Max. - -Instance Unpeel_First a : HsToCoq.Unpeel.Unpeel (First a) a := - HsToCoq.Unpeel.Build_Unpeel _ _ getFirst Mk_First. - -Instance Unpeel_Last a : HsToCoq.Unpeel.Unpeel (Last a) a := - HsToCoq.Unpeel.Build_Unpeel _ _ getLast Mk_Last. - -Instance Unpeel_WrappedMonoid a : HsToCoq.Unpeel.Unpeel (WrappedMonoid a) a := - HsToCoq.Unpeel.Build_Unpeel _ _ unwrapMonoid WrapMonoid. - -Instance Unpeel_Option a : HsToCoq.Unpeel.Unpeel (Option a) (option a) := - HsToCoq.Unpeel.Build_Unpeel _ _ getOption Mk_Option. - (* External variables: - None Some Type bool false list negb option true Coq.Program.Basics.compose - Data.Bifoldable.Bifoldable Data.Bifoldable.bifoldMap__ Data.Bifoldable.bifold__ - Data.Bifoldable.bifoldl__ Data.Bifoldable.bifoldr__ Data.Bifunctor.Bifunctor - Data.Bifunctor.bimap__ Data.Bifunctor.first__ Data.Bifunctor.second__ - Data.Bitraversable.Bitraversable Data.Bitraversable.bitraverse__ - Data.Foldable.Foldable Data.Foldable.foldMap'__ Data.Foldable.foldMap__ - Data.Foldable.fold__ Data.Foldable.foldl'__ Data.Foldable.foldl__ - Data.Foldable.foldr'__ Data.Foldable.foldr__ Data.Foldable.length__ - Data.Foldable.null__ Data.Foldable.product__ Data.Foldable.sum__ - Data.Foldable.toList__ Data.Functor.op_zlzdzg__ Data.Maybe.maybe - Data.SemigroupInternal.Endo Data.SemigroupInternal.Mk_Dual + None Some Type bool comparison false list negb option true + Coq.Program.Basics.compose Data.Bifoldable.Bifoldable + Data.Bifoldable.bifoldMap__ Data.Bifoldable.bifold__ Data.Bifoldable.bifoldl__ + Data.Bifoldable.bifoldr__ Data.Bifunctor.Bifunctor Data.Bifunctor.bimap__ + Data.Bifunctor.first__ Data.Bifunctor.second__ Data.Bitraversable.Bitraversable + Data.Bitraversable.bitraverse__ Data.Foldable.Foldable Data.Foldable.foldMap'__ + Data.Foldable.foldMap__ Data.Foldable.fold__ Data.Foldable.foldl'__ + Data.Foldable.foldl__ Data.Foldable.foldr'__ Data.Foldable.foldr__ + Data.Foldable.length__ Data.Foldable.null__ Data.Foldable.product__ + Data.Foldable.sum__ Data.Foldable.toList__ Data.Functor.op_zlzdzg__ + Data.Maybe.maybe Data.SemigroupInternal.Endo Data.SemigroupInternal.Mk_Dual Data.SemigroupInternal.Mk_Endo Data.SemigroupInternal.Mk_Product Data.SemigroupInternal.Mk_Sum Data.SemigroupInternal.appEndo Data.SemigroupInternal.getDual Data.SemigroupInternal.getProduct @@ -1766,14 +2221,17 @@ Instance Unpeel_Option a : HsToCoq.Unpeel.Unpeel (Option a) (option a) := Data.Traversable.mapM__ Data.Traversable.sequenceA__ Data.Traversable.sequence__ Data.Traversable.traverse__ GHC.Base.Applicative GHC.Base.Eq_ GHC.Base.Functor GHC.Base.Monad GHC.Base.Monoid GHC.Base.Ord GHC.Base.Semigroup GHC.Base.build' - GHC.Base.const GHC.Base.flip GHC.Base.fmap GHC.Base.fmap__ GHC.Base.foldr - GHC.Base.id GHC.Base.liftA2 GHC.Base.liftA2__ GHC.Base.mappend - GHC.Base.mappend__ GHC.Base.max GHC.Base.mconcat__ GHC.Base.mempty - GHC.Base.mempty__ GHC.Base.min GHC.Base.op_z2218U__ GHC.Base.op_zeze__ - GHC.Base.op_zeze____ GHC.Base.op_zgzg____ GHC.Base.op_zgzgze____ - GHC.Base.op_zlzd____ GHC.Base.op_zlzlzgzg__ GHC.Base.op_zlzlzgzg____ - GHC.Base.op_zlztzg__ GHC.Base.op_zlztzg____ GHC.Base.op_zsze____ - GHC.Base.op_ztzg__ GHC.Base.op_ztzg____ GHC.Base.pure GHC.Base.pure__ - GHC.Base.return___ GHC.Num.Int GHC.Num.Num GHC.Num.fromInteger GHC.Num.op_zp__ - GHC.Prim.coerce HsToCoq.Unpeel.Build_Unpeel HsToCoq.Unpeel.Unpeel + GHC.Base.compare GHC.Base.compare__ GHC.Base.const GHC.Base.flip GHC.Base.fmap + GHC.Base.fmap__ GHC.Base.foldr GHC.Base.id GHC.Base.liftA2 GHC.Base.liftA2__ + GHC.Base.mappend GHC.Base.mappend__ GHC.Base.max GHC.Base.max__ + GHC.Base.mconcat__ GHC.Base.mempty GHC.Base.mempty__ GHC.Base.min GHC.Base.min__ + GHC.Base.op_z2218U__ GHC.Base.op_zeze__ GHC.Base.op_zeze____ GHC.Base.op_zg__ + GHC.Base.op_zg____ GHC.Base.op_zgze__ GHC.Base.op_zgze____ GHC.Base.op_zgzg____ + GHC.Base.op_zgzgze____ GHC.Base.op_zl__ GHC.Base.op_zl____ GHC.Base.op_zlzd____ + GHC.Base.op_zlze__ GHC.Base.op_zlze____ GHC.Base.op_zlzlzgzg__ + GHC.Base.op_zlzlzgzg____ GHC.Base.op_zlztzg__ GHC.Base.op_zlztzg____ + GHC.Base.op_zsze__ GHC.Base.op_zsze____ GHC.Base.op_ztzg__ GHC.Base.op_ztzg____ + GHC.Base.pure GHC.Base.pure__ GHC.Base.return___ GHC.Num.Int GHC.Num.Num + GHC.Num.fromInteger GHC.Num.op_zp__ GHC.Prim.coerce HsToCoq.Unpeel.Build_Unpeel + HsToCoq.Unpeel.Unpeel *) diff --git a/base/Data/SemigroupInternal.v b/base/Data/SemigroupInternal.v index 1cde8c30b..0f226acec 100644 --- a/base/Data/SemigroupInternal.v +++ b/base/Data/SemigroupInternal.v @@ -98,6 +98,525 @@ Instance Unpeel_Alt (k : Type) (f : k -> Type) (a : k) : HsToCoq.Unpeel.Unpeel ( (* Converted value declarations: *) +(* Skipping all instances of class `GHC.Generics.Generic', including + `Data.SemigroupInternal.Generic__Alt' *) + +(* Skipping all instances of class `GHC.Generics.Generic1', including + `Data.SemigroupInternal.Generic1__Alt__5' *) + +(* Skipping all instances of class `GHC.Read.Read', including + `Data.SemigroupInternal.Read__Alt' *) + +(* Skipping all instances of class `GHC.Show.Show', including + `Data.SemigroupInternal.Show__Alt' *) + +#[local] Definition Eq___Alt_op_zeze__ {inst_k : Type} {inst_f : inst_k -> Type} + {inst_a : inst_k} `{GHC.Base.Eq_ (inst_f inst_a)} + : Alt inst_f inst_a -> Alt inst_f inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.==_). + +#[local] Definition Eq___Alt_op_zsze__ {inst_k : Type} {inst_f : inst_k -> Type} + {inst_a : inst_k} `{GHC.Base.Eq_ (inst_f inst_a)} + : Alt inst_f inst_a -> Alt inst_f inst_a -> bool := + GHC.Prim.coerce (_GHC.Base./=_). + +#[global] +Program Instance Eq___Alt {k : Type} {f : k -> Type} {a : k} `{GHC.Base.Eq_ (f + a)} + : GHC.Base.Eq_ (Alt f a) := + fun _ k__ => + k__ {| GHC.Base.op_zeze____ := Eq___Alt_op_zeze__ ; + GHC.Base.op_zsze____ := Eq___Alt_op_zsze__ |}. + +#[local] Definition Ord__Alt_op_zl__ {inst_k : Type} {inst_f : inst_k -> Type} + {inst_a : inst_k} `{GHC.Base.Ord (inst_f inst_a)} + : Alt inst_f inst_a -> Alt inst_f inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.<_). + +#[local] Definition Ord__Alt_op_zlze__ {inst_k : Type} {inst_f : inst_k -> Type} + {inst_a : inst_k} `{GHC.Base.Ord (inst_f inst_a)} + : Alt inst_f inst_a -> Alt inst_f inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.<=_). + +#[local] Definition Ord__Alt_op_zg__ {inst_k : Type} {inst_f : inst_k -> Type} + {inst_a : inst_k} `{GHC.Base.Ord (inst_f inst_a)} + : Alt inst_f inst_a -> Alt inst_f inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.>_). + +#[local] Definition Ord__Alt_op_zgze__ {inst_k : Type} {inst_f : inst_k -> Type} + {inst_a : inst_k} `{GHC.Base.Ord (inst_f inst_a)} + : Alt inst_f inst_a -> Alt inst_f inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.>=_). + +#[local] Definition Ord__Alt_compare {inst_k : Type} {inst_f : inst_k -> Type} + {inst_a : inst_k} `{GHC.Base.Ord (inst_f inst_a)} + : Alt inst_f inst_a -> Alt inst_f inst_a -> comparison := + GHC.Prim.coerce (GHC.Base.compare). + +#[local] Definition Ord__Alt_max {inst_k : Type} {inst_f : inst_k -> Type} + {inst_a : inst_k} `{GHC.Base.Ord (inst_f inst_a)} + : Alt inst_f inst_a -> Alt inst_f inst_a -> Alt inst_f inst_a := + GHC.Prim.coerce (GHC.Base.max). + +#[local] Definition Ord__Alt_min {inst_k : Type} {inst_f : inst_k -> Type} + {inst_a : inst_k} `{GHC.Base.Ord (inst_f inst_a)} + : Alt inst_f inst_a -> Alt inst_f inst_a -> Alt inst_f inst_a := + GHC.Prim.coerce (GHC.Base.min). + +#[global] +Program Instance Ord__Alt {k : Type} {f : k -> Type} {a : k} `{GHC.Base.Ord (f + a)} + : GHC.Base.Ord (Alt f a) := + fun _ k__ => + k__ {| GHC.Base.op_zl____ := Ord__Alt_op_zl__ ; + GHC.Base.op_zlze____ := Ord__Alt_op_zlze__ ; + GHC.Base.op_zg____ := Ord__Alt_op_zg__ ; + GHC.Base.op_zgze____ := Ord__Alt_op_zgze__ ; + GHC.Base.compare__ := Ord__Alt_compare ; + GHC.Base.max__ := Ord__Alt_max ; + GHC.Base.min__ := Ord__Alt_min |}. + +(* Skipping all instances of class `GHC.Num.Num', including + `Data.SemigroupInternal.Num__Alt' *) + +(* Skipping all instances of class `GHC.Enum.Enum', including + `Data.SemigroupInternal.Enum__Alt' *) + +#[local] Definition Monad__Alt_op_zgzg__ {inst_f : Type -> Type} + `{GHC.Base.Monad inst_f} + : forall {a : Type}, + forall {b : Type}, Alt inst_f a -> Alt inst_f b -> Alt inst_f b := + fun {a : Type} {b : Type} => GHC.Prim.coerce (_GHC.Base.>>_). + +#[local] Definition Monad__Alt_op_zgzgze__ {inst_f : Type -> Type} + `{GHC.Base.Monad inst_f} + : forall {a : Type}, + forall {b : Type}, Alt inst_f a -> (a -> Alt inst_f b) -> Alt inst_f b := + fun {a : Type} {b : Type} => GHC.Prim.coerce (_GHC.Base.>>=_). + +#[local] Definition Monad__Alt_return_ {inst_f : Type -> Type} `{GHC.Base.Monad + inst_f} + : forall {a : Type}, a -> Alt inst_f a := + fun {a : Type} => GHC.Prim.coerce (GHC.Base.return_). + +#[local] Definition Applicative__Alt_liftA2 {inst_f : Type -> Type} + `{GHC.Base.Applicative inst_f} + : forall {a : Type}, + forall {b : Type}, + forall {c : Type}, + (a -> b -> c) -> Alt inst_f a -> Alt inst_f b -> Alt inst_f c := + fun {a : Type} {b : Type} {c : Type} => GHC.Prim.coerce (GHC.Base.liftA2). + +#[local] Definition Applicative__Alt_op_zlztzg__ {inst_f : Type -> Type} + `{GHC.Base.Applicative inst_f} + : forall {a : Type}, + forall {b : Type}, Alt inst_f (a -> b) -> Alt inst_f a -> Alt inst_f b := + fun {a : Type} {b : Type} => GHC.Prim.coerce (_GHC.Base.<*>_). + +#[local] Definition Applicative__Alt_op_ztzg__ {inst_f : Type -> Type} + `{GHC.Base.Applicative inst_f} + : forall {a : Type}, + forall {b : Type}, Alt inst_f a -> Alt inst_f b -> Alt inst_f b := + fun {a : Type} {b : Type} => GHC.Prim.coerce (_GHC.Base.*>_). + +#[local] Definition Applicative__Alt_pure {inst_f : Type -> Type} + `{GHC.Base.Applicative inst_f} + : forall {a : Type}, a -> Alt inst_f a := + fun {a : Type} => GHC.Prim.coerce (GHC.Base.pure). + +#[local] Definition Functor__Alt_fmap {inst_f : Type -> Type} `{GHC.Base.Functor + inst_f} + : forall {a : Type}, + forall {b : Type}, (a -> b) -> Alt inst_f a -> Alt inst_f b := + fun {a : Type} {b : Type} => GHC.Prim.coerce (GHC.Base.fmap). + +#[local] Definition Functor__Alt_op_zlzd__ {inst_f : Type -> Type} + `{GHC.Base.Functor inst_f} + : forall {a : Type}, forall {b : Type}, a -> Alt inst_f b -> Alt inst_f a := + fun {a : Type} {b : Type} => GHC.Prim.coerce (_GHC.Base.<$_). + +#[global] +Program Instance Functor__Alt {f : Type -> Type} `{GHC.Base.Functor f} + : GHC.Base.Functor (Alt f) := + fun _ k__ => + k__ {| GHC.Base.fmap__ := fun {a : Type} {b : Type} => Functor__Alt_fmap ; + GHC.Base.op_zlzd____ := fun {a : Type} {b : Type} => Functor__Alt_op_zlzd__ |}. + +#[global] +Program Instance Applicative__Alt {f : Type -> Type} `{GHC.Base.Applicative f} + : GHC.Base.Applicative (Alt f) := + fun _ k__ => + k__ {| GHC.Base.liftA2__ := fun {a : Type} {b : Type} {c : Type} => + Applicative__Alt_liftA2 ; + GHC.Base.op_zlztzg____ := fun {a : Type} {b : Type} => + Applicative__Alt_op_zlztzg__ ; + GHC.Base.op_ztzg____ := fun {a : Type} {b : Type} => + Applicative__Alt_op_ztzg__ ; + GHC.Base.pure__ := fun {a : Type} => Applicative__Alt_pure |}. + +#[global] +Program Instance Monad__Alt {f : Type -> Type} `{GHC.Base.Monad f} + : GHC.Base.Monad (Alt f) := + fun _ k__ => + k__ {| GHC.Base.op_zgzg____ := fun {a : Type} {b : Type} => + Monad__Alt_op_zgzg__ ; + GHC.Base.op_zgzgze____ := fun {a : Type} {b : Type} => Monad__Alt_op_zgzgze__ ; + GHC.Base.return___ := fun {a : Type} => Monad__Alt_return_ |}. + +(* Skipping all instances of class `GHC.Base.MonadPlus', including + `Data.SemigroupInternal.MonadPlus__Alt' *) + +(* Skipping all instances of class `GHC.Base.Alternative', including + `Data.SemigroupInternal.Alternative__Alt' *) + +Instance Unpeel_Product a : HsToCoq.Unpeel.Unpeel (Product a) a := + HsToCoq.Unpeel.Build_Unpeel _ _ getProduct Mk_Product. + +#[local] Definition Eq___Product_op_zeze__ {inst_a : Type} `{GHC.Base.Eq_ + inst_a} + : Product inst_a -> Product inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.==_). + +#[local] Definition Eq___Product_op_zsze__ {inst_a : Type} `{GHC.Base.Eq_ + inst_a} + : Product inst_a -> Product inst_a -> bool := + GHC.Prim.coerce (_GHC.Base./=_). + +#[global] +Program Instance Eq___Product {a : Type} `{GHC.Base.Eq_ a} + : GHC.Base.Eq_ (Product a) := + fun _ k__ => + k__ {| GHC.Base.op_zeze____ := Eq___Product_op_zeze__ ; + GHC.Base.op_zsze____ := Eq___Product_op_zsze__ |}. + +#[local] Definition Ord__Product_op_zl__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : Product inst_a -> Product inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.<_). + +#[local] Definition Ord__Product_op_zlze__ {inst_a : Type} `{GHC.Base.Ord + inst_a} + : Product inst_a -> Product inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.<=_). + +#[local] Definition Ord__Product_op_zg__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : Product inst_a -> Product inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.>_). + +#[local] Definition Ord__Product_op_zgze__ {inst_a : Type} `{GHC.Base.Ord + inst_a} + : Product inst_a -> Product inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.>=_). + +#[local] Definition Ord__Product_compare {inst_a : Type} `{GHC.Base.Ord inst_a} + : Product inst_a -> Product inst_a -> comparison := + GHC.Prim.coerce (GHC.Base.compare). + +#[local] Definition Ord__Product_max {inst_a : Type} `{GHC.Base.Ord inst_a} + : Product inst_a -> Product inst_a -> Product inst_a := + GHC.Prim.coerce (GHC.Base.max). + +#[local] Definition Ord__Product_min {inst_a : Type} `{GHC.Base.Ord inst_a} + : Product inst_a -> Product inst_a -> Product inst_a := + GHC.Prim.coerce (GHC.Base.min). + +#[global] +Program Instance Ord__Product {a : Type} `{GHC.Base.Ord a} + : GHC.Base.Ord (Product a) := + fun _ k__ => + k__ {| GHC.Base.op_zl____ := Ord__Product_op_zl__ ; + GHC.Base.op_zlze____ := Ord__Product_op_zlze__ ; + GHC.Base.op_zg____ := Ord__Product_op_zg__ ; + GHC.Base.op_zgze____ := Ord__Product_op_zgze__ ; + GHC.Base.compare__ := Ord__Product_compare ; + GHC.Base.max__ := Ord__Product_max ; + GHC.Base.min__ := Ord__Product_min |}. + +(* Skipping all instances of class `GHC.Read.Read', including + `Data.SemigroupInternal.Read__Product' *) + +(* Skipping all instances of class `GHC.Show.Show', including + `Data.SemigroupInternal.Show__Product' *) + +(* Skipping all instances of class `GHC.Enum.Bounded', including + `Data.SemigroupInternal.Bounded__Product' *) + +(* Skipping all instances of class `GHC.Generics.Generic', including + `Data.SemigroupInternal.Generic__Product' *) + +(* Skipping all instances of class `GHC.Generics.Generic1', including + `Data.SemigroupInternal.Generic1__TYPE__Product__LiftedRep' *) + +(* Skipping all instances of class `GHC.Num.Num', including + `Data.SemigroupInternal.Num__Product' *) + +Instance Unpeel_Sum a : HsToCoq.Unpeel.Unpeel (Sum a) a := + HsToCoq.Unpeel.Build_Unpeel _ _ getSum Mk_Sum. + +#[local] Definition Eq___Sum_op_zeze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} + : Sum inst_a -> Sum inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.==_). + +#[local] Definition Eq___Sum_op_zsze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} + : Sum inst_a -> Sum inst_a -> bool := + GHC.Prim.coerce (_GHC.Base./=_). + +#[global] +Program Instance Eq___Sum {a : Type} `{GHC.Base.Eq_ a} : GHC.Base.Eq_ (Sum a) := + fun _ k__ => + k__ {| GHC.Base.op_zeze____ := Eq___Sum_op_zeze__ ; + GHC.Base.op_zsze____ := Eq___Sum_op_zsze__ |}. + +#[local] Definition Ord__Sum_op_zl__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : Sum inst_a -> Sum inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.<_). + +#[local] Definition Ord__Sum_op_zlze__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : Sum inst_a -> Sum inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.<=_). + +#[local] Definition Ord__Sum_op_zg__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : Sum inst_a -> Sum inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.>_). + +#[local] Definition Ord__Sum_op_zgze__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : Sum inst_a -> Sum inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.>=_). + +#[local] Definition Ord__Sum_compare {inst_a : Type} `{GHC.Base.Ord inst_a} + : Sum inst_a -> Sum inst_a -> comparison := + GHC.Prim.coerce (GHC.Base.compare). + +#[local] Definition Ord__Sum_max {inst_a : Type} `{GHC.Base.Ord inst_a} + : Sum inst_a -> Sum inst_a -> Sum inst_a := + GHC.Prim.coerce (GHC.Base.max). + +#[local] Definition Ord__Sum_min {inst_a : Type} `{GHC.Base.Ord inst_a} + : Sum inst_a -> Sum inst_a -> Sum inst_a := + GHC.Prim.coerce (GHC.Base.min). + +#[global] +Program Instance Ord__Sum {a : Type} `{GHC.Base.Ord a} : GHC.Base.Ord (Sum a) := + fun _ k__ => + k__ {| GHC.Base.op_zl____ := Ord__Sum_op_zl__ ; + GHC.Base.op_zlze____ := Ord__Sum_op_zlze__ ; + GHC.Base.op_zg____ := Ord__Sum_op_zg__ ; + GHC.Base.op_zgze____ := Ord__Sum_op_zgze__ ; + GHC.Base.compare__ := Ord__Sum_compare ; + GHC.Base.max__ := Ord__Sum_max ; + GHC.Base.min__ := Ord__Sum_min |}. + +(* Skipping all instances of class `GHC.Read.Read', including + `Data.SemigroupInternal.Read__Sum' *) + +(* Skipping all instances of class `GHC.Show.Show', including + `Data.SemigroupInternal.Show__Sum' *) + +(* Skipping all instances of class `GHC.Enum.Bounded', including + `Data.SemigroupInternal.Bounded__Sum' *) + +(* Skipping all instances of class `GHC.Generics.Generic', including + `Data.SemigroupInternal.Generic__Sum' *) + +(* Skipping all instances of class `GHC.Generics.Generic1', including + `Data.SemigroupInternal.Generic1__TYPE__Sum__LiftedRep' *) + +(* Skipping all instances of class `GHC.Num.Num', including + `Data.SemigroupInternal.Num__Sum' *) + +Instance Unpeel_Any : HsToCoq.Unpeel.Unpeel Any bool := + HsToCoq.Unpeel.Build_Unpeel _ _ getAny Mk_Any. + +#[local] Definition Eq___Any_op_zeze__ : Any -> Any -> bool := + GHC.Prim.coerce (_GHC.Base.==_). + +#[local] Definition Eq___Any_op_zsze__ : Any -> Any -> bool := + GHC.Prim.coerce (_GHC.Base./=_). + +#[global] +Program Instance Eq___Any : GHC.Base.Eq_ Any := + fun _ k__ => + k__ {| GHC.Base.op_zeze____ := Eq___Any_op_zeze__ ; + GHC.Base.op_zsze____ := Eq___Any_op_zsze__ |}. + +#[local] Definition Ord__Any_op_zl__ : Any -> Any -> bool := + GHC.Prim.coerce (_GHC.Base.<_). + +#[local] Definition Ord__Any_op_zlze__ : Any -> Any -> bool := + GHC.Prim.coerce (_GHC.Base.<=_). + +#[local] Definition Ord__Any_op_zg__ : Any -> Any -> bool := + GHC.Prim.coerce (_GHC.Base.>_). + +#[local] Definition Ord__Any_op_zgze__ : Any -> Any -> bool := + GHC.Prim.coerce (_GHC.Base.>=_). + +#[local] Definition Ord__Any_compare : Any -> Any -> comparison := + GHC.Prim.coerce (GHC.Base.compare). + +#[local] Definition Ord__Any_max : Any -> Any -> Any := + GHC.Prim.coerce (GHC.Base.max). + +#[local] Definition Ord__Any_min : Any -> Any -> Any := + GHC.Prim.coerce (GHC.Base.min). + +#[global] +Program Instance Ord__Any : GHC.Base.Ord Any := + fun _ k__ => + k__ {| GHC.Base.op_zl____ := Ord__Any_op_zl__ ; + GHC.Base.op_zlze____ := Ord__Any_op_zlze__ ; + GHC.Base.op_zg____ := Ord__Any_op_zg__ ; + GHC.Base.op_zgze____ := Ord__Any_op_zgze__ ; + GHC.Base.compare__ := Ord__Any_compare ; + GHC.Base.max__ := Ord__Any_max ; + GHC.Base.min__ := Ord__Any_min |}. + +(* Skipping all instances of class `GHC.Read.Read', including + `Data.SemigroupInternal.Read__Any' *) + +(* Skipping all instances of class `GHC.Show.Show', including + `Data.SemigroupInternal.Show__Any' *) + +(* Skipping all instances of class `GHC.Enum.Bounded', including + `Data.SemigroupInternal.Bounded__Any' *) + +(* Skipping all instances of class `GHC.Generics.Generic', including + `Data.SemigroupInternal.Generic__Any' *) + +Instance Unpeel_All : HsToCoq.Unpeel.Unpeel All bool := + HsToCoq.Unpeel.Build_Unpeel _ _ getAll Mk_All. + +#[local] Definition Eq___All_op_zeze__ : All -> All -> bool := + GHC.Prim.coerce (_GHC.Base.==_). + +#[local] Definition Eq___All_op_zsze__ : All -> All -> bool := + GHC.Prim.coerce (_GHC.Base./=_). + +#[global] +Program Instance Eq___All : GHC.Base.Eq_ All := + fun _ k__ => + k__ {| GHC.Base.op_zeze____ := Eq___All_op_zeze__ ; + GHC.Base.op_zsze____ := Eq___All_op_zsze__ |}. + +#[local] Definition Ord__All_op_zl__ : All -> All -> bool := + GHC.Prim.coerce (_GHC.Base.<_). + +#[local] Definition Ord__All_op_zlze__ : All -> All -> bool := + GHC.Prim.coerce (_GHC.Base.<=_). + +#[local] Definition Ord__All_op_zg__ : All -> All -> bool := + GHC.Prim.coerce (_GHC.Base.>_). + +#[local] Definition Ord__All_op_zgze__ : All -> All -> bool := + GHC.Prim.coerce (_GHC.Base.>=_). + +#[local] Definition Ord__All_compare : All -> All -> comparison := + GHC.Prim.coerce (GHC.Base.compare). + +#[local] Definition Ord__All_max : All -> All -> All := + GHC.Prim.coerce (GHC.Base.max). + +#[local] Definition Ord__All_min : All -> All -> All := + GHC.Prim.coerce (GHC.Base.min). + +#[global] +Program Instance Ord__All : GHC.Base.Ord All := + fun _ k__ => + k__ {| GHC.Base.op_zl____ := Ord__All_op_zl__ ; + GHC.Base.op_zlze____ := Ord__All_op_zlze__ ; + GHC.Base.op_zg____ := Ord__All_op_zg__ ; + GHC.Base.op_zgze____ := Ord__All_op_zgze__ ; + GHC.Base.compare__ := Ord__All_compare ; + GHC.Base.max__ := Ord__All_max ; + GHC.Base.min__ := Ord__All_min |}. + +(* Skipping all instances of class `GHC.Read.Read', including + `Data.SemigroupInternal.Read__All' *) + +(* Skipping all instances of class `GHC.Show.Show', including + `Data.SemigroupInternal.Show__All' *) + +(* Skipping all instances of class `GHC.Enum.Bounded', including + `Data.SemigroupInternal.Bounded__All' *) + +(* Skipping all instances of class `GHC.Generics.Generic', including + `Data.SemigroupInternal.Generic__All' *) + +(* Skipping all instances of class `GHC.Generics.Generic', including + `Data.SemigroupInternal.Generic__Endo' *) + +Instance Unpeel_Dual a : HsToCoq.Unpeel.Unpeel (Dual a) a := + HsToCoq.Unpeel.Build_Unpeel _ _ getDual Mk_Dual. + +#[local] Definition Eq___Dual_op_zeze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} + : Dual inst_a -> Dual inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.==_). + +#[local] Definition Eq___Dual_op_zsze__ {inst_a : Type} `{GHC.Base.Eq_ inst_a} + : Dual inst_a -> Dual inst_a -> bool := + GHC.Prim.coerce (_GHC.Base./=_). + +#[global] +Program Instance Eq___Dual {a : Type} `{GHC.Base.Eq_ a} + : GHC.Base.Eq_ (Dual a) := + fun _ k__ => + k__ {| GHC.Base.op_zeze____ := Eq___Dual_op_zeze__ ; + GHC.Base.op_zsze____ := Eq___Dual_op_zsze__ |}. + +#[local] Definition Ord__Dual_op_zl__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : Dual inst_a -> Dual inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.<_). + +#[local] Definition Ord__Dual_op_zlze__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : Dual inst_a -> Dual inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.<=_). + +#[local] Definition Ord__Dual_op_zg__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : Dual inst_a -> Dual inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.>_). + +#[local] Definition Ord__Dual_op_zgze__ {inst_a : Type} `{GHC.Base.Ord inst_a} + : Dual inst_a -> Dual inst_a -> bool := + GHC.Prim.coerce (_GHC.Base.>=_). + +#[local] Definition Ord__Dual_compare {inst_a : Type} `{GHC.Base.Ord inst_a} + : Dual inst_a -> Dual inst_a -> comparison := + GHC.Prim.coerce (GHC.Base.compare). + +#[local] Definition Ord__Dual_max {inst_a : Type} `{GHC.Base.Ord inst_a} + : Dual inst_a -> Dual inst_a -> Dual inst_a := + GHC.Prim.coerce (GHC.Base.max). + +#[local] Definition Ord__Dual_min {inst_a : Type} `{GHC.Base.Ord inst_a} + : Dual inst_a -> Dual inst_a -> Dual inst_a := + GHC.Prim.coerce (GHC.Base.min). + +#[global] +Program Instance Ord__Dual {a : Type} `{GHC.Base.Ord a} + : GHC.Base.Ord (Dual a) := + fun _ k__ => + k__ {| GHC.Base.op_zl____ := Ord__Dual_op_zl__ ; + GHC.Base.op_zlze____ := Ord__Dual_op_zlze__ ; + GHC.Base.op_zg____ := Ord__Dual_op_zg__ ; + GHC.Base.op_zgze____ := Ord__Dual_op_zgze__ ; + GHC.Base.compare__ := Ord__Dual_compare ; + GHC.Base.max__ := Ord__Dual_max ; + GHC.Base.min__ := Ord__Dual_min |}. + +(* Skipping all instances of class `GHC.Read.Read', including + `Data.SemigroupInternal.Read__Dual' *) + +(* Skipping all instances of class `GHC.Show.Show', including + `Data.SemigroupInternal.Show__Dual' *) + +(* Skipping all instances of class `GHC.Enum.Bounded', including + `Data.SemigroupInternal.Bounded__Dual' *) + +(* Skipping all instances of class `GHC.Generics.Generic', including + `Data.SemigroupInternal.Generic__Dual' *) + +(* Skipping all instances of class `GHC.Generics.Generic1', including + `Data.SemigroupInternal.Generic1__TYPE__Dual__LiftedRep' *) + #[local] Definition Semigroup__Dual_op_zlzlzgzg__ {inst_a : Type} `{GHC.Base.Semigroup inst_a} : Dual inst_a -> Dual inst_a -> Dual inst_a := @@ -501,30 +1020,21 @@ Program Instance Monad__Product : GHC.Base.Monad Product := (* Skipping definition `Data.SemigroupInternal.stimesList' *) -Instance Unpeel_Sum a : HsToCoq.Unpeel.Unpeel (Sum a) a := - HsToCoq.Unpeel.Build_Unpeel _ _ getSum Mk_Sum. - -Instance Unpeel_Product a : HsToCoq.Unpeel.Unpeel (Product a) a := - HsToCoq.Unpeel.Build_Unpeel _ _ getProduct Mk_Product. - -Instance Unpeel_All : HsToCoq.Unpeel.Unpeel All bool := - HsToCoq.Unpeel.Build_Unpeel _ _ getAll Mk_All. - -Instance Unpeel_Any : HsToCoq.Unpeel.Unpeel Any bool := - HsToCoq.Unpeel.Build_Unpeel _ _ getAny Mk_Any. - -Instance Unpeel_Dual a : HsToCoq.Unpeel.Unpeel (Dual a) a := - HsToCoq.Unpeel.Build_Unpeel _ _ getDual Mk_Dual. - (* External variables: - Eq Gt Lt Type andb bool false list orb true GHC.Base.Applicative - GHC.Base.Functor GHC.Base.Monad GHC.Base.Monoid GHC.Base.Semigroup - GHC.Base.compare GHC.Base.const GHC.Base.fmap GHC.Base.fmap__ GHC.Base.foldr - GHC.Base.id GHC.Base.liftA2__ GHC.Base.mappend__ GHC.Base.mconcat__ - GHC.Base.mempty GHC.Base.mempty__ GHC.Base.op_z2218U__ GHC.Base.op_zgzg____ - GHC.Base.op_zgzgze____ GHC.Base.op_zlzd__ GHC.Base.op_zlzd____ - GHC.Base.op_zlzlzgzg__ GHC.Base.op_zlzlzgzg____ GHC.Base.op_zlztzg____ - GHC.Base.op_ztzg____ GHC.Base.pure GHC.Base.pure__ GHC.Base.return___ + Eq Gt Lt Type andb bool comparison false list orb true GHC.Base.Applicative + GHC.Base.Eq_ GHC.Base.Functor GHC.Base.Monad GHC.Base.Monoid GHC.Base.Ord + GHC.Base.Semigroup GHC.Base.compare GHC.Base.compare__ GHC.Base.const + GHC.Base.fmap GHC.Base.fmap__ GHC.Base.foldr GHC.Base.id GHC.Base.liftA2 + GHC.Base.liftA2__ GHC.Base.mappend__ GHC.Base.max GHC.Base.max__ + GHC.Base.mconcat__ GHC.Base.mempty GHC.Base.mempty__ GHC.Base.min GHC.Base.min__ + GHC.Base.op_z2218U__ GHC.Base.op_zeze__ GHC.Base.op_zeze____ GHC.Base.op_zg__ + GHC.Base.op_zg____ GHC.Base.op_zgze__ GHC.Base.op_zgze____ GHC.Base.op_zgzg__ + GHC.Base.op_zgzg____ GHC.Base.op_zgzgze__ GHC.Base.op_zgzgze____ + GHC.Base.op_zl__ GHC.Base.op_zl____ GHC.Base.op_zlzd__ GHC.Base.op_zlzd____ + GHC.Base.op_zlze__ GHC.Base.op_zlze____ GHC.Base.op_zlzlzgzg__ + GHC.Base.op_zlzlzgzg____ GHC.Base.op_zlztzg__ GHC.Base.op_zlztzg____ + GHC.Base.op_zsze__ GHC.Base.op_zsze____ GHC.Base.op_ztzg__ GHC.Base.op_ztzg____ + GHC.Base.pure GHC.Base.pure__ GHC.Base.return_ GHC.Base.return___ GHC.Err.errorWithoutStackTrace GHC.Num.Num GHC.Num.fromInteger GHC.Num.op_zp__ GHC.Num.op_zt__ GHC.Prim.coerce GHC.Real.Integral HsToCoq.Err.Build_Default HsToCoq.Err.Default HsToCoq.Err.default HsToCoq.Unpeel.Build_Unpeel diff --git a/base/Data/Traversable.v b/base/Data/Traversable.v index ed32dd32a..d38919909 100644 --- a/base/Data/Traversable.v +++ b/base/Data/Traversable.v @@ -16,7 +16,7 @@ Require Data.Either. Require Data.Foldable. Require Data.Functor. Require Data.Functor.Const. -Require Data.Functor.Identity. +Require Import Data.Functor.Identity. Require Data.Functor.Utils. Require Data.Monoid. Require Data.Ord. @@ -126,335 +126,23 @@ Program Instance Traversable__Down : Traversable Data.Ord.Down := `{GHC.Base.Applicative f} => Traversable__Down_traverse |}. -#[local] Definition Traversable__UWord_traverse - : forall {f : Type -> Type}, - forall {a : Type}, - forall {b : Type}, - forall `{GHC.Base.Applicative f}, - (a -> f b) -> GHC.Generics.UWord a -> f (GHC.Generics.UWord b) := - fun {f : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Applicative f} => - fun arg_0__ arg_1__ => - match arg_0__, arg_1__ with - | f, GHC.Generics.UWord a1 => GHC.Base.pure (GHC.Generics.UWord a1) - end. - -#[local] Definition Traversable__UWord_mapM - : forall {m : Type -> Type}, - forall {a : Type}, - forall {b : Type}, - forall `{GHC.Base.Monad m}, - (a -> m b) -> GHC.Generics.UWord a -> m (GHC.Generics.UWord b) := - fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => - Traversable__UWord_traverse. - -#[local] Definition Traversable__UWord_sequenceA - : forall {f : Type -> Type}, - forall {a : Type}, - forall `{GHC.Base.Applicative f}, - GHC.Generics.UWord (f a) -> f (GHC.Generics.UWord a) := - fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => - Traversable__UWord_traverse GHC.Base.id. - -#[local] Definition Traversable__UWord_sequence - : forall {m : Type -> Type}, - forall {a : Type}, - forall `{GHC.Base.Monad m}, - GHC.Generics.UWord (m a) -> m (GHC.Generics.UWord a) := - fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => - Traversable__UWord_sequenceA. - -#[global] -Program Instance Traversable__UWord : Traversable GHC.Generics.UWord := - fun _ k__ => - k__ {| mapM__ := fun {m : Type -> Type} - {a : Type} - {b : Type} - `{GHC.Base.Monad m} => - Traversable__UWord_mapM ; - sequence__ := fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => - Traversable__UWord_sequence ; - sequenceA__ := fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => - Traversable__UWord_sequenceA ; - traverse__ := fun {f : Type -> Type} - {a : Type} - {b : Type} - `{GHC.Base.Applicative f} => - Traversable__UWord_traverse |}. - -#[local] Definition Traversable__UInt_traverse - : forall {f : Type -> Type}, - forall {a : Type}, - forall {b : Type}, - forall `{GHC.Base.Applicative f}, - (a -> f b) -> GHC.Generics.UInt a -> f (GHC.Generics.UInt b) := - fun {f : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Applicative f} => - fun arg_0__ arg_1__ => - match arg_0__, arg_1__ with - | f, GHC.Generics.UInt a1 => GHC.Base.pure (GHC.Generics.UInt a1) - end. - -#[local] Definition Traversable__UInt_mapM - : forall {m : Type -> Type}, - forall {a : Type}, - forall {b : Type}, - forall `{GHC.Base.Monad m}, - (a -> m b) -> GHC.Generics.UInt a -> m (GHC.Generics.UInt b) := - fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => - Traversable__UInt_traverse. - -#[local] Definition Traversable__UInt_sequenceA - : forall {f : Type -> Type}, - forall {a : Type}, - forall `{GHC.Base.Applicative f}, - GHC.Generics.UInt (f a) -> f (GHC.Generics.UInt a) := - fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => - Traversable__UInt_traverse GHC.Base.id. - -#[local] Definition Traversable__UInt_sequence - : forall {m : Type -> Type}, - forall {a : Type}, - forall `{GHC.Base.Monad m}, - GHC.Generics.UInt (m a) -> m (GHC.Generics.UInt a) := - fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => - Traversable__UInt_sequenceA. - -#[global] -Program Instance Traversable__UInt : Traversable GHC.Generics.UInt := - fun _ k__ => - k__ {| mapM__ := fun {m : Type -> Type} - {a : Type} - {b : Type} - `{GHC.Base.Monad m} => - Traversable__UInt_mapM ; - sequence__ := fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => - Traversable__UInt_sequence ; - sequenceA__ := fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => - Traversable__UInt_sequenceA ; - traverse__ := fun {f : Type -> Type} - {a : Type} - {b : Type} - `{GHC.Base.Applicative f} => - Traversable__UInt_traverse |}. - -#[local] Definition Traversable__UFloat_traverse - : forall {f : Type -> Type}, - forall {a : Type}, - forall {b : Type}, - forall `{GHC.Base.Applicative f}, - (a -> f b) -> GHC.Generics.UFloat a -> f (GHC.Generics.UFloat b) := - fun {f : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Applicative f} => - fun arg_0__ arg_1__ => - match arg_0__, arg_1__ with - | f, GHC.Generics.UFloat a1 => GHC.Base.pure (GHC.Generics.UFloat a1) - end. - -#[local] Definition Traversable__UFloat_mapM - : forall {m : Type -> Type}, - forall {a : Type}, - forall {b : Type}, - forall `{GHC.Base.Monad m}, - (a -> m b) -> GHC.Generics.UFloat a -> m (GHC.Generics.UFloat b) := - fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => - Traversable__UFloat_traverse. - -#[local] Definition Traversable__UFloat_sequenceA - : forall {f : Type -> Type}, - forall {a : Type}, - forall `{GHC.Base.Applicative f}, - GHC.Generics.UFloat (f a) -> f (GHC.Generics.UFloat a) := - fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => - Traversable__UFloat_traverse GHC.Base.id. - -#[local] Definition Traversable__UFloat_sequence - : forall {m : Type -> Type}, - forall {a : Type}, - forall `{GHC.Base.Monad m}, - GHC.Generics.UFloat (m a) -> m (GHC.Generics.UFloat a) := - fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => - Traversable__UFloat_sequenceA. - -#[global] -Program Instance Traversable__UFloat : Traversable GHC.Generics.UFloat := - fun _ k__ => - k__ {| mapM__ := fun {m : Type -> Type} - {a : Type} - {b : Type} - `{GHC.Base.Monad m} => - Traversable__UFloat_mapM ; - sequence__ := fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => - Traversable__UFloat_sequence ; - sequenceA__ := fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => - Traversable__UFloat_sequenceA ; - traverse__ := fun {f : Type -> Type} - {a : Type} - {b : Type} - `{GHC.Base.Applicative f} => - Traversable__UFloat_traverse |}. - -#[local] Definition Traversable__UDouble_traverse - : forall {f : Type -> Type}, - forall {a : Type}, - forall {b : Type}, - forall `{GHC.Base.Applicative f}, - (a -> f b) -> GHC.Generics.UDouble a -> f (GHC.Generics.UDouble b) := - fun {f : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Applicative f} => - fun arg_0__ arg_1__ => - match arg_0__, arg_1__ with - | f, GHC.Generics.UDouble a1 => GHC.Base.pure (GHC.Generics.UDouble a1) - end. - -#[local] Definition Traversable__UDouble_mapM - : forall {m : Type -> Type}, - forall {a : Type}, - forall {b : Type}, - forall `{GHC.Base.Monad m}, - (a -> m b) -> GHC.Generics.UDouble a -> m (GHC.Generics.UDouble b) := - fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => - Traversable__UDouble_traverse. - -#[local] Definition Traversable__UDouble_sequenceA - : forall {f : Type -> Type}, - forall {a : Type}, - forall `{GHC.Base.Applicative f}, - GHC.Generics.UDouble (f a) -> f (GHC.Generics.UDouble a) := - fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => - Traversable__UDouble_traverse GHC.Base.id. - -#[local] Definition Traversable__UDouble_sequence - : forall {m : Type -> Type}, - forall {a : Type}, - forall `{GHC.Base.Monad m}, - GHC.Generics.UDouble (m a) -> m (GHC.Generics.UDouble a) := - fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => - Traversable__UDouble_sequenceA. - -#[global] -Program Instance Traversable__UDouble : Traversable GHC.Generics.UDouble := - fun _ k__ => - k__ {| mapM__ := fun {m : Type -> Type} - {a : Type} - {b : Type} - `{GHC.Base.Monad m} => - Traversable__UDouble_mapM ; - sequence__ := fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => - Traversable__UDouble_sequence ; - sequenceA__ := fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => - Traversable__UDouble_sequenceA ; - traverse__ := fun {f : Type -> Type} - {a : Type} - {b : Type} - `{GHC.Base.Applicative f} => - Traversable__UDouble_traverse |}. - -#[local] Definition Traversable__UChar_traverse - : forall {f : Type -> Type}, - forall {a : Type}, - forall {b : Type}, - forall `{GHC.Base.Applicative f}, - (a -> f b) -> GHC.Generics.UChar a -> f (GHC.Generics.UChar b) := - fun {f : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Applicative f} => - fun arg_0__ arg_1__ => - match arg_0__, arg_1__ with - | f, GHC.Generics.UChar a1 => GHC.Base.pure (GHC.Generics.UChar a1) - end. - -#[local] Definition Traversable__UChar_mapM - : forall {m : Type -> Type}, - forall {a : Type}, - forall {b : Type}, - forall `{GHC.Base.Monad m}, - (a -> m b) -> GHC.Generics.UChar a -> m (GHC.Generics.UChar b) := - fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => - Traversable__UChar_traverse. - -#[local] Definition Traversable__UChar_sequenceA - : forall {f : Type -> Type}, - forall {a : Type}, - forall `{GHC.Base.Applicative f}, - GHC.Generics.UChar (f a) -> f (GHC.Generics.UChar a) := - fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => - Traversable__UChar_traverse GHC.Base.id. - -#[local] Definition Traversable__UChar_sequence - : forall {m : Type -> Type}, - forall {a : Type}, - forall `{GHC.Base.Monad m}, - GHC.Generics.UChar (m a) -> m (GHC.Generics.UChar a) := - fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => - Traversable__UChar_sequenceA. - -#[global] -Program Instance Traversable__UChar : Traversable GHC.Generics.UChar := - fun _ k__ => - k__ {| mapM__ := fun {m : Type -> Type} - {a : Type} - {b : Type} - `{GHC.Base.Monad m} => - Traversable__UChar_mapM ; - sequence__ := fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => - Traversable__UChar_sequence ; - sequenceA__ := fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => - Traversable__UChar_sequenceA ; - traverse__ := fun {f : Type -> Type} - {a : Type} - {b : Type} - `{GHC.Base.Applicative f} => - Traversable__UChar_traverse |}. +(* Skipping instance `Data.Traversable.Traversable__UWord' of class + `Data.Traversable.Traversable' *) -#[local] Definition Traversable__UAddr_traverse - : forall {f : Type -> Type}, - forall {a : Type}, - forall {b : Type}, - forall `{GHC.Base.Applicative f}, - (a -> f b) -> GHC.Generics.UAddr a -> f (GHC.Generics.UAddr b) := - fun {f : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Applicative f} => - fun arg_0__ arg_1__ => - match arg_0__, arg_1__ with - | f, GHC.Generics.UAddr a1 => GHC.Base.pure (GHC.Generics.UAddr a1) - end. +(* Skipping instance `Data.Traversable.Traversable__UInt' of class + `Data.Traversable.Traversable' *) -#[local] Definition Traversable__UAddr_mapM - : forall {m : Type -> Type}, - forall {a : Type}, - forall {b : Type}, - forall `{GHC.Base.Monad m}, - (a -> m b) -> GHC.Generics.UAddr a -> m (GHC.Generics.UAddr b) := - fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => - Traversable__UAddr_traverse. +(* Skipping instance `Data.Traversable.Traversable__UFloat' of class + `Data.Traversable.Traversable' *) -#[local] Definition Traversable__UAddr_sequenceA - : forall {f : Type -> Type}, - forall {a : Type}, - forall `{GHC.Base.Applicative f}, - GHC.Generics.UAddr (f a) -> f (GHC.Generics.UAddr a) := - fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => - Traversable__UAddr_traverse GHC.Base.id. +(* Skipping instance `Data.Traversable.Traversable__UDouble' of class + `Data.Traversable.Traversable' *) -#[local] Definition Traversable__UAddr_sequence - : forall {m : Type -> Type}, - forall {a : Type}, - forall `{GHC.Base.Monad m}, - GHC.Generics.UAddr (m a) -> m (GHC.Generics.UAddr a) := - fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => - Traversable__UAddr_sequenceA. +(* Skipping instance `Data.Traversable.Traversable__UChar' of class + `Data.Traversable.Traversable' *) -#[global] -Program Instance Traversable__UAddr : Traversable GHC.Generics.UAddr := - fun _ k__ => - k__ {| mapM__ := fun {m : Type -> Type} - {a : Type} - {b : Type} - `{GHC.Base.Monad m} => - Traversable__UAddr_mapM ; - sequence__ := fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => - Traversable__UAddr_sequence ; - sequenceA__ := fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => - Traversable__UAddr_sequenceA ; - traverse__ := fun {f : Type -> Type} - {a : Type} - {b : Type} - `{GHC.Base.Applicative f} => - Traversable__UAddr_traverse |}. +(* Skipping instance `Data.Traversable.Traversable__UAddr' of class + `Data.Traversable.Traversable' *) (* Skipping instance `Data.Traversable.Traversable__op_ZCziZC__' of class `Data.Traversable.Traversable' *) @@ -484,45 +172,37 @@ Program Instance Traversable__UAddr : Traversable GHC.Generics.UAddr := : forall {f : Type -> Type}, forall {a : Type}, forall {b : Type}, - forall `{GHC.Base.Applicative f}, - (a -> f b) -> - Data.Functor.Identity.Identity a -> f (Data.Functor.Identity.Identity b) := + forall `{GHC.Base.Applicative f}, (a -> f b) -> Identity a -> f (Identity b) := fun {f : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Applicative f} => fun arg_0__ arg_1__ => match arg_0__, arg_1__ with - | f, Data.Functor.Identity.Mk_Identity a1 => - GHC.Base.fmap (fun b1 => Data.Functor.Identity.Mk_Identity b1) (f a1) + | f, Mk_Identity a1 => GHC.Base.fmap (fun b1 => Mk_Identity b1) (f a1) end. #[local] Definition Traversable__Identity_mapM : forall {m : Type -> Type}, forall {a : Type}, forall {b : Type}, - forall `{GHC.Base.Monad m}, - (a -> m b) -> - Data.Functor.Identity.Identity a -> m (Data.Functor.Identity.Identity b) := + forall `{GHC.Base.Monad m}, (a -> m b) -> Identity a -> m (Identity b) := fun {m : Type -> Type} {a : Type} {b : Type} `{GHC.Base.Monad m} => Traversable__Identity_traverse. #[local] Definition Traversable__Identity_sequenceA : forall {f : Type -> Type}, forall {a : Type}, - forall `{GHC.Base.Applicative f}, - Data.Functor.Identity.Identity (f a) -> f (Data.Functor.Identity.Identity a) := + forall `{GHC.Base.Applicative f}, Identity (f a) -> f (Identity a) := fun {f : Type -> Type} {a : Type} `{GHC.Base.Applicative f} => Traversable__Identity_traverse GHC.Base.id. #[local] Definition Traversable__Identity_sequence : forall {m : Type -> Type}, forall {a : Type}, - forall `{GHC.Base.Monad m}, - Data.Functor.Identity.Identity (m a) -> m (Data.Functor.Identity.Identity a) := + forall `{GHC.Base.Monad m}, Identity (m a) -> m (Identity a) := fun {m : Type -> Type} {a : Type} `{GHC.Base.Monad m} => Traversable__Identity_sequenceA. #[global] -Program Instance Traversable__Identity - : Traversable Data.Functor.Identity.Identity := +Program Instance Traversable__Identity : Traversable Identity := fun _ k__ => k__ {| mapM__ := fun {m : Type -> Type} {a : Type} @@ -1265,16 +945,14 @@ Program Instance Traversable__Ap {f : Type -> Type} `{(Traversable f)} #[global] Definition fmapDefault {t : Type -> Type} {a : Type} {b : Type} `{Traversable t} : (a -> b) -> t a -> t b := - GHC.Prim.coerce (traverse : (a -> Data.Functor.Identity.Identity b) -> - t a -> Data.Functor.Identity.Identity (t b)). + GHC.Prim.coerce (traverse : (a -> Identity b) -> t a -> Identity (t b)). (* Skipping definition `Data.Traversable.foldMapDefault' *) (* External variables: - None Some Type cons list nil op_zt__ option pair Data.Either.Either - Data.Either.Left Data.Either.Right Data.Foldable.Foldable + Identity Mk_Identity None Some Type cons list nil op_zt__ option pair + Data.Either.Either Data.Either.Left Data.Either.Right Data.Foldable.Foldable Data.Functor.op_zlzdzg__ Data.Functor.Const.Const Data.Functor.Const.Mk_Const - Data.Functor.Identity.Identity Data.Functor.Identity.Mk_Identity Data.Functor.Utils.Mk_StateL Data.Functor.Utils.Mk_StateR Data.Functor.Utils.runStateL Data.Functor.Utils.runStateR Data.Monoid.Ap Data.Monoid.Mk_Ap Data.Ord.Down Data.Ord.Mk_Down Data.Proxy.Mk_Proxy @@ -1284,7 +962,5 @@ Program Instance Traversable__Ap {f : Type -> Type} `{(Traversable f)} Data.SemigroupInternal.Product Data.SemigroupInternal.Sum GHC.Base.Applicative GHC.Base.Functor GHC.Base.Monad GHC.Base.NEcons GHC.Base.NonEmpty GHC.Base.flip GHC.Base.fmap GHC.Base.foldr GHC.Base.id GHC.Base.liftA2 GHC.Base.op_z2218U__ - GHC.Base.pure GHC.Generics.UAddr GHC.Generics.UChar GHC.Generics.UDouble - GHC.Generics.UFloat GHC.Generics.UInt GHC.Generics.UWord GHC.Prim.coerce - GHC.Tuple.pair2 GHC.Tuple.pair_type + GHC.Base.pure GHC.Prim.coerce GHC.Tuple.pair2 GHC.Tuple.pair_type *) diff --git a/base/Data/Void.v b/base/Data/Void.v index aaf7752d6..4292d495e 100644 --- a/base/Data/Void.v +++ b/base/Data/Void.v @@ -13,6 +13,7 @@ Require Coq.Program.Wf. (* Converted imports: *) Require GHC.Base. +Import GHC.Base.Notations. (* Converted type declarations: *) @@ -20,6 +21,62 @@ Inductive Void : Type :=. (* Converted value declarations: *) +#[local] Definition Eq___Void_op_zeze__ : Void -> Void -> bool := + fun arg_0__ arg_1__ => match arg_0__, arg_1__ with | _, z => true end. + +#[local] Definition Eq___Void_op_zsze__ : Void -> Void -> bool := + fun x y => negb (Eq___Void_op_zeze__ x y). + +#[global] +Program Instance Eq___Void : GHC.Base.Eq_ Void := + fun _ k__ => + k__ {| GHC.Base.op_zeze____ := Eq___Void_op_zeze__ ; + GHC.Base.op_zsze____ := Eq___Void_op_zsze__ |}. + +(* Skipping all instances of class `Data.Data.Data', including + `Data.Void.Data__Void' *) + +(* Skipping all instances of class `GHC.Generics.Generic', including + `Data.Void.Generic__Void' *) + +#[local] Definition Ord__Void_compare : Void -> Void -> comparison := + fun arg_0__ arg_1__ => match arg_0__, arg_1__ with | _, z => Eq end. + +#[local] Definition Ord__Void_op_zl__ : Void -> Void -> bool := + fun x y => Ord__Void_compare x y GHC.Base.== Lt. + +#[local] Definition Ord__Void_op_zlze__ : Void -> Void -> bool := + fun x y => Ord__Void_compare x y GHC.Base./= Gt. + +#[local] Definition Ord__Void_op_zg__ : Void -> Void -> bool := + fun x y => Ord__Void_compare x y GHC.Base.== Gt. + +#[local] Definition Ord__Void_op_zgze__ : Void -> Void -> bool := + fun x y => Ord__Void_compare x y GHC.Base./= Lt. + +#[local] Definition Ord__Void_max : Void -> Void -> Void := + fun x y => if Ord__Void_op_zlze__ x y : bool then y else x. + +#[local] Definition Ord__Void_min : Void -> Void -> Void := + fun x y => if Ord__Void_op_zlze__ x y : bool then x else y. + +#[global] +Program Instance Ord__Void : GHC.Base.Ord Void := + fun _ k__ => + k__ {| GHC.Base.op_zl____ := Ord__Void_op_zl__ ; + GHC.Base.op_zlze____ := Ord__Void_op_zlze__ ; + GHC.Base.op_zg____ := Ord__Void_op_zg__ ; + GHC.Base.op_zgze____ := Ord__Void_op_zgze__ ; + GHC.Base.compare__ := Ord__Void_compare ; + GHC.Base.max__ := Ord__Void_max ; + GHC.Base.min__ := Ord__Void_min |}. + +(* Skipping all instances of class `GHC.Read.Read', including + `Data.Void.Read__Void' *) + +(* Skipping all instances of class `GHC.Show.Show', including + `Data.Void.Show__Void' *) + (* Skipping all instances of class `GHC.Ix.Ix', including `Data.Void.Ix__Void' *) @@ -42,5 +99,9 @@ Program Instance Semigroup__Void : GHC.Base.Semigroup Void := GHC.Base.fmap absurd. (* External variables: - Type GHC.Base.Functor GHC.Base.Semigroup GHC.Base.fmap GHC.Base.op_zlzlzgzg____ + Eq Gt Lt Type bool comparison negb true GHC.Base.Eq_ GHC.Base.Functor + GHC.Base.Ord GHC.Base.Semigroup GHC.Base.compare__ GHC.Base.fmap GHC.Base.max__ + GHC.Base.min__ GHC.Base.op_zeze__ GHC.Base.op_zeze____ GHC.Base.op_zg____ + GHC.Base.op_zgze____ GHC.Base.op_zl____ GHC.Base.op_zlze____ + GHC.Base.op_zlzlzgzg____ GHC.Base.op_zsze__ GHC.Base.op_zsze____ *) diff --git a/base/GHC/Base.v b/base/GHC/Base.v index 1b29df1f3..c03d42410 100644 --- a/base/GHC/Base.v +++ b/base/GHC/Base.v @@ -10,6 +10,9 @@ Unset Printing Implicit Defensive. Require Coq.Program.Tactics. Require Coq.Program.Wf. +(* Preamble *) + + (* Converted imports: *) Require Coq.Init.Datatypes. @@ -577,6 +580,91 @@ End ManualNotations. (* Converted value declarations: *) +#[local] Definition Eq___option_op_zeze__ {inst_a : Type} `{Eq_ inst_a} + : option inst_a -> option inst_a -> bool := + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | None, None => true + | Some a1, Some b1 => ((a1 == b1)) + | _, _ => false + end. + +#[local] Definition Eq___option_op_zsze__ {inst_a : Type} `{Eq_ inst_a} + : option inst_a -> option inst_a -> bool := + fun x y => negb (Eq___option_op_zeze__ x y). + +#[global] +Program Instance Eq___option {a : Type} `{Eq_ a} : Eq_ (option a) := + fun _ k__ => + k__ {| op_zeze____ := Eq___option_op_zeze__ ; + op_zsze____ := Eq___option_op_zsze__ |}. + +#[local] Definition Ord__option_op_zl__ {inst_a : Type} `{Ord inst_a} + : option inst_a -> option inst_a -> bool := + fun a b => + match a with + | None => match b with | None => false | _ => true end + | Some a1 => match b with | Some b1 => (a1 < b1) | _ => false end + end. + +#[local] Definition Ord__option_op_zlze__ {inst_a : Type} `{Ord inst_a} + : option inst_a -> option inst_a -> bool := + fun a b => negb (Ord__option_op_zl__ b a). + +#[local] Definition Ord__option_op_zg__ {inst_a : Type} `{Ord inst_a} + : option inst_a -> option inst_a -> bool := + fun a b => Ord__option_op_zl__ b a. + +#[local] Definition Ord__option_op_zgze__ {inst_a : Type} `{Ord inst_a} + : option inst_a -> option inst_a -> bool := + fun a b => negb (Ord__option_op_zl__ a b). + +#[local] Definition Ord__option_compare {inst_a : Type} `{Ord inst_a} + : option inst_a -> option inst_a -> comparison := + fun a b => + match a with + | None => match b with | None => Eq | _ => Lt end + | Some a1 => match b with | Some b1 => (compare a1 b1) | _ => Gt end + end. + +#[local] Definition Ord__option_max {inst_a : Type} `{Ord inst_a} + : option inst_a -> option inst_a -> option inst_a := + fun x y => if Ord__option_op_zlze__ x y : bool then y else x. + +#[local] Definition Ord__option_min {inst_a : Type} `{Ord inst_a} + : option inst_a -> option inst_a -> option inst_a := + fun x y => if Ord__option_op_zlze__ x y : bool then x else y. + +#[global] +Program Instance Ord__option {a : Type} `{Ord a} : Ord (option a) := + fun _ k__ => + k__ {| op_zl____ := Ord__option_op_zl__ ; + op_zlze____ := Ord__option_op_zlze__ ; + op_zg____ := Ord__option_op_zg__ ; + op_zgze____ := Ord__option_op_zgze__ ; + compare__ := Ord__option_compare ; + max__ := Ord__option_max ; + min__ := Ord__option_min |}. + +#[local] Definition Eq___NonEmpty_op_zeze__ {inst_a : Type} `{Eq_ inst_a} + : NonEmpty inst_a -> NonEmpty inst_a -> bool := + fun arg_0__ arg_1__ => + match arg_0__, arg_1__ with + | NEcons a1 a2, NEcons b1 b2 => (andb ((a1 == b1)) ((a2 == b2))) + end. + +#[local] Definition Eq___NonEmpty_op_zsze__ {inst_a : Type} `{Eq_ inst_a} + : NonEmpty inst_a -> NonEmpty inst_a -> bool := + fun x y => negb (Eq___NonEmpty_op_zeze__ x y). + +#[global] +Program Instance Eq___NonEmpty {a : Type} `{Eq_ a} : Eq_ (NonEmpty a) := + fun _ k__ => + k__ {| op_zeze____ := Eq___NonEmpty_op_zeze__ ; + op_zsze____ := Eq___NonEmpty_op_zsze__ |}. + +(* Skipping instance `GHC.Base.Ord__NonEmpty' of class `GHC.Base.Ord' *) + #[local] Definition Semigroup__list_op_zlzlzgzg__ {inst_a : Type} : list inst_a -> list inst_a -> list inst_a := Coq.Init.Datatypes.app. @@ -1610,22 +1698,12 @@ Fixpoint eqString (arg_0__ arg_1__ : String) : bool : (a -> b -> c) -> b -> a -> c := fun f x y => f y x. -#[global] Definition op_zd__ {r : GHC.Types.RuntimeRep} {a : Type} {b : Type} - : (a -> b) -> a -> b := +#[global] Definition op_zd__ {a} {b} : (a -> b) -> a -> b := fun f x => f x. -Notation "'_$_'" := (op_zd__). - -Infix "$" := (_$_) (at level 99). - -#[global] Definition op_zdzn__ {r : GHC.Types.RuntimeRep} {a : Type} {b : Type} - : (a -> b) -> a -> b := +#[global] Definition op_zdzn__ {a : Type} {b : Type} : (a -> b) -> a -> b := fun f x => let vx := x in f vx. -Notation "'_$!_'" := (op_zdzn__). - -Infix "$!" := (_$!_) (at level 99). - (* Skipping definition `GHC.Base.until' *) #[global] Definition asTypeOf {a : Type} : a -> a -> a := @@ -1687,15 +1765,12 @@ Notation "'_GHC.Base.<**>_'" := (op_zlztztzg__). Infix "GHC.Base.<**>" := (_<**>_) (at level 99). Notation "'_GHC.Base.=<<_'" := (op_zezlzl__). Infix "GHC.Base.=<<" := (_=<<_) (at level 99). -Notation "'_GHC.Base.$_'" := (op_zd__). -Infix "GHC.Base.$" := (_$_) (at level 99). -Notation "'_GHC.Base.$!_'" := (op_zdzn__). -Infix "GHC.Base.$!" := (_$!_) (at level 99). End Notations. (* External variables: - Eq Gt Lt None Some String Type andb bool comparison cons false list nil - op_zeze__ option pair true tt unit Coq.Init.Datatypes.app - Coq.Lists.List.flat_map Coq.Lists.List.map GHC.Prim.arrow GHC.Tuple.pair_type - GHC.Tuple.quad_type GHC.Tuple.triple_type GHC.Types.RuntimeRep + Eq Eq_ Gt Lt None Ord Some String Type andb bool compare compare__ comparison + cons false list max__ min__ negb nil op_zeze__ op_zeze____ op_zg____ op_zgze____ + op_zl__ op_zl____ op_zlze____ op_zsze____ option pair true tt unit + Coq.Init.Datatypes.app Coq.Lists.List.flat_map Coq.Lists.List.map GHC.Prim.arrow + GHC.Tuple.pair_type GHC.Tuple.quad_type GHC.Tuple.triple_type *) diff --git a/base/_CoqProject b/base/_CoqProject index 518ce6751..6ca167708 100644 --- a/base/_CoqProject +++ b/base/_CoqProject @@ -1,6 +1,6 @@ -Q . "" HsToCoq/Wf.v HsToCoq/Skip.v HsToCoq/DeferredFix.v HsToCoq/DeferredFixImpl.v HsToCoq/Unpeel.v GHC/Num.v GHC/Char.v GHC/Real.v GHC/Enum.v Data/Bits.v GHC/Prim.v GHC/Types.v GHC/Tuple.v Data/Type/Equality.v HsToCoq/Err.v GHC/Err.v HsToCoq/Nat.v GHC/Unicode.v Prelude.v -GHC/Base.v Data/Maybe.v GHC/List.v Data/List.v Data/OldList.v Data/Bool.v Data/Tuple.v Data/Void.v Data/Function.v Data/Ord.v Data/Functor.v Data/Either.v Data/Proxy.v Control/Monad.v Data/Monoid.v Data/Functor/Utils.v Data/Traversable.v Control/Monad/Fail.v Data/Foldable.v Control/Arrow.v Data/Functor/Identity.v Data/Functor/Const.v Control/Applicative.v Data/Functor/Classes.v Control/Category.v Data/Bifunctor.v Data/List/NonEmpty.v Data/Semigroup.v Data/Functor/Compose.v Data/Functor/Product.v Data/Functor/Sum.v Data/Bifoldable.v Data/Bitraversable.v Control/Monad/Zip.v +Data/Maybe.v GHC/List.v Data/List.v Data/OldList.v Data/Bool.v Data/Tuple.v Data/Void.v Data/Function.v Data/Ord.v Data/Functor.v Data/Either.v Data/Proxy.v Control/Monad.v Data/Monoid.v Data/Functor/Utils.v Data/Traversable.v Control/Monad/Fail.v Data/Foldable.v Control/Arrow.v Data/Functor/Identity.v Data/Functor/Const.v Control/Applicative.v Data/Functor/Classes.v Control/Category.v Data/Bifunctor.v Data/List/NonEmpty.v Data/Semigroup.v Data/Functor/Compose.v Data/Functor/Product.v Data/Functor/Sum.v Data/Bifoldable.v Data/Bitraversable.v Control/Monad/Zip.v Data/SemigroupInternal.v - +GHC/Base.v