@startuml

set namespaceseparator none
left to right direction
skinparam dpi 96
skinparam shadowing true
skinparam ArrowColor Black
skinparam PackageStyle folder
skinparam class {
  backgroundColor Business
  borderColor Red
}
skinparam object {
  backgroundColor lavender
  borderColor black
}


' typing
abstract class typing.Generic

' lambeq.backend.grammar
class grammar.Categoryee
class grammar.Functor

' inheritance relations
typing.Generic <|-- typing.Protocol
typing.Protocol <|-- grammar.Diagrammable

grammar.Entity <|-- grammar.Box
grammar.Entity <|-- grammar.Diagram
grammar.Entity <|-- grammar.Layer
grammar.Entity <|-- grammar.Ty

grammar.Box <|-- grammar.Cap
grammar.Box <|-- grammar.Cup
grammar.Box <|-- grammar.Daggered
grammar.Box <|-- grammar.Spider
grammar.Box <|-- grammar.Swap
grammar.Box <|-- grammar.Word

grammar.Box <|-- tensor.Box
grammar.Diagram <|-- tensor.Diagram
grammar.Layer <|-- tensor.Layer
grammar.Ty <|-- tensor.Dim

grammar.Daggered <|-- tensor.Daggered
tensor.Box <|-- tensor.Daggered
grammar.Swap <|-- tensor.Swap
tensor.Box <|-- tensor.Swap

tensor.Box <|-- quantum.Box
tensor.Diagram <|-- quantum.Diagram
tensor.Dim <|-- quantum.Ty
tensor.Layer <|-- quantum.Layer
quantum.Box <|-- quantum.SelfConjugate
tensor.Swap <|-- quantum.Swap
quantum.SelfConjugate <|-- quantum.Swap
quantum.Box <|-- quantum.Swap
tensor.Daggered <|-- quantum.Daggered
quantum.Box <|-- quantum.Daggered

@enduml
