-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Terminal-based presentations using Pandoc
--   
--   Terminal-based presentations using Pandoc.
@package patat
@version 0.8.7.0


-- | Defines a cleanup action that needs to be run after we're done with a
--   slide or image.
module Patat.Cleanup
type Cleanup = IO ()

module Patat.Images.Internal
data Config a
Auto :: Config a
Explicit :: a -> Config a
data Backend
Backend :: (Config a -> IO Handle) -> Backend
data BackendNotSupported
BackendNotSupported :: String -> BackendNotSupported
data Handle
Handle :: (FilePath -> IO Cleanup) -> Handle
[hDrawImage] :: Handle -> FilePath -> IO Cleanup
instance GHC.Classes.Eq a => GHC.Classes.Eq (Patat.Images.Internal.Config a)
instance GHC.Show.Show Patat.Images.Internal.BackendNotSupported
instance Data.Data.Data Patat.Images.Internal.BackendNotSupported
instance GHC.Exception.Type.Exception Patat.Images.Internal.BackendNotSupported

module Patat.Images.ITerm2
backend :: Backend
instance GHC.Classes.Eq Patat.Images.ITerm2.Config
instance Data.Aeson.Types.FromJSON.FromJSON Patat.Images.ITerm2.Config

module Patat.Images.Kitty
backend :: Backend
instance GHC.Classes.Eq Patat.Images.Kitty.Config
instance Data.Aeson.Types.FromJSON.FromJSON Patat.Images.Kitty.Config

module Patat.Images.W3m
backend :: Backend
instance Data.Aeson.Types.FromJSON.FromJSON Patat.Images.W3m.Config
instance GHC.Show.Show Patat.Images.W3m.Config
instance GHC.Show.Show Patat.Images.W3m.W3m


-- | 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.
module Patat.Presentation.Instruction
data Instructions a
fromList :: [Instruction a] -> Instructions a
toList :: Instructions a -> [Instruction a]
data Instruction a
Pause :: Instruction a
Append :: [a] -> Instruction a
Delete :: Instruction a
ModifyLast :: Instruction a -> Instruction a
numFragments :: Instructions a -> Int
newtype Fragment
Fragment :: [Block] -> Fragment
renderFragment :: Int -> Instructions Block -> Fragment
instance GHC.Show.Show a => GHC.Show.Show (Patat.Presentation.Instruction.Instruction a)
instance GHC.Show.Show a => GHC.Show.Show (Patat.Presentation.Instruction.Instructions a)
instance GHC.Show.Show Patat.Presentation.Instruction.Fragment


-- | For background info on the spec, see the "Incremental lists" section
--   of the the pandoc manual.
module Patat.Presentation.Fragment
data FragmentSettings
FragmentSettings :: !Bool -> FragmentSettings
[fsIncrementalLists] :: FragmentSettings -> !Bool
fragmentInstructions :: FragmentSettings -> Instructions Block -> Instructions Block
fragmentBlocks :: FragmentSettings -> [Block] -> [Instruction Block]
fragmentBlock :: FragmentSettings -> Block -> [Instruction Block]
instance GHC.Show.Show Patat.Presentation.Fragment.FragmentSettings


-- | This is a small pretty-printing library.
module Patat.PrettyPrint
data Doc
toString :: Doc -> String

-- | Returns the rows and columns necessary to render this document
dimensions :: Doc -> (Int, Int)
null :: Doc -> Bool
hPutDoc :: Handle -> Doc -> IO ()
putDoc :: Doc -> IO ()
string :: String -> Doc
text :: Text -> Doc
space :: Doc
spaces :: Int -> Doc
softline :: Doc
hardline :: Doc
wrapAt :: Maybe Int -> Doc -> Doc
data Trimmable a
NotTrimmable :: !a -> Trimmable a
Trimmable :: !a -> Trimmable a
indent :: Trimmable Doc -> Trimmable Doc -> Doc -> Doc
ansi :: [SGR] -> Doc -> Doc
(<+>) :: Doc -> Doc -> Doc
infixr 6 <+>
(<$$>) :: Doc -> Doc -> Doc
infixr 5 <$$>
vcat :: [Doc] -> Doc
intersperse :: Doc -> [Doc] -> Doc
data Alignment
AlignLeft :: Alignment
AlignCenter :: Alignment
AlignRight :: Alignment
align :: Int -> Alignment -> Doc -> Doc

