Processing math: 100%
simple-topes-0.1.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

RSTT.Cube

Synopsis

Documentation

newtype Label Source #

A label (constructor symbol).

Constructors

Label 

Fields

Instances

Instances details
IsString Label Source # 
Instance details

Defined in RSTT.Cube

Methods

fromString :: String -> Label #

Show Label Source # 
Instance details

Defined in RSTT.Cube

Methods

showsPrec :: Int -> Label -> ShowS #

show :: Label -> String #

showList :: [Label] -> ShowS #

Eq Label Source # 
Instance details

Defined in RSTT.Cube

Methods

(==) :: Label -> Label -> Bool #

(/=) :: Label -> Label -> Bool #

Ord Label Source # 
Instance details

Defined in RSTT.Cube

Methods

compare :: Label -> Label -> Ordering #

(<) :: Label -> Label -> Bool #

(<=) :: Label -> Label -> Bool #

(>) :: Label -> Label -> Bool #

(>=) :: Label -> Label -> Bool #

max :: Label -> Label -> Label #

min :: Label -> Label -> Label #

newtype Var Source #

A variable.

Constructors

Var 

Fields

Instances

Instances details
IsString Var Source # 
Instance details

Defined in RSTT.Cube

Methods

fromString :: String -> Var #

Show Var Source # 
Instance details

Defined in RSTT.Cube

Methods

showsPrec :: Int -> Var -> ShowS #

show :: Var -> String #

showList :: [Var] -> ShowS #

Eq Var Source # 
Instance details

Defined in RSTT.Cube

Methods

(==) :: Var -> Var -> Bool #

(/=) :: Var -> Var -> Bool #

Ord Var Source # 
Instance details

Defined in RSTT.Cube

Methods

compare :: Var -> Var -> Ordering #

(<) :: Var -> Var -> Bool #

(<=) :: Var -> Var -> Bool #

(>) :: Var -> Var -> Bool #

(>=) :: Var -> Var -> Bool #

max :: Var -> Var -> Var #

min :: Var -> Var -> Var #

data Cube Source #

A cube expression.

Constructors

CubeUnit

Unit cube: 1.

CubeProduct Cube Cube

Product of cubes: I×J.

CubeCon Label

A user-defined cube, e.g. 2,I.

CubeVar Var

A cube variable: I,J.

Instances

Instances details
IsString Cube Source # 
Instance details

Defined in RSTT.Cube

Methods

fromString :: String -> Cube #

Show Cube Source # 
Instance details

Defined in RSTT.Cube

Methods

showsPrec :: Int -> Cube -> ShowS #

show :: Cube -> String #

showList :: [Cube] -> ShowS #

Eq Cube Source # 
Instance details

Defined in RSTT.Cube

Methods

(==) :: Cube -> Cube -> Bool #

(/=) :: Cube -> Cube -> Bool #

Ord Cube Source # 
Instance details

Defined in RSTT.Cube

Methods

compare :: Cube -> Cube -> Ordering #

(<) :: Cube -> Cube -> Bool #

(<=) :: Cube -> Cube -> Bool #

(>) :: Cube -> Cube -> Bool #

(>=) :: Cube -> Cube -> Bool #

max :: Cube -> Cube -> Cube #

min :: Cube -> Cube -> Cube #

data Point Source #

A point in a cube.

Constructors

PointUnit

The only point in the unit cube: :1.

PointPair Point Point

A pair of points: t:I,s:Jt,s:I×J.

PointFirst Point

First projection: π1t.

PointSecond Point

Second projection: π2t.

PointCon Label [Point]

A user-defined point constructor, e.g. 0:2 or ts:I.

PointVar Var

A point variable: t,s.

Instances

Instances details
IsString Point Source # 
Instance details

Defined in RSTT.Cube

Methods

fromString :: String -> Point #

Show Point Source # 
Instance details

Defined in RSTT.Cube

Methods

showsPrec :: Int -> Point -> ShowS #

show :: Point -> String #

showList :: [Point] -> ShowS #

Eq Point Source # 
Instance details

Defined in RSTT.Cube

Methods

(==) :: Point -> Point -> Bool #

(/=) :: Point -> Point -> Bool #

Ord Point Source # 
Instance details

Defined in RSTT.Cube

Methods

compare :: Point -> Point -> Ordering #

(<) :: Point -> Point -> Bool #

(<=) :: Point -> Point -> Bool #

(>) :: Point -> Point -> Bool #

(>=) :: Point -> Point -> Bool #

max :: Point -> Point -> Point #

min :: Point -> Point -> Point #

type CubeContext = [(Var, Cube)] Source #

A cube context consists of point variables with corresponding cubes.

Pretty-printing

ppCube :: Cube -> String Source #

Pretty-print a Cube.

ppCubePrec :: Int -> Cube -> String Source #

Pretty-print a Cube expression in a given precedence environment.

ppPoint :: Point -> String Source #

Pretty-print a Point.

ppPointPrec :: Int -> Point -> String Source #

Pretty-print a Point expression in a given precedence environment.