reflex-ghci-0.1.5.4: A GHCi widget library for use in reflex applications
Safe HaskellNone
LanguageHaskell2010

Reflex.Process.GHCi

Description

  • Module: Reflex.Process.GHCi
  • Description: Run GHCi processes in a reflex application
Synopsis

Documentation

ghci Source #

Arguments

:: (TriggerEvent t m, PerformEvent t m, MonadIO (Performable m), PostBuild t m, MonadIO m, MonadFix m, MonadHold t m) 
=> CreateProcess

Command to run to enter GHCi

-> Maybe ByteString

Expression to evaluate whenever GHCi successfully loads modules

-> Event t ()

Ask GHCi to reload

-> m (Ghci t) 

Runs a GHCi process and reloads it whenever the provided event fires

ghciWatch :: (TriggerEvent t m, PerformEvent t m, MonadIO (Performable m), PostBuild t m, MonadIO m, MonadFix m, MonadHold t m) => CreateProcess -> Maybe ByteString -> m (Ghci t) Source #

Run a GHCi process that watches for changes to Haskell source files in the current directory and reloads if they are modified

data Ghci t Source #

The output of the GHCi process

Constructors

Ghci 

Fields

data Status Source #

The state of the GHCi process

Instances

Instances details
Eq Status Source # 
Instance details

Defined in Reflex.Process.GHCi

Methods

(==) :: Status -> Status -> Bool #

(/=) :: Status -> Status -> Bool #

Ord Status Source # 
Instance details

Defined in Reflex.Process.GHCi

Read Status Source # 
Instance details

Defined in Reflex.Process.GHCi

Show Status Source # 
Instance details

Defined in Reflex.Process.GHCi

moduleOutput Source #

Arguments

:: (Reflex t, MonadFix m, MonadHold t m) 
=> Behavior t Bool

Whether to clear the output on reload

-> Ghci t 
-> m (Dynamic t ByteString) 

Collect all the GHCi module output (i.e., errors, warnings, etc) and optionally clear every time GHCi reloads

execOutput Source #

Arguments

:: (Reflex t, MonadFix m, MonadHold t m) 
=> Behavior t Bool

Whether to clear the output on reload

-> Ghci t 
-> m (Dynamic t ByteString) 

Collect all the GHCi expression output (i.e., the output of the called function) and optionally clear every time GHCi reloads

collectOutput Source #

Arguments

:: (Reflex t, MonadFix m, MonadHold t m) 
=> Event t ()

Clear output

-> Event t ByteString

Output to add

-> m (Dynamic t ByteString) 

Collect output, appending new output to the end of the accumulator

statusMessage :: IsString a => Status -> a Source #

Describe the current status of GHCi in a human-readable way