-- | Like the unix program <a>paste</a>.
paste :: [Doc] -> Doc
removeControls :: Doc -> Doc
clearScreen :: Doc
goToLine :: Int -> Doc
instance GHC.Classes.Eq Patat.PrettyPrint.Control
instance GHC.Classes.Eq Patat.PrettyPrint.Chunk
instance Data.Traversable.Traversable Patat.PrettyPrint.Trimmable
instance GHC.Base.Functor Patat.PrettyPrint.Trimmable
instance Data.Foldable.Foldable Patat.PrettyPrint.Trimmable
instance GHC.Base.Functor Patat.PrettyPrint.DocE
instance GHC.Base.Semigroup Patat.PrettyPrint.Doc
instance GHC.Base.Monoid Patat.PrettyPrint.Doc
instance GHC.Show.Show Patat.PrettyPrint.Alignment
instance GHC.Classes.Ord Patat.PrettyPrint.Alignment
instance GHC.Classes.Eq Patat.PrettyPrint.Alignment
instance Data.String.IsString Patat.PrettyPrint.Doc
instance GHC.Show.Show Patat.PrettyPrint.Doc

module Patat.Theme
data Theme
Theme :: !Maybe Style -> !Maybe Style -> !Maybe Style -> !Maybe Style -> !Maybe Text -> !Maybe Style -> !Maybe Style -> !Maybe Style -> !Maybe Style -> !Maybe Style -> !Maybe Style -> !Maybe Style -> !Maybe Style -> !Maybe Style -> !Maybe Style -> !Maybe Style -> !Maybe Style -> !Maybe Style -> !Maybe Style -> !Maybe Style -> !Maybe Style -> !Maybe Style -> !Maybe Style -> !Maybe SyntaxHighlighting -> Theme
[themeBorders] :: Theme -> !Maybe Style
[themeHeader] :: Theme -> !Maybe Style
[themeCodeBlock] :: Theme -> !Maybe Style
[themeBulletList] :: Theme -> !Maybe Style
[themeBulletListMarkers] :: Theme -> !Maybe Text
[themeOrderedList] :: Theme -> !Maybe Style
[themeBlockQuote] :: Theme -> !Maybe Style
[themeDefinitionTerm] :: Theme -> !Maybe Style
[themeDefinitionList] :: Theme -> !Maybe Style
[themeTableHeader] :: Theme -> !Maybe Style
[themeTableSeparator] :: Theme -> !Maybe Style
[themeLineBlock] :: Theme -> !Maybe Style
[themeEmph] :: Theme -> !Maybe Style
[themeStrong] :: Theme -> !Maybe Style
[themeUnderline] :: Theme -> !Maybe Style
[themeCode] :: Theme -> !Maybe Style
[themeLinkText] :: Theme -> !Maybe Style
[themeLinkTarget] :: Theme -> !Maybe Style
[themeStrikeout] :: Theme -> !Maybe Style
[themeQuoted] :: Theme -> !Maybe Style
[themeMath] :: Theme -> !Maybe Style
[themeImageText] :: Theme -> !Maybe Style
[themeImageTarget] :: Theme -> !Maybe Style
[themeSyntaxHighlighting] :: Theme -> !Maybe SyntaxHighlighting
defaultTheme :: Theme
newtype Style
Style :: [SGR] -> Style
[unStyle] :: Style -> [SGR]
newtype SyntaxHighlighting
SyntaxHighlighting :: Map String Style -> SyntaxHighlighting
[unSyntaxHighlighting] :: SyntaxHighlighting -> Map String Style
defaultSyntaxHighlighting :: SyntaxHighlighting
syntaxHighlight :: Theme -> TokenType -> Maybe Style
instance Data.Aeson.Types.ToJSON.ToJSON Patat.Theme.Theme
instance Data.Aeson.Types.FromJSON.FromJSON Patat.Theme.Theme
instance GHC.Show.Show Patat.Theme.Style
instance GHC.Base.Semigroup Patat.Theme.Style
instance GHC.Base.Monoid Patat.Theme.Style
instance Data.Aeson.Types.ToJSON.ToJSON Patat.Theme.SyntaxHighlighting
instance GHC.Show.Show Patat.Theme.SyntaxHighlighting
instance GHC.Base.Semigroup Patat.Theme.SyntaxHighlighting
instance GHC.Base.Monoid Patat.Theme.SyntaxHighlighting
instance GHC.Show.Show Patat.Theme.Theme
instance GHC.Base.Semigroup Patat.Theme.Theme
instance GHC.Base.Monoid Patat.Theme.Theme
instance Data.Aeson.Types.FromJSON.FromJSON Patat.Theme.SyntaxHighlighting
instance Data.Aeson.Types.ToJSON.ToJSON Patat.Theme.Style
instance Data.Aeson.Types.FromJSON.FromJSON Patat.Theme.Style

