typst-0.1.0.0: Parsing and evaluating typst syntax.

Safe Haskell | Safe-Inferred
Language | Haskell2010

Typst.Types

# Documentation

data RE Source #

#### Instances

Instances details

Show RE Source # |
Instance details Defined in Typst.Regex Methods showsPrec :: Int -> RE -> ShowS Source # show :: RE -> String Source # showList :: [RE] -> ShowS Source #
Eq RE Source # |
Instance details Defined in Typst.Regex Methods (==) :: RE -> RE -> Bool Source # (/=) :: RE -> RE -> Bool Source #
Ord RE Source # |
Instance details Defined in Typst.Regex Methods compare :: RE -> RE -> Ordering Source # (<) :: RE -> RE -> Bool Source # (<=) :: RE -> RE -> Bool Source # (>) :: RE -> RE -> Bool Source # (>=) :: RE -> RE -> Bool Source # max :: RE -> RE -> RE Source # min :: RE -> RE -> RE Source #
FromVal RE Source # |
Instance details Defined in Typst.Types Methods fromVal :: (MonadPlus m, MonadFail m) => Val -> m RE Source #

data Val Source #

Constructors

VNone |
VAuto |
VBoolean !Bool |
VInteger !Integer |
VFloat !Double |
VRatio !Rational |
VLength !Length |
VAlignment (Maybe Horiz) (Maybe Vert) |
VAngle !Double |
VFraction !Double |
VColor !Color |
VSymbol !Symbol |
VString !Text |
VRegex !RE |
VContent (Seq Content) |
VArray (Vector Val) |
VDict (OMap Identifier Val) |
VTermItem (Seq Content) (Seq Content) |
VDirection Direction |
VFunction (Maybe Identifier) (Map Identifier Val) Function |
VArguments Arguments |
VLabel !Text |
VCounter !Counter |
VSelector !Selector |
VModule Identifier (Map Identifier Val) |
VStyles |

#### Instances

Instances details

FromJSON Val Source # |
Instance details Defined in Typst.Types Methods parseJSON :: Value -> Parser Val Source # parseJSONList :: Value -> Parser [Val] Source #
Show Val Source # |
Instance details Defined in Typst.Types Methods showsPrec :: Int -> Val -> ShowS Source # show :: Val -> String Source # showList :: [Val] -> ShowS Source #
Eq Val Source # |
Instance details Defined in Typst.Types Methods (==) :: Val -> Val -> Bool Source # (/=) :: Val -> Val -> Bool Source #
Ord Val Source # |
Instance details Defined in Typst.Types Methods compare :: Val -> Val -> Ordering Source # (<) :: Val -> Val -> Bool Source # (<=) :: Val -> Val -> Bool Source # (>) :: Val -> Val -> Bool Source # (>=) :: Val -> Val -> Bool Source # max :: Val -> Val -> Val Source # min :: Val -> Val -> Val Source #
Compare Val Source # |
Instance details Defined in Typst.Types Methods comp :: Val -> Val -> Maybe Ordering Source #
FromVal Val Source # |
Instance details Defined in Typst.Types Methods fromVal :: (MonadPlus m, MonadFail m) => Val -> m Val Source #
Multipliable Val Source # |
Instance details Defined in Typst.Types Methods maybeTimes :: Val -> Val -> Maybe Val Source # maybeDividedBy :: Val -> Val -> Maybe Val Source #
Negatable Val Source # |
Instance details Defined in Typst.Types Methods maybeNegate :: Val -> Maybe Val Source #
Summable Val Source # |
Instance details Defined in Typst.Types Methods maybePlus :: Val -> Val -> Maybe Val Source # maybeMinus :: Val -> Val -> Maybe Val Source #

data ValType Source #

Constructors

TNone |
TAuto |
TBoolean |
TInteger |
TFloat |
TRatio |
TLength |
TAlignment |
TAngle |
TFraction |
TColor |
TSymbol |
TString |
TRegex |
TContent |
TArray |
TDict |
TTermItem |
TDirection |
TFunction |
TArguments |
TModule |
TSelector |
TStyles |
TLabel |
TCounter |
TLocation |
TAny |
ValType :|: ValType |

