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

Safe HaskellNone

Language.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 = SnocPathSource

The path within the current local scope.

moveLocally :: Direction -> LocalPathH -> LocalPathHSource

Movement confined within the local scope.

extendLocalPath :: Path crumb -> LocalPath crumb -> LocalPath crumbSource

Add a Path to the end of a LocalPath.

data ScopedKernel Source

An alternative HERMIT kernel, that provides scoping.

Constructors

ScopedKernel 

Fields

resumeS :: SAST -> IO (KureM ())
 
abortS :: IO ()
 
applyS :: forall g. (Injection ModGuts g, Walker HermitC g) => SAST -> RewriteH g -> HermitMEnv -> IO (KureM SAST)
 
queryS :: forall a g. (Injection ModGuts g, Walker HermitC g) => SAST -> TranslateH g a -> HermitMEnv -> IO (KureM a)
 
deleteS :: SAST -> IO (KureM ())
 
listS :: IO [SAST]
 
pathS :: SAST -> IO (KureM [PathH])
 
modPathS :: SAST -> (LocalPathH -> LocalPathH) -> HermitMEnv -> IO (KureM SAST)
 
beginScopeS :: SAST -> IO (KureM SAST)
 
endScopeS :: SAST -> IO (KureM SAST)
 
kernelS :: Kernel
 
toASTS :: SAST -> IO (KureM 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.