module Patat.Presentation.Internal
type Breadcrumbs = [(Int, [Inline])]
data Presentation
Presentation :: !FilePath -> ![Inline] -> ![Inline] -> !PresentationSettings -> [Slide] -> [Breadcrumbs] -> !Index -> Presentation
[pFilePath] :: Presentation -> !FilePath
[pTitle] :: Presentation -> ![Inline]
[pAuthor] :: Presentation -> ![Inline]
[pSettings] :: Presentation -> !PresentationSettings
[pSlides] :: Presentation -> [Slide]
[pBreadcrumbs] :: Presentation -> [Breadcrumbs]
[pActiveFragment] :: Presentation -> !Index

-- | These are patat-specific settings. That is where they differ from more
--   general metadata (author, title...)
data PresentationSettings
PresentationSettings :: !Maybe (FlexibleNum Int) -> !Maybe (FlexibleNum Int) -> !Maybe Margins -> !Maybe Bool -> !Maybe Theme -> !Maybe Bool -> !Maybe (FlexibleNum Int) -> !Maybe Int -> !Maybe ExtensionList -> !Maybe ImageSettings -> !Maybe Bool -> !Maybe EvalSettingsMap -> PresentationSettings
[psRows] :: PresentationSettings -> !Maybe (FlexibleNum Int)
[psColumns] :: PresentationSettings -> !Maybe (FlexibleNum Int)
[psMargins] :: PresentationSettings -> !Maybe Margins
[psWrap] :: PresentationSettings -> !Maybe Bool
[psTheme] :: PresentationSettings -> !Maybe Theme
[psIncrementalLists] :: PresentationSettings -> !Maybe Bool
[psAutoAdvanceDelay] :: PresentationSettings -> !Maybe (FlexibleNum Int)
[psSlideLevel] :: PresentationSettings -> !Maybe Int
[psPandocExtensions] :: PresentationSettings -> !Maybe ExtensionList
[psImages] :: PresentationSettings -> !Maybe ImageSettings
[psBreadcrumbs] :: PresentationSettings -> !Maybe Bool
[psEval] :: PresentationSettings -> !Maybe EvalSettingsMap
defaultPresentationSettings :: PresentationSettings
data Margins
Margins :: !Maybe (FlexibleNum Int) -> !Maybe (FlexibleNum Int) -> Margins
[mLeft] :: Margins -> !Maybe (FlexibleNum Int)
[mRight] :: Margins -> !Maybe (FlexibleNum Int)
marginsOf :: PresentationSettings -> (Int, Int)
newtype ExtensionList
ExtensionList :: Extensions -> ExtensionList
[unExtensionList] :: ExtensionList -> Extensions
defaultExtensionList :: ExtensionList
data ImageSettings
ImageSettings :: !Text -> !Object -> ImageSettings
[isBackend] :: ImageSettings -> !Text
[isParams] :: ImageSettings -> !Object
type EvalSettingsMap = HashMap Text EvalSettings
data EvalSettings
EvalSettings :: !Text -> !Bool -> !Bool -> EvalSettings
[evalCommand] :: EvalSettings -> !Text
[evalReplace] :: EvalSettings -> !Bool
[evalFragment] :: EvalSettings -> !Bool
data Slide
ContentSlide :: Instructions Block -> Slide
TitleSlide :: Int -> [Inline] -> Slide
newtype Fragment
Fragment :: [Block] -> Fragment