#### Instances

Instances details

Show ValType Source # |
Instance details Defined in Typst.Types Methods showsPrec :: Int -> ValType -> ShowS Source # show :: ValType -> String Source # showList :: [ValType] -> ShowS Source #
Eq ValType Source # |
Instance details Defined in Typst.Types Methods (==) :: ValType -> ValType -> Bool Source # (/=) :: ValType -> ValType -> Bool Source #

valType :: Val -> ValType Source #

hasType :: ValType -> Val -> Bool Source #

class FromVal a where Source #

Methods

fromVal :: (MonadPlus m, MonadFail m) => Val -> m a Source #

#### Instances

Instances details

FromVal Rational Source # |
Instance details Defined in Typst.Types Methods fromVal :: (MonadPlus m, MonadFail m) => Val -> m Rational Source #
FromVal Text Source # |
Instance details Defined in Typst.Types Methods fromVal :: (MonadPlus m, MonadFail m) => Val -> m Text Source #
FromVal RE Source # |
Instance details Defined in Typst.Types Methods fromVal :: (MonadPlus m, MonadFail m) => Val -> m RE Source #
FromVal Counter Source # |
Instance details Defined in Typst.Types Methods fromVal :: (MonadPlus m, MonadFail m) => Val -> m Counter Source #
FromVal Direction Source # |
Instance details Defined in Typst.Types Methods fromVal :: (MonadPlus m, MonadFail m) => Val -> m Direction Source #
FromVal Function Source # |
Instance details Defined in Typst.Types Methods fromVal :: (MonadPlus m, MonadFail m) => Val -> m Function Source #
FromVal Length Source # |
Instance details Defined in Typst.Types Methods fromVal :: (MonadPlus m, MonadFail m) => Val -> m Length Source #
FromVal Selector Source # |
Instance details Defined in Typst.Types Methods fromVal :: (MonadPlus m, MonadFail m) => Val -> m Selector Source #
FromVal Val Source # |
Instance details Defined in Typst.Types Methods fromVal :: (MonadPlus m, MonadFail m) => Val -> m Val Source #
FromVal String Source # |
Instance details Defined in Typst.Types Methods fromVal :: (MonadPlus m, MonadFail m) => Val -> m String Source #
FromVal Integer Source # |
Instance details Defined in Typst.Types Methods fromVal :: (MonadPlus m, MonadFail m) => Val -> m Integer Source #
FromVal Bool Source # |
Instance details Defined in Typst.Types Methods fromVal :: (MonadPlus m, MonadFail m) => Val -> m Bool Source #
FromVal Double Source # |
Instance details Defined in Typst.Types Methods fromVal :: (MonadPlus m, MonadFail m) => Val -> m Double Source #
FromVal Int Source # |
Instance details Defined in Typst.Types Methods fromVal :: (MonadPlus m, MonadFail m) => Val -> m Int Source #
FromVal (Seq Content) Source # |
Instance details Defined in Typst.Types Methods fromVal :: (MonadPlus m, MonadFail m) => Val -> m (Seq Content) Source #
FromVal a => FromVal (Vector a) Source # |
Instance details Defined in Typst.Types Methods fromVal :: (MonadPlus m, MonadFail m) => Val -> m (Vector a) Source #
FromVal a => FromVal (Maybe a) Source # |
Instance details Defined in Typst.Types Methods fromVal :: (MonadPlus m, MonadFail m) => Val -> m (Maybe a) Source #

class Negatable a where Source #

Methods

maybeNegate :: a -> Maybe a Source #

#### Instances

Instances details

Negatable Val Source # |
Instance details Defined in Typst.Types Methods maybeNegate :: Val -> Maybe Val Source #

class Negatable a => Summable a where Source #

Minimal complete definition

maybePlus

Methods

maybePlus :: a -> a -> Maybe a Source #

maybeMinus :: a -> a -> Maybe a Source #

#### Instances

Instances details

