Skip to content

Commit

Permalink
Fun functors visibility (#90)
Browse files Browse the repository at this point in the history
Close #88
  • Loading branch information
vzaliva authored Jun 3, 2020
1 parent 973e4bb commit f8f530a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions theories/Data/Fun.v
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ Set Strict Implicit.
Section functors.
Variable A : Type.

Instance FunFunctor A : Functor (Fun A) :=
{ fmap _A _B g f x := g (f x)
}.

Local Instance Functor_Fun : Functor (Fun A) :=
Global Instance Functor_Fun : Functor (Fun A) :=
{ fmap _A _B g f x := g (f x) }.

Local Instance CoFunctor_Fun T : CoFunctor (fun x => x -> T) :=
Expand All @@ -33,7 +29,7 @@ Section functors.
Local Instance CoFunctor_cofunctor F G (fF : CoFunctor F) (fG : CoFunctor G) : Functor (fun x => F (G x)) :=
{| fmap := fun _ _ g => @cofmap F _ _ _ (@cofmap G _ _ _ g) |}.

Local Instance Applicative_Fun : Applicative (Fun A) :=
Global Instance Applicative_Fun : Applicative (Fun A) :=
{ pure := fun _ x _ => x
; ap := fun _ _ f x y => (f y) (x y)
}.
Expand Down

0 comments on commit f8f530a

Please sign in to comment.