-- | Active slide, active fragment.
type Index = (Int, Int)
getSlide :: Int -> Presentation -> Maybe Slide
numFragments :: Slide -> Int
data ActiveFragment
ActiveContent :: Fragment -> ActiveFragment
ActiveTitle :: Block -> ActiveFragment
getActiveFragment :: Presentation -> Maybe ActiveFragment
instance Data.Aeson.Types.FromJSON.FromJSON Patat.Presentation.Internal.Margins
instance Data.Aeson.Types.FromJSON.FromJSON Patat.Presentation.Internal.PresentationSettings
instance GHC.Show.Show Patat.Presentation.Internal.Margins
instance GHC.Show.Show Patat.Presentation.Internal.ExtensionList
instance GHC.Show.Show Patat.Presentation.Internal.ImageSettings
instance GHC.Show.Show Patat.Presentation.Internal.EvalSettings
instance GHC.Show.Show Patat.Presentation.Internal.PresentationSettings
instance GHC.Show.Show Patat.Presentation.Internal.Slide
instance GHC.Show.Show Patat.Presentation.Internal.Presentation
instance GHC.Show.Show Patat.Presentation.Internal.ActiveFragment
instance GHC.Base.Semigroup Patat.Presentation.Internal.PresentationSettings
instance GHC.Base.Monoid Patat.Presentation.Internal.PresentationSettings
instance Data.Aeson.Types.FromJSON.FromJSON Patat.Presentation.Internal.EvalSettings
instance Data.Aeson.Types.FromJSON.FromJSON Patat.Presentation.Internal.ImageSettings
instance Data.Aeson.Types.FromJSON.FromJSON Patat.Presentation.Internal.ExtensionList
instance GHC.Base.Semigroup Patat.Presentation.Internal.Margins
instance GHC.Base.Monoid Patat.Presentation.Internal.Margins

module Patat.Images
data Backend
data Handle
new :: ImageSettings -> IO Handle
drawImage :: Handle -> FilePath -> IO Cleanup

module Patat.Eval
eval :: Presentation -> IO Presentation
instance GHC.Show.Show Patat.Eval.EvalResult

module Patat.Presentation.Display.Table
data Table
Table :: Doc -> [Alignment] -> [Doc] -> [[Doc]] -> Table
[tCaption] :: Table -> Doc
[tAligns] :: Table -> [Alignment]
[tHeaders] :: Table -> [Doc]
[tRows] :: Table -> [[Doc]]
prettyTable :: Theme -> Table -> Doc

-- | This does not really belong in the module.
themed :: Maybe Style -> Doc -> Doc


-- | Displaying code blocks, optionally with syntax highlighting.
module Patat.Presentation.Display.CodeBlock
prettyCodeBlock :: Theme -> [Text] -> Text -> Doc


-- | Read a presentation from disk.
module Patat.Presentation.Read
readPresentation :: FilePath -> IO (Either String Presentation)

-- | Read settings from the metadata block in the Pandoc document.
readMetaSettings :: Text -> Either String PresentationSettings


-- | Module that allows the user to interact with the presentation
module Patat.Presentation.Interactive
data PresentationCommand
Exit :: PresentationCommand
Forward :: PresentationCommand
Backward :: PresentationCommand
SkipForward :: PresentationCommand
SkipBackward :: PresentationCommand
First :: PresentationCommand
Last :: PresentationCommand
Reload :: PresentationCommand
Seek :: Int -> PresentationCommand
UnknownCommand :: String -> PresentationCommand
readPresentationCommand :: Handle -> IO PresentationCommand
data UpdatedPresentation
UpdatedPresentation :: !Presentation -> UpdatedPresentation
ExitedPresentation :: UpdatedPresentation
ErroredPresentation :: String -> UpdatedPresentation
updatePresentation :: PresentationCommand -> Presentation -> IO UpdatedPresentation
instance GHC.Show.Show Patat.Presentation.Interactive.PresentationCommand
instance GHC.Classes.Eq Patat.Presentation.Interactive.PresentationCommand
instance GHC.Show.Show Patat.Presentation.Interactive.UpdatedPresentation

module Patat.Presentation.Display
data Size
getDisplaySize :: Presentation -> IO Size
data Display
DisplayDoc :: Doc -> Display
DisplayImage :: FilePath -> Display
displayPresentation :: Size -> Presentation -> Display