Summable Val Source # |
Instance details Defined in Typst.Types Methods maybePlus :: Val -> Val -> Maybe Val Source # maybeMinus :: Val -> Val -> Maybe Val Source #

class Multipliable a where Source #

Methods

maybeTimes :: a -> a -> Maybe a Source #

maybeDividedBy :: a -> a -> Maybe a Source #

#### Instances

Instances details

Multipliable Val Source # |
Instance details Defined in Typst.Types Methods maybeTimes :: Val -> Val -> Maybe Val Source # maybeDividedBy :: Val -> Val -> Maybe Val Source #

data Selector Source #

Constructors

SelectElement Identifier [(Identifier, Val)] |
SelectString !Text |
SelectRegex !RE |
SelectLabel !Text |
SelectOr Selector Selector |
SelectAnd Selector Selector |
SelectBefore Selector Selector |
SelectAfter Selector Selector |

#### Instances

Instances details

Show Selector Source # |
Instance details Defined in Typst.Types Methods showsPrec :: Int -> Selector -> ShowS Source # show :: Selector -> String Source # showList :: [Selector] -> ShowS Source #
Eq Selector Source # |
Instance details Defined in Typst.Types Methods (==) :: Selector -> Selector -> Bool Source # (/=) :: Selector -> Selector -> Bool Source #
Ord Selector Source # |
Instance details Defined in Typst.Types Methods compare :: Selector -> Selector -> Ordering Source # (<) :: Selector -> Selector -> Bool Source # (<=) :: Selector -> Selector -> Bool Source # (>) :: Selector -> Selector -> Bool Source # (>=) :: Selector -> Selector -> Bool Source # max :: Selector -> Selector -> Selector Source # min :: Selector -> Selector -> Selector Source #
FromVal Selector Source # |
Instance details Defined in Typst.Types Methods fromVal :: (MonadPlus m, MonadFail m) => Val -> m Selector Source #

data Symbol Source #

Constructors

Symbol |

Fields

- symDefault :: !Text
- symAccent :: !Bool
- symVariants :: [(Set Text, Text)]

#### Instances

Instances details

Show Symbol Source # |
Instance details Defined in Typst.Types Methods showsPrec :: Int -> Symbol -> ShowS Source # show :: Symbol -> String Source # showList :: [Symbol] -> ShowS Source #
Eq Symbol Source # |
Instance details Defined in Typst.Types Methods (==) :: Symbol -> Symbol -> Bool Source # (/=) :: Symbol -> Symbol -> Bool Source #

data Content Source #

Constructors

Txt !Text |
Lab !Text |
Elt |

Fields

- eltName :: Identifier
- eltPos :: Maybe SourcePos
- eltFields :: Map Identifier Val

#### Instances

Instances details

IsString Content Source # |
Instance details Defined in Typst.Types Methods fromString :: String -> Content Source #
Show Content Source # |
Instance details Defined in Typst.Types Methods showsPrec :: Int -> Content -> ShowS Source # show :: Content -> String Source # showList :: [Content] -> ShowS Source #
Eq Content Source # |
Instance details Defined in Typst.Types Methods (==) :: Content -> Content -> Bool Source # (/=) :: Content -> Content -> Bool Source #
Ord Content Source # |
Instance details Defined in Typst.Types Methods compare :: Content -> Content -> Ordering Source # (<) :: Content -> Content -> Bool Source # (<=) :: Content -> Content -> Bool Source # (>) :: Content -> Content -> Bool Source # (>=) :: Content -> Content -> Bool Source # max :: Content -> Content -> Content Source # min :: Content -> Content -> Content Source #
FromVal (Seq Content) Source # |
Instance details Defined in Typst.Types Methods fromVal :: (MonadPlus m, MonadFail m) => Val -> m (Seq Content) Source #

newtype Function Source #

Constructors

Function (forall m. Monad m => Arguments -> MP m Val) |

#### Instances

Instances details

