-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Library to build tiny apps in Haskell -- -- Library to build tiny apps in Haskell such a REPLs @package tinyapp @version 0.1.0.2 -- | Build REPL apps module TinyApp.Repl -- | Signals whether the REPL should continue asking input from the user or -- exit. data ContinueExit Continue :: ContinueExit Exit :: ContinueExit -- | Defines a REPL application that is not allows to perform arbitrary IO -- while executing. data Sandbox state Sandbox :: state -> (state -> String) -> (String -> state -> (state, String, ContinueExit)) -> Sandbox state -- | Initial state [initialize] :: Sandbox state -> state -- | The prompt to show. It can depend on the state [prompt] :: Sandbox state -> state -> String -- | Process the user input given the current state Returns the next state, -- the output and whether to continue or not the program [update] :: Sandbox state -> String -> state -> (state, String, ContinueExit) -- | Executes the REPL application. runRepl :: Sandbox s -> IO () -- | Executes the REPL application returning its final state. runRepl' :: forall s. Sandbox s -> IO s instance GHC.Show.Show TinyApp.Repl.ContinueExit instance GHC.Classes.Eq TinyApp.Repl.ContinueExit