{-# OPTIONS --lossy-unification #-}

module Cubical.Categories.Instances.Free.CartesianClosedCategory.Quiver where

open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function
open import Cubical.Data.Quiver.Base

private variable  ℓ' : Level

module _ (ob : Type ) where
  data CCCExpr : Type  where
    ↑_ : ob  CCCExpr
    _×_ : CCCExpr  CCCExpr  CCCExpr
     : CCCExpr
    _⇒_ : CCCExpr  CCCExpr  CCCExpr

record ×⇒Quiver  ℓ' : Type (ℓ-max (ℓ-suc ) (ℓ-suc ℓ')) where
  field
    ob : Type 
    Q : QuiverOver (CCCExpr ob) ℓ'
  open QuiverOver Q public
  obExpr : Type 
  obExpr = CCCExpr ob
  open CCCExpr obExpr public

Quiver→×⇒Quiver : ∀{ ℓ' : Level}  Quiver  ℓ'  ×⇒Quiver  ℓ'
Quiver→×⇒Quiver Q .×⇒Quiver.ob = Q .fst
Quiver→×⇒Quiver Q .×⇒Quiver.Q .QuiverOver.mor = Q .snd .QuiverOver.mor
Quiver→×⇒Quiver Q .×⇒Quiver.Q .QuiverOver.dom = ↑_ ∘S Q .snd .QuiverOver.dom
Quiver→×⇒Quiver Q .×⇒Quiver.Q .QuiverOver.cod = ↑_ ∘S Q .snd .QuiverOver.cod