Show Function Source # |
Instance details Defined in Typst.Types Methods showsPrec :: Int -> Function -> ShowS Source # show :: Function -> String Source # showList :: [Function] -> ShowS Source #
Eq Function Source # |
Instance details Defined in Typst.Types Methods (==) :: Function -> Function -> Bool Source # (/=) :: Function -> Function -> Bool Source #
FromVal Function Source # |
Instance details Defined in Typst.Types Methods fromVal :: (MonadPlus m, MonadFail m) => Val -> m Function Source #

data Arguments Source #

Constructors

Arguments |

Fields

- positional :: [Val]
- named :: OMap Identifier Val

#### Instances

Instances details

Monoid Arguments Source # |
Instance details Defined in Typst.Types Methods mempty :: Arguments Source # mappend :: Arguments -> Arguments -> Arguments Source # mconcat :: [Arguments] -> Arguments Source #
Semigroup Arguments Source # |
Instance details Defined in Typst.Types Methods (<>) :: Arguments -> Arguments -> Arguments Source # sconcat :: NonEmpty Arguments -> Arguments Source # stimes :: Integral b => b -> Arguments -> Arguments Source #
Show Arguments Source # |
Instance details Defined in Typst.Types Methods showsPrec :: Int -> Arguments -> ShowS Source # show :: Arguments -> String Source # showList :: [Arguments] -> ShowS Source #
Eq Arguments Source # |
Instance details Defined in Typst.Types Methods (==) :: Arguments -> Arguments -> Bool Source # (/=) :: Arguments -> Arguments -> Bool Source #

getPositionalArg :: (MonadFail m, MonadPlus m, FromVal a) => Int -> Arguments -> m a Source #

getNamedArg :: (MonadFail m, MonadPlus m, FromVal a) => Identifier -> Arguments -> m a Source #

class Compare a where Source #

Methods

comp :: a -> a -> Maybe Ordering Source #

#### Instances

Instances details

Compare Val Source # |
Instance details Defined in Typst.Types Methods comp :: Val -> Val -> Maybe Ordering Source #

type MP m = ParsecT [Markup] (EvalState m) m Source #

data Scope Source #

Constructors

FunctionScope |
BlockScope |

#### Instances

Instances details

Show Scope Source # |
Instance details Defined in Typst.Types Methods showsPrec :: Int -> Scope -> ShowS Source # show :: Scope -> String Source # showList :: [Scope] -> ShowS Source #
Eq Scope Source # |
Instance details Defined in Typst.Types Methods (==) :: Scope -> Scope -> Bool Source # (/=) :: Scope -> Scope -> Bool Source #
Ord Scope Source # |
Instance details Defined in Typst.Types Methods compare :: Scope -> Scope -> Ordering Source # (<) :: Scope -> Scope -> Bool Source # (<=) :: Scope -> Scope -> Bool Source # (>) :: Scope -> Scope -> Bool Source # (>=) :: Scope -> Scope -> Bool Source # max :: Scope -> Scope -> Scope Source # min :: Scope -> Scope -> Scope Source #

data FlowDirective Source #

Constructors

FlowNormal |
FlowBreak |
FlowContinue |
FlowReturn Bool |

#### Instances

Instances details

Show FlowDirective Source # |
Instance details Defined in Typst.Types Methods showsPrec :: Int -> FlowDirective -> ShowS Source # show :: FlowDirective -> String Source # showList :: [FlowDirective] -> ShowS Source #
Eq FlowDirective Source # |
Instance details Defined in Typst.Types Methods (==) :: FlowDirective -> FlowDirective -> Bool Source # (/=) :: FlowDirective -> FlowDirective -> Bool Source #
Ord FlowDirective Source # |

Instance details

Defined in Typst.Types

Methods

compare :: FlowDirective -> FlowDirective -> Ordering Source #

(<) :: FlowDirective -> FlowDirective -> Bool Source #

(<=) :: FlowDirective -> FlowDirective -> Bool Source #

(>) :: FlowDirective -> FlowDirective -> Bool Source #

(>=) :: FlowDirective -> FlowDirective -> Bool Source #

max :: FlowDirective -> FlowDirective -> FlowDirective Source #

min :: FlowDirective -> FlowDirective -> FlowDirective Source #

