Source code on Github
{-# OPTIONS --cubical-compatible #-}
module Class.Core where

open import Class.Prelude

-- ** unary type formers

Type[_↝_] :   ℓ′  Type _
Type[   ℓ′ ] = Type   Type ℓ′

Level↑ = Level  Level

variable ℓ↑ ℓ↑′ : Level↑

Type↑ : Level↑  Typeω
Type↑ ℓ↑ =  {}  Type[   ℓ↑  ]

variable M F : Type↑ ℓ↑

-- ** binary type formers
Type[_∣_↝_] :   ℓ′ ℓ″  Type _
Type[   ℓ′  ℓ″ ] = Type   Type ℓ′  Type ℓ″

Level↑² = Level  Level  Level

Type↑² : Level↑²  Typeω
Type↑² ℓ↑² =  { ℓ′}  Type[   ℓ′  ℓ↑²  ℓ′ ]

variable ℓ↑² ℓ↑²′ : Level  Level  Level

module _ (M : Type↑ ℓ↑) where
   : (A  Type )  Type _
   P =  {x}  M (P x)

   : (A  B  Type )  Type _
   _~_ =  {x y}  M (x ~ y)

   : (A  B  C  Type )  Type _
   _~_~_ =  {x y z}  M (x ~ y ~ z)