Safe Haskell | None |
---|
- data ShellCommand
- data KernelEffect where
- Apply :: (Injection ModGuts g, Walker HermitC g) => RewriteH g -> KernelEffect
- Pathfinder :: (Injection ModGuts g, Walker HermitC g) => TranslateH g LocalPathH -> KernelEffect
- Direction :: Direction -> KernelEffect
- BeginScope :: KernelEffect
- EndScope :: KernelEffect
- Delete :: SAST -> KernelEffect
- CorrectnessCritera :: (Injection ModGuts g, Walker HermitC g) => TranslateH g () -> KernelEffect
- data ShellEffect where
- CLSModify :: (CommandLineState -> IO CommandLineState) -> ShellEffect
- data QueryFun where
- message :: String -> QueryFun
- type RewriteName = String
- data MetaCommand
- loadAndRun :: FilePath -> MetaCommand
- data VersionCmd
- data CLException
- newtype CLM m a = CLM {
- unCLM :: ErrorT CLException (StateT CommandLineState m) a
- abort :: Monad m => CLM m ()
- resume :: Monad m => SAST -> CLM m ()
- continue :: Monad m => CommandLineState -> CLM m ()
- runCLM :: CommandLineState -> CLM m a -> m (Either CLException a, CommandLineState)
- iokm2clm' :: MonadIO m => String -> (a -> CLM m b) -> IO (KureM a) -> CLM m b
- iokm2clm :: MonadIO m => String -> IO (KureM a) -> CLM m a
- iokm2clm'' :: MonadIO m => IO (KureM a) -> CLM m a
- data VersionStore = VersionStore {}
- newSAST :: ExprH -> SAST -> CommandLineState -> CommandLineState
- data CommandLineState = CommandLineState {
- cl_cursor :: SAST
- cl_pretty :: PrettyH CoreTC
- cl_pretty_opts :: PrettyOptions
- cl_render :: Handle -> PrettyOptions -> Either String DocH -> IO ()
- cl_height :: Int
- cl_nav :: Bool
- cl_running_script :: Bool
- cl_tick :: TVar (Map String Int)
- cl_corelint :: Bool
- cl_diffonly :: Bool
- cl_failhard :: Bool
- cl_window :: PathH
- cl_dict :: Dictionary
- cl_scripts :: [(ScriptName, Script)]
- cl_kernel :: ScopedKernel
- cl_initSAST :: SAST
- cl_version :: VersionStore
- type ScriptName = String
Documentation
data ShellCommand Source
There are four types of commands.
KernelEffect KernelEffect | Command that modifies the state of the (scoped) kernel. |
ShellEffect ShellEffect | Command that modifies the state of the shell. |
QueryFun QueryFun | Command that queries the AST with a Translate (read only). |
MetaCommand MetaCommand | Command that otherwise controls HERMIT (abort, resume, save, etc). |
data KernelEffect whereSource
KernelEffects are things that affect the state of the Kernel - Apply a rewrite (giving a whole new lower-level AST). - Change the current location using a computed path. - Change the currect location using directions. - Begin or end a scope. - Delete an AST - Run a precondition or other predicate that must not fail.
Apply :: (Injection ModGuts g, Walker HermitC g) => RewriteH g -> KernelEffect | |
Pathfinder :: (Injection ModGuts g, Walker HermitC g) => TranslateH g LocalPathH -> KernelEffect | |
Direction :: Direction -> KernelEffect | |
BeginScope :: KernelEffect | |
EndScope :: KernelEffect | |
Delete :: SAST -> KernelEffect | |
CorrectnessCritera :: (Injection ModGuts g, Walker HermitC g) => TranslateH g () -> KernelEffect |
data ShellEffect whereSource
CLSModify :: (CommandLineState -> IO CommandLineState) -> ShellEffect |
type RewriteName = StringSource
data MetaCommand Source
loadAndRun :: FilePath -> MetaCommandSource
A composite meta-command for running a loaded script immediately. The script is given the same name as the filepath.
data CLException Source
Error CLException | |
Monad m => MonadError CLException (CLM m) |
CLM | |
|
MonadTrans CLM | |
Monad m => MonadState CommandLineState (CLM m) | |
Monad m => MonadError CLException (CLM m) | |
Monad m => Monad (CLM m) | Our own custom instance of Monad for CLM m so we don't have to depend on newtype deriving to do the right thing for fail. |
Functor m => Functor (CLM m) | |
(Monad m, Functor m) => Applicative (CLM m) | |
MonadIO m => MonadIO (CLM m) | |
Monad m => MonadCatch (CLM m) |
continue :: Monad m => CommandLineState -> CLM m ()Source
runCLM :: CommandLineState -> CLM m a -> m (Either CLException a, CommandLineState)Source
iokm2clm'' :: MonadIO m => IO (KureM a) -> CLM m aSource
data VersionStore Source
newSAST :: ExprH -> SAST -> CommandLineState -> CommandLineStateSource
data CommandLineState Source
CommandLineState | |
|
Monad m => MonadState CommandLineState (CLM m) |
type ScriptName = StringSource