data EvalState m Source #

Constructors

EvalState |

Fields

- evalIdentifiers :: [(Scope, Map Identifier Val)]
- evalCounters :: Map Counter Integer
- evalMath :: Bool
- evalShowRules :: [ShowRule]
- evalStyles :: Map Identifier Arguments
- evalFlowDirective :: FlowDirective
- evalLoadBytes :: FilePath -> m ByteString

emptyEvalState :: EvalState m Source #

data ShowRule Source #

Constructors

ShowRule Selector (forall m. Monad m => Content -> MP m (Seq Content)) |

#### Instances

Instances details

Show ShowRule Source # |
Instance details Defined in Typst.Types Methods showsPrec :: Int -> ShowRule -> ShowS Source # show :: ShowRule -> String Source # showList :: [ShowRule] -> ShowS Source #

data Counter Source #

Constructors

CounterCustom !Text |
CounterLabel !Text |
CounterSelector !Selector |
CounterPage |

#### Instances

Instances details

Show Counter Source # |
Instance details Defined in Typst.Types Methods showsPrec :: Int -> Counter -> ShowS Source # show :: Counter -> String Source # showList :: [Counter] -> ShowS Source #
Eq Counter Source # |
Instance details Defined in Typst.Types Methods (==) :: Counter -> Counter -> Bool Source # (/=) :: Counter -> Counter -> Bool Source #
Ord Counter Source # |
Instance details Defined in Typst.Types Methods compare :: Counter -> Counter -> Ordering Source # (<) :: Counter -> Counter -> Bool Source # (<=) :: Counter -> Counter -> Bool Source # (>) :: Counter -> Counter -> Bool Source # (>=) :: Counter -> Counter -> Bool Source # max :: Counter -> Counter -> Counter Source # min :: Counter -> Counter -> Counter Source #
FromVal Counter Source # |
Instance details Defined in Typst.Types Methods fromVal :: (MonadPlus m, MonadFail m) => Val -> m Counter Source #

data LUnit Source #

Constructors

LEm |
LPt |
LIn |
LCm |
LMm |

#### Instances

Instances details

Show LUnit Source # |
Instance details Defined in Typst.Types Methods showsPrec :: Int -> LUnit -> ShowS Source # show :: LUnit -> String Source # showList :: [LUnit] -> ShowS Source #
Eq LUnit Source # |
Instance details Defined in Typst.Types Methods (==) :: LUnit -> LUnit -> Bool Source # (/=) :: LUnit -> LUnit -> Bool Source #

data Length Source #

Constructors

LExact Double LUnit |
LRatio !Rational |
LSum Length Length |

#### Instances

Instances details

Monoid Length Source # |
Instance details Defined in Typst.Types Methods mempty :: Length Source # mappend :: Length -> Length -> Length Source # mconcat :: [Length] -> Length Source #
Semigroup Length Source # |
Instance details Defined in Typst.Types Methods (<>) :: Length -> Length -> Length Source # sconcat :: NonEmpty Length -> Length Source # stimes :: Integral b => b -> Length -> Length Source #
Show Length Source # |
Instance details Defined in Typst.Types Methods showsPrec :: Int -> Length -> ShowS Source # show :: Length -> String Source # showList :: [Length] -> ShowS Source #
Eq Length Source # |
Instance details Defined in Typst.Types Methods (==) :: Length -> Length -> Bool Source # (/=) :: Length -> Length -> Bool Source #
FromVal Length Source # |
Instance details Defined in Typst.Types Methods fromVal :: (MonadPlus m, MonadFail m) => Val -> m Length Source #

renderLength :: Bool -> Length -> Text Source #

data Horiz Source #

Constructors

HorizStart |
HorizEnd |
HorizLeft |
HorizCenter |
HorizRight |

#### Instances

Instances details

