tikzsd-1.0.0: A program for generating LaTeX code of string diagrams.
CopyrightAnthony Wang 2021
LicenseMIT
Maintaineranthony.y.wang.math@gmail.com
Safe HaskellSafe-Inferred
LanguageHaskell2010

SDParser

Description

SDParser defines a parser which parses text into a list of SDCommands, which are then handled by the main thread of the program.

The notation for the text parsed is documented in the user's manual for the tikzsd program.

Synopsis

Documentation

data SDCommand Source #

A SDCommand describes a command parsed from the file.

We have the following commands:

  • DefineCat is the command for defining a category.
  • DefineFunc is the command for defining a basic functor.
  • DefineNat is the command for defining a basic natural transformation.
  • DrawNat is the command for creating a file with the TikZ code for the drawing a string diagram of a natural transformation.

Instances

Instances details
Show SDCommand Source # 
Instance details

Defined in SDParser

data SDDrawLine Source #

SDDrawLine describes a line in a DrawNat command. These lines are used to specify a NaturalTransformation and a NatFormatting used format the NaturalTransformation. See the user's manual for notation.

  • SDDrawFun specifies a line used to specify a Functor
  • SDDrawNat specifies a line used to specify a horizontal composition of basic natural transformations.

Instances

Instances details
Show SDDrawLine Source # 
Instance details

Defined in SDParser

data CompElement Source #

(CompElement i opts) refers to the element with id i, modified with options opts

Constructors

Empty 
CompElement 

Fields

Instances

Instances details
Eq CompElement Source # 
Instance details

Defined in SDParser

Show CompElement Source # 
Instance details

Defined in SDParser

sd_parser :: GenParser Char st [SDCommand] Source #

sd_parser is the parser which parses a String into a list of SDCommands.