-- | Displays an error in the place of the presentation. This is useful if
--   we want to display an error but keep the presentation running.
displayPresentationError :: Size -> Presentation -> String -> Doc
dumpPresentation :: Presentation -> IO ()
instance GHC.Show.Show Patat.Presentation.Display.Size
instance GHC.Show.Show Patat.Presentation.Display.Display

module Patat.Presentation

-- | These are patat-specific settings. That is where they differ from more
--   general metadata (author, title...)
data PresentationSettings
PresentationSettings :: !Maybe (FlexibleNum Int) -> !Maybe (FlexibleNum Int) -> !Maybe Margins -> !Maybe Bool -> !Maybe Theme -> !Maybe Bool -> !Maybe (FlexibleNum Int) -> !Maybe Int -> !Maybe ExtensionList -> !Maybe ImageSettings -> !Maybe Bool -> !Maybe EvalSettingsMap -> PresentationSettings
[psRows] :: PresentationSettings -> !Maybe (FlexibleNum Int)
[psColumns] :: PresentationSettings -> !Maybe (FlexibleNum Int)
[psMargins] :: PresentationSettings -> !Maybe Margins
[psWrap] :: PresentationSettings -> !Maybe Bool
[psTheme] :: PresentationSettings -> !Maybe Theme
[psIncrementalLists] :: PresentationSettings -> !Maybe Bool
[psAutoAdvanceDelay] :: PresentationSettings -> !Maybe (FlexibleNum Int)
[psSlideLevel] :: PresentationSettings -> !Maybe Int
[psPandocExtensions] :: PresentationSettings -> !Maybe ExtensionList
[psImages] :: PresentationSettings -> !Maybe ImageSettings
[psBreadcrumbs] :: PresentationSettings -> !Maybe Bool
[psEval] :: PresentationSettings -> !Maybe EvalSettingsMap
defaultPresentationSettings :: PresentationSettings
data Presentation
Presentation :: !FilePath -> ![Inline] -> ![Inline] -> !PresentationSettings -> [Slide] -> [Breadcrumbs] -> !Index -> Presentation
[pFilePath] :: Presentation -> !FilePath
[pTitle] :: Presentation -> ![Inline]
[pAuthor] :: Presentation -> ![Inline]
[pSettings] :: Presentation -> !PresentationSettings
[pSlides] :: Presentation -> [Slide]
[pBreadcrumbs] :: Presentation -> [Breadcrumbs]
[pActiveFragment] :: Presentation -> !Index
readPresentation :: FilePath -> IO (Either String Presentation)
data Size
getDisplaySize :: Presentation -> IO Size
data Display
DisplayDoc :: Doc -> Display
DisplayImage :: FilePath -> Display
displayPresentation :: Size -> Presentation -> Display

-- | Displays an error in the place of the presentation. This is useful if
--   we want to display an error but keep the presentation running.
displayPresentationError :: Size -> Presentation -> String -> Doc
dumpPresentation :: Presentation -> IO ()
data PresentationCommand
Exit :: PresentationCommand
Forward :: PresentationCommand
Backward :: PresentationCommand
SkipForward :: PresentationCommand
SkipBackward :: PresentationCommand
First :: PresentationCommand
Last :: PresentationCommand
Reload :: PresentationCommand
Seek :: Int -> PresentationCommand
UnknownCommand :: String -> PresentationCommand
readPresentationCommand :: Handle -> IO PresentationCommand
data UpdatedPresentation
UpdatedPresentation :: !Presentation -> UpdatedPresentation
ExitedPresentation :: UpdatedPresentation
ErroredPresentation :: String -> UpdatedPresentation
updatePresentation :: PresentationCommand -> Presentation -> IO UpdatedPresentation

module Patat.AutoAdvance

-- | This function takes an existing channel for presentation commands
--   (presumably coming from human input) and creates a new one that
--   <i>also</i> sends a <a>Forward</a> command if nothing happens for N
--   seconds.
autoAdvance :: Int -> Chan PresentationCommand -> IO (Chan PresentationCommand)

module Patat.Main
main :: IO ()
instance GHC.Show.Show Patat.Main.Options
