module Meta.Brackets where

Semantic bracket notation🔗

In many of our developments (primarily, but not limited to, those in logic), we have a notion of a type being a syntactic presentation for some other, semantic, type In keeping with convention, we want to overload the notation to mean “the semantic value of ” This can be achieved with a simple notation class:

record ⟦⟧-notation {} (A : Type ) : Typeω where
  constructor brackets
  field
    {lvl} : Level
    Sem : Type lvl
    ⟦_⟧ : A  Sem

open ⟦⟧-notation ⦃...⦄ using (⟦_⟧) public
{-# DISPLAY ⟦⟧-notation.⟦_⟧ f x =  x  #-}