Show Horiz Source # |
Instance details Defined in Typst.Types Methods showsPrec :: Int -> Horiz -> ShowS Source # show :: Horiz -> String Source # showList :: [Horiz] -> ShowS Source #
Eq Horiz Source # |
Instance details Defined in Typst.Types Methods (==) :: Horiz -> Horiz -> Bool Source # (/=) :: Horiz -> Horiz -> Bool Source #
Ord Horiz Source # |
Instance details Defined in Typst.Types Methods compare :: Horiz -> Horiz -> Ordering Source # (<) :: Horiz -> Horiz -> Bool Source # (<=) :: Horiz -> Horiz -> Bool Source # (>) :: Horiz -> Horiz -> Bool Source # (>=) :: Horiz -> Horiz -> Bool Source # max :: Horiz -> Horiz -> Horiz Source # min :: Horiz -> Horiz -> Horiz Source #

data Vert Source #

Constructors

VertTop |
VertHorizon |
VertBottom |

#### Instances

Instances details

Show Vert Source # |
Instance details Defined in Typst.Types Methods showsPrec :: Int -> Vert -> ShowS Source # show :: Vert -> String Source # showList :: [Vert] -> ShowS Source #
Eq Vert Source # |
Instance details Defined in Typst.Types Methods (==) :: Vert -> Vert -> Bool Source # (/=) :: Vert -> Vert -> Bool Source #
Ord Vert Source # |
Instance details Defined in Typst.Types Methods compare :: Vert -> Vert -> Ordering Source # (<) :: Vert -> Vert -> Bool Source # (<=) :: Vert -> Vert -> Bool Source # (>) :: Vert -> Vert -> Bool Source # (>=) :: Vert -> Vert -> Bool Source # max :: Vert -> Vert -> Vert Source # min :: Vert -> Vert -> Vert Source #

data Color Source #

Constructors

RGB Rational Rational Rational Rational |
CMYK Rational Rational Rational Rational |
Luma Rational |

#### Instances

Instances details

Show Color Source # |
Instance details Defined in Typst.Types Methods showsPrec :: Int -> Color -> ShowS Source # show :: Color -> String Source # showList :: [Color] -> ShowS Source #
Eq Color Source # |
Instance details Defined in Typst.Types Methods (==) :: Color -> Color -> Bool Source # (/=) :: Color -> Color -> Bool Source #
Ord Color Source # |
Instance details Defined in Typst.Types Methods compare :: Color -> Color -> Ordering Source # (<) :: Color -> Color -> Bool Source # (<=) :: Color -> Color -> Bool Source # (>) :: Color -> Color -> Bool Source # (>=) :: Color -> Color -> Bool Source # max :: Color -> Color -> Color Source # min :: Color -> Color -> Color Source #

data Direction Source #

Constructors

Ltr |
Rtl |
Ttb |
Btt |

#### Instances

Instances details

Show Direction Source # |
Instance details Defined in Typst.Types Methods showsPrec :: Int -> Direction -> ShowS Source # show :: Direction -> String Source # showList :: [Direction] -> ShowS Source #
Eq Direction Source # |
Instance details Defined in Typst.Types Methods (==) :: Direction -> Direction -> Bool Source # (/=) :: Direction -> Direction -> Bool Source #
Ord Direction Source # |
Instance details Defined in Typst.Types Methods compare :: Direction -> Direction -> Ordering Source # (<) :: Direction -> Direction -> Bool Source # (<=) :: Direction -> Direction -> Bool Source # (>) :: Direction -> Direction -> Bool Source # (>=) :: Direction -> Direction -> Bool Source # max :: Direction -> Direction -> Direction Source # min :: Direction -> Direction -> Direction Source #
FromVal Direction Source # |
Instance details Defined in Typst.Types Methods fromVal :: (MonadPlus m, MonadFail m) => Val -> m Direction Source #

newtype Identifier Source #

Constructors

Identifier Text |

#### Instances

Instances details

Data Identifier Source # |

Instance details

Defined in Typst.Syntax

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Identifier -> c Identifier Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Identifier Source #

toConstr :: Identifier -> Constr Source #

dataTypeOf :: Identifier -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Identifier) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Identifier) Source #

gmapT :: (forall b. Data b => b -> b) -> Identifier -> Identifier Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Identifier -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Identifier -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Identifier -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Identifier -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Identifier -> m Identifier Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Identifier -> m Identifier Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Identifier -> m Identifier Source #

