Safe Haskell | None |
---|
Language.HERMIT.Kernel.Scoped
- data Direction
- type LocalPath = SnocPath
- moveLocally :: Direction -> LocalPathH -> LocalPathH
- extendLocalPath :: Path crumb -> LocalPath crumb -> LocalPath crumb
- data ScopedKernel = ScopedKernel {
- 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 = SAST Int
- scopedKernel :: (ScopedKernel -> SAST -> IO ()) -> ModGuts -> CoreM ModGuts
Documentation
A primitive means of denoting navigation of a tree (within a local scope).
moveLocally :: Direction -> LocalPathH -> LocalPathHSource
Movement confined within the local scope.
extendLocalPath :: Path crumb -> LocalPath crumb -> LocalPath crumbSource
data ScopedKernel Source
An alternative HERMIT kernel, that provides scoping.
Constructors
ScopedKernel | |
Fields
|
A handle for an AST
combined with scoping information.
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.