hermit-0.3.1.0: Haskell Equational Reasoning Model-to-Implementation Tunnel

Safe HaskellNone

HERMIT.Kernel.Scoped

Synopsis

Documentation

data Direction Source

A primitive means of denoting navigation of a tree (within a local scope).

Constructors

L

Left

R

Right

U

Up

T

Top

type LocalPath = SnocPath

A SnocPath from a local origin.

moveLocally :: Direction -> LocalPathH -> LocalPathHSource

Movement confined within the local scope.

data ScopedKernel Source

An alternative HERMIT kernel, that provides scoping.

Constructors

ScopedKernel 

Fields

resumeS :: (MonadIO m, MonadCatch m) => SAST -> m ()
 
abortS :: MonadIO m => m ()
 
applyS :: (MonadIO m, MonadCatch m, Injection ModGuts g, Walker HermitC g) => RewriteH g -> HermitMEnv -> SAST -> m SAST
 
queryS :: (MonadIO m, MonadCatch m, Injection ModGuts g, Walker HermitC g) => TranslateH g a -> HermitMEnv -> SAST -> m a
 
deleteS :: (MonadIO m, MonadCatch m) => SAST -> m ()
 
listS :: MonadIO m => m [SAST]
 
pathS :: (MonadIO m, MonadCatch m) => SAST -> m [PathH]
 
modPathS :: (MonadIO m, MonadCatch m) => (LocalPathH -> LocalPathH) -> HermitMEnv -> SAST -> m SAST
 
beginScopeS :: (MonadIO m, MonadCatch m) => SAST -> m SAST
 
endScopeS :: (MonadIO m, MonadCatch m) => SAST -> m SAST
 
kernelS :: Kernel
 
toASTS :: (MonadIO m, MonadCatch m) => SAST -> m AST
 

newtype SAST Source

A handle for an AST combined with scoping information.

Constructors

SAST Int 

Instances

scopedKernel :: (ScopedKernel -> SAST -> IO ()) -> ModGuts -> CoreM ModGutsSource

Start a HERMIT client by providing an IO function that takes the initial ScopedKernel and inital SAST handle. The Modguts to CoreM Modguts' function required by GHC Plugins is returned.