IsString Identifier Source # |
Instance details Defined in Typst.Syntax Methods fromString :: String -> Identifier Source #
Monoid Identifier Source # |
Instance details Defined in Typst.Syntax Methods mempty :: Identifier Source # mappend :: Identifier -> Identifier -> Identifier Source # mconcat :: [Identifier] -> Identifier Source #
Semigroup Identifier Source # |
Instance details Defined in Typst.Syntax Methods (<>) :: Identifier -> Identifier -> Identifier Source # sconcat :: NonEmpty Identifier -> Identifier Source # stimes :: Integral b => b -> Identifier -> Identifier Source #
Show Identifier Source # |
Instance details Defined in Typst.Syntax Methods showsPrec :: Int -> Identifier -> ShowS Source # show :: Identifier -> String Source # showList :: [Identifier] -> ShowS Source #
Eq Identifier Source # |
Instance details Defined in Typst.Syntax Methods (==) :: Identifier -> Identifier -> Bool Source # (/=) :: Identifier -> Identifier -> Bool Source #
Ord Identifier Source # |

Instance details

Defined in Typst.Syntax

Methods

compare :: Identifier -> Identifier -> Ordering Source #

(<) :: Identifier -> Identifier -> Bool Source #

(<=) :: Identifier -> Identifier -> Bool Source #

(>) :: Identifier -> Identifier -> Bool Source #

(>=) :: Identifier -> Identifier -> Bool Source #

max :: Identifier -> Identifier -> Identifier Source #

min :: Identifier -> Identifier -> Identifier Source #

lookupIdentifier :: Monad m => Identifier -> MP m Val Source #

joinVals :: MonadFail m => Val -> Val -> m Val Source #

prettyVal :: Val -> Doc Source #

valToContent :: Val -> Seq Content Source #

repr :: Val -> Text Source #

data Attempt a Source #

Constructors

Success a |
Failure String |

#### Instances

Instances details

MonadFail Attempt Source # |
Instance details Defined in Typst.Types Methods fail :: String -> Attempt a Source #
Applicative Attempt Source # |
Instance details Defined in Typst.Types Methods pure :: a -> Attempt a Source # (<*>) :: Attempt (a -> b) -> Attempt a -> Attempt b Source # liftA2 :: (a -> b -> c) -> Attempt a -> Attempt b -> Attempt c Source # (*>) :: Attempt a -> Attempt b -> Attempt b Source # (<*) :: Attempt a -> Attempt b -> Attempt a Source #
Functor Attempt Source # |
Instance details Defined in Typst.Types Methods fmap :: (a -> b) -> Attempt a -> Attempt b Source # (<$) :: a -> Attempt b -> Attempt a Source #
Monad Attempt Source # |
Instance details Defined in Typst.Types Methods (>>=) :: Attempt a -> (a -> Attempt b) -> Attempt b Source # (>>) :: Attempt a -> Attempt b -> Attempt b Source # return :: a -> Attempt a Source #
Show a => Show (Attempt a) Source # |
Instance details Defined in Typst.Types Methods showsPrec :: Int -> Attempt a -> ShowS Source # show :: Attempt a -> String Source # showList :: [Attempt a] -> ShowS Source #
Eq a => Eq (Attempt a) Source # |
Instance details Defined in Typst.Types Methods (==) :: Attempt a -> Attempt a -> Bool Source # (/=) :: Attempt a -> Attempt a -> Bool Source #
Ord a => Ord (Attempt a) Source # |
Instance details Defined in Typst.Types Methods compare :: Attempt a -> Attempt a -> Ordering Source # (<) :: Attempt a -> Attempt a -> Bool Source # (<=) :: Attempt a -> Attempt a -> Bool Source # (>) :: Attempt a -> Attempt a -> Bool Source # (>=) :: Attempt a -> Attempt a -> Bool Source # max :: Attempt a -> Attempt a -> Attempt a Source # min :: Attempt a -> Attempt a -> Attempt a Source #