Modules

categorical-crypto

  • Prelude

CategoricalCrypto

  • CategoricalCrypto
  • Abstract
  • Abstract2
  • Abstract2.Equivalence
  • Abstract2.Morphism
  • Abstract2.OAPEmulation
  • Abstract2.WideSubcategory
  • Channel.Category
  • Channel.Core
  • Channel.Selection
  • Examples.Basic
  • Examples.Commitment
  • Examples.RelSetup
  • Examples.Signatures
  • FamilyCategory
  • Machine.Constraints
  • Machine.Core
  • MachineAxioms
  • RandomOracle
  • RandomOracle2
  • SFunM
  • Standard
  • Standard2
  • Standard2.Morphism
  • StandardTV
  • UCSetup
  • UCSetup.Morphism
  • VanishingTV

Categories

  • Actegory
  • Actegory.Underlying
  • Category.EquivClosureHelper
  • Coherence.Monoidal
  • Coherence.Monoidal.Compare
  • Coherence.Monoidal.Diagram
  • Coherence.Monoidal.Frontend
  • Coherence.Monoidal.Frontend.Core
  • Coherence.Monoidal.Frontend.Sigma
  • Coherence.Monoidal.MacLane
  • Coherence.Monoidal.Normalize
  • Coherence.Monoidal.Reflect
  • Coherence.Monoidal.Sigma
  • Coherence.Monoidal.Test.Frontend
  • Coherence.Monoidal.Test.InterchangeStress
  • Coherence.Monoidal.Test.Limitations
  • Coherence.Monoidal.Test.SigmaFrontend
  • Coherence.Monoidal.WireCoherence
  • CoherenceIsos
  • Diagram.Coend.Ext.Setoids
  • Discrete
  • FreeMonoidal
  • FreeStrictMonoidal
  • Functor.Monoidal.CurriedTensor
  • Functor.Monoidal.CurriedTensor.Properties
  • Functor.Monoidal.Properties.Ext
  • Functor.Presheaf.Morphism
  • GradedKleisli
  • GradedKleisli.Functorial
  • GradedKleisli.Functorial.Category
  • GradedKleisli.Regrade
  • KernelCongruence
  • KernelCongruence.Reindex
  • LocallyGraded
  • LocallyGraded.FreeActegory
  • LocallyGraded.FreeActegory.Kleisli
  • LocallyGraded.Kleisli
  • Monad.Graded.Ext
  • Monad.Graded.Morphism
  • Monad.Graded.Pullback
  • Monad.Graded.Uncurried
  • Morphism.Reasoning.Ext
  • NaturalTransformationHelper
  • Properties

Class

  • Monad.Ext

Data

  • List.Properties.Ext
  • Maybe.Ext
  • Nat.Poly

LibExt

  • LibExt
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
{-# OPTIONS --cubical-compatible #-}
module Class.Show.Instances where
 
open import Class.Prelude hiding (Type)
open import Data.String using (parens; braces; intersperse)
open import Class.Semigroup
open import Class.Show.Core
 
Show-× : ⦃ Show A ⦄ → ⦃ Show B ⦄ → Show (A × B)
Show-× .show (x , y) = parens $ show x ◇ " , " ◇ show y
 
Show-Maybe : ⦃ Show A ⦄ → Show (Maybe A)
Show-Maybe .show nothing = "nothing"
Show-Maybe .show (just x) = "just " ◇ show x
 
Show-List : ⦃ Show A ⦄ → Show (List A)
Show-List .show = braces ∘ intersperse ", " ∘ map show
 
instance
Show-String = mkShow id
 
Show-⊤ = Show ⊤ ∋ λ where .show tt → "tt"
 
Show-Char = Show _ ∋ record {M}
where import Data.Char as M
 
Show-Bool = Show _ ∋ record {M}
where import Data.Bool.Show as M
 
Show-ℕ = Show _ ∋ record {M}
where import Data.Nat.Show as M
 
Show-ℤ = Show _ ∋ record {M}
where import Data.Integer.Show as M
 
Show-ℚ = Show _ ∋ record {M}
where import Data.Rational.Show as M
 
Show-Fin : Show¹ Fin
Show-Fin .show = ("# " ◇_) ∘ show ∘ toℕ
where open import Data.Fin using (toℕ)
 
Show-Float = Show _ ∋ record {M}
where import Data.Float as M
 
open import Reflection
open import Reflection.AST.Term
open import Reflection.AST.Meta
 
instance
Show-Name = mkShow showName
Show-Meta = mkShow showMeta
Show-Relevance = mkShow showRel -- showRelevance
Show-Vis = mkShow showVisibility
Show-Literal = mkShow showLiteral
 
Show-Arg : ⦃ Show A ⦄ → Show (Arg A)
Show-Arg .show (arg (arg-info v _) x) = show v ◇ show x
 
Show-Abs : ⦃ Show A ⦄ → Show (Abs A)
Show-Abs .show (abs s x) = "abs " ◇ show s ◇ " " ◇ show x
 
instance
Show-Names = Show (Args Term) ∋ mkShow showTerms
Show-Term = mkShow showTerm
Show-Sort = mkShow showSort
Show-Patterns = Show (Args Pattern) ∋ mkShow showPatterns
Show-Pattern = mkShow showPattern
Show-Clause = mkShow showClause
Show-Clauses = Show (List Clause) ∋ mkShow showClauses
Show-Tel = Show Telescope ∋ mkShow showTel
Show-Definition = mkShow showDefinition
 
Show-AName = Show (Arg Name) ∋ Show-Arg
Show-AType = Show (Arg Type) ∋ Show-Arg
Show-ATerms = Show (Args Name) ∋ Show-List