{-# OPTIONS --safe --without-K #-}
open import Core.Functor
open import Core.Functor.NaturalTransformation
open import Relation.Unary
open import Level renaming (suc to sℓ)
module Core.Functor.HigherOrder where
record HFunctor {a b} (H : (Set a → Set b) → Set a → Set b) : Set (sℓ (a ⊔ b)) where
field
⦃ HF-functor ⦄ : ∀ {F} → ⦃ Functor F ⦄ → Functor (H F)
hmap : ∀ {F G} → ∀[ F ⇒ G ] → ∀[ H F ⇒ H G ]
hmap-natural :
∀ {F G}
→ ⦃ _ : Functor F ⦄ ⦃ _ : Functor G ⦄
→ (θ : ∀[ F ⇒ G ])
→ Natural θ → Natural (hmap θ)
open HFunctor ⦃...⦄ public
variable H H₁ H₂ : (Set a → Set b) → Set a → Set b