Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
The Pandoc AST is not extensible, so we need to use another way to model different parts of slides that we want to appear bit by bit.
We do this by modelling a slide as a list of instructions, that manipulate the contents on a slide in a (for now) very basic way.
Synopsis
- data Instructions a
- fromList :: [Instruction a] -> Instructions a
- toList :: Instructions a -> [Instruction a]
- data Var
- data VarGen
- zeroVarGen :: VarGen
- freshVar :: VarGen -> (Var, VarGen)
- data Instruction a
- = Pause
- | Append [a]
- | AppendVar Var
- | Delete
- | ModifyLast (Instruction a)
- beforePause :: Int -> Instructions a -> Instructions a
- numFragments :: Instructions a -> Int
- variables :: Instructions a -> HashSet Var
- newtype Fragment = Fragment [Block]
- renderFragment :: (Var -> [Block]) -> Instructions Block -> Fragment
Documentation
data Instructions a Source #
Instances
Show a => Show (Instructions a) Source # | |
Defined in Patat.Presentation.Instruction showsPrec :: Int -> Instructions a -> ShowS # show :: Instructions a -> String # showList :: [Instructions a] -> ShowS # |
fromList :: [Instruction a] -> Instructions a Source #
toList :: Instructions a -> [Instruction a] Source #
A variable is like a placeholder in the instructions, something we don't know yet, dynamic content. Currently this is only used for code evaluation.
Used to generate fresh variables.
zeroVarGen :: VarGen Source #
data Instruction a Source #
Pause | |
Append [a] | |
AppendVar Var | |
Delete | |
ModifyLast (Instruction a) |
Instances
Show a => Show (Instruction a) Source # | |
Defined in Patat.Presentation.Instruction showsPrec :: Int -> Instruction a -> ShowS # show :: Instruction a -> String # showList :: [Instruction a] -> ShowS # |
beforePause :: Int -> Instructions a -> Instructions a Source #
numFragments :: Instructions a -> Int Source #
renderFragment :: (Var -> [Block]) -> Instructions Block -> Fragment Source #