-
Notifications
You must be signed in to change notification settings - Fork 9
Black Shell
Andy Gill edited this page May 15, 2015
·
6 revisions
We are adding a Black Shell to HERMIT. Rather than use the bash-style, string based, dynamically typed prompt, we can run GHCi within HERMIT.
GHCi> perform :: (Perform p) => p -> IO ()
Examples
GHCi> perform display
GHCi> perform betaRewrite
We have a union type of all black shell effects, and a perform function, that does them.
data TypedEffectH :: * -> * where
ShellEffectH :: ShellEffect -> TypedEffectH ()
RewriteLCoreH :: RewriteH LCore -> TypedEffectH ()
RewriteLCoreTCH :: RewriteH LCoreTC -> TypedEffectH ()
TransformLCorePathH :: TransformH LCore LocalPathH -> TypedEffectH ()
performTypedEffectH :: (MonadCatch m, CLMonad m) => TypedEffectH a -> m a
For now, all effects return (), but later we will have the transforms return the results of queries, so that the local black shell can use them.