exploring-interpreters-1.4.0.0: A generic exploring interpreter for exploratory programming
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Explorer.Tools.Protocol

Documentation

type ExplorerParser p m c o = (Explorer p m c o, String -> Maybe p) Source #

type EIP p m c o = RWST (String -> Maybe p) ByteString (Explorer p m c o) m Source #

class ExplorerPostValue p c o where Source #

Minimal complete definition

Nothing

Methods

postExecute :: Explorer p m c o -> Explorer p m c o -> o -> Value Source #

postJump :: Explorer p m c o -> Explorer p m c o -> Value Source #

postRevert :: Explorer p m c o -> Explorer p m c o -> [Ref] -> Value Source #

data RequestMessage Source #

Constructors

RequestMessage 

Instances

Instances details
FromJSON RequestMessage Source # 
Instance details

Defined in Language.Explorer.Tools.Protocol

ToJSON RequestMessage Source # 
Instance details

Defined in Language.Explorer.Tools.Protocol

Generic RequestMessage Source # 
Instance details

Defined in Language.Explorer.Tools.Protocol

Associated Types

type Rep RequestMessage :: Type -> Type #

Show RequestMessage Source # 
Instance details

Defined in Language.Explorer.Tools.Protocol

type Rep RequestMessage Source # 
Instance details

Defined in Language.Explorer.Tools.Protocol

type Rep RequestMessage = D1 ('MetaData "RequestMessage" "Language.Explorer.Tools.Protocol" "exploring-interpreters-1.4.0.0-EP4IQ6ofril6gCKSnbbHJe" 'False) (C1 ('MetaCons "RequestMessage" 'PrefixI 'True) ((S1 ('MetaSel ('Just "jsonrpc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "req_id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)) :*: (S1 ('MetaSel ('Just "method") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "params") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Value)))))

data ErrorMessage Source #

Constructors

ErrorMessage 

Instances

Instances details
FromJSON ErrorMessage Source # 
Instance details

Defined in Language.Explorer.Tools.Protocol

ToJSON ErrorMessage Source # 
Instance details

Defined in Language.Explorer.Tools.Protocol

Generic ErrorMessage Source # 
Instance details

Defined in Language.Explorer.Tools.Protocol

Associated Types

type Rep ErrorMessage :: Type -> Type #

Show ErrorMessage Source # 
Instance details

Defined in Language.Explorer.Tools.Protocol

type Rep ErrorMessage Source # 
Instance details

Defined in Language.Explorer.Tools.Protocol

type Rep ErrorMessage = D1 ('MetaData "ErrorMessage" "Language.Explorer.Tools.Protocol" "exploring-interpreters-1.4.0.0-EP4IQ6ofril6gCKSnbbHJe" 'False) (C1 ('MetaCons "ErrorMessage" 'PrefixI 'True) (S1 ('MetaSel ('Just "code") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: (S1 ('MetaSel ('Just "message") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "error_data") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Value)))))

data JumpParams Source #

Constructors

JumpParams 

Fields

Instances

Instances details
FromJSON JumpParams Source # 
Instance details

Defined in Language.Explorer.Tools.Protocol

data JumpResult Source #

Constructors

JumpResult 

Fields

data ExecuteParams Source #

Constructors

ExecuteParams 

Fields

Instances

Instances details
FromJSON ExecuteParams Source # 
Instance details

Defined in Language.Explorer.Tools.Protocol

Generic ExecuteParams Source # 
Instance details

Defined in Language.Explorer.Tools.Protocol

Associated Types

type Rep ExecuteParams :: Type -> Type #

Show ExecuteParams Source # 
Instance details

Defined in Language.Explorer.Tools.Protocol

type Rep ExecuteParams Source # 
Instance details

Defined in Language.Explorer.Tools.Protocol

type Rep ExecuteParams = D1 ('MetaData "ExecuteParams" "Language.Explorer.Tools.Protocol" "exploring-interpreters-1.4.0.0-EP4IQ6ofril6gCKSnbbHJe" 'False) (C1 ('MetaCons "ExecuteParams" 'PrefixI 'True) (S1 ('MetaSel ('Just "program") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)))

data RevertParams Source #

Constructors

RevertParams 

Fields

Instances

Instances details
FromJSON RevertParams Source # 
Instance details

Defined in Language.Explorer.Tools.Protocol

data DerefParams Source #

Constructors

DerefParams 

Fields

Instances

Instances details
FromJSON DerefParams Source # 
Instance details

Defined in Language.Explorer.Tools.Protocol

data TraceParams Source #

Constructors

TraceParams 

Fields

Instances

Instances details
FromJSON TraceParams Source # 
Instance details

Defined in Language.Explorer.Tools.Protocol

Generic TraceParams Source # 
Instance details

Defined in Language.Explorer.Tools.Protocol

Associated Types

type Rep TraceParams :: Type -> Type #

type Rep TraceParams Source # 
Instance details

Defined in Language.Explorer.Tools.Protocol

type Rep TraceParams = D1 ('MetaData "TraceParams" "Language.Explorer.Tools.Protocol" "exploring-interpreters-1.4.0.0-EP4IQ6ofril6gCKSnbbHJe" 'False) (C1 ('MetaCons "TraceParams" 'PrefixI 'True) (S1 ('MetaSel ('Just "reference") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))

data Edge Source #

Constructors

Edge 

Fields

Instances

Instances details
ToJSON Edge Source # 
Instance details

Defined in Language.Explorer.Tools.Protocol

Generic Edge Source # 
Instance details

Defined in Language.Explorer.Tools.Protocol

Associated Types

type Rep Edge :: Type -> Type #

Methods

from :: Edge -> Rep Edge x #

to :: Rep Edge x -> Edge #

type Rep Edge Source # 
Instance details

Defined in Language.Explorer.Tools.Protocol

type Rep Edge = D1 ('MetaData "Edge" "Language.Explorer.Tools.Protocol" "exploring-interpreters-1.4.0.0-EP4IQ6ofril6gCKSnbbHJe" 'False) (C1 ('MetaCons "Edge" 'PrefixI 'True) (S1 ('MetaSel ('Just "source") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: (S1 ('MetaSel ('Just "target") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "label") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 EdgeLabel))))

data EdgeLabel Source #

Constructors

EdgeLabel 

Fields

Instances

Instances details
ToJSON EdgeLabel Source # 
Instance details

Defined in Language.Explorer.Tools.Protocol

Generic EdgeLabel Source # 
Instance details

Defined in Language.Explorer.Tools.Protocol

Associated Types

type Rep EdgeLabel :: Type -> Type #

type Rep EdgeLabel Source # 
Instance details

Defined in Language.Explorer.Tools.Protocol

type Rep EdgeLabel = D1 ('MetaData "EdgeLabel" "Language.Explorer.Tools.Protocol" "exploring-interpreters-1.4.0.0-EP4IQ6ofril6gCKSnbbHJe" 'False) (C1 ('MetaCons "EdgeLabel" 'PrefixI 'True) (S1 ('MetaSel ('Just "program") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Value) :*: S1 ('MetaSel ('Just "mval") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Value)))

data ExecutionTree Source #

Constructors

ExecutionTree 

Fields

Instances

Instances details
ToJSON ExecutionTree Source # 
Instance details

Defined in Language.Explorer.Tools.Protocol

Generic ExecutionTree Source # 
Instance details

Defined in Language.Explorer.Tools.Protocol

Associated Types

type Rep ExecutionTree :: Type -> Type #

type Rep ExecutionTree Source # 
Instance details

Defined in Language.Explorer.Tools.Protocol

type Rep ExecutionTree = D1 ('MetaData "ExecutionTree" "Language.Explorer.Tools.Protocol" "exploring-interpreters-1.4.0.0-EP4IQ6ofril6gCKSnbbHJe" 'False) (C1 ('MetaCons "ExecutionTree" 'PrefixI 'True) (S1 ('MetaSel ('Just "current") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: (S1 ('MetaSel ('Just "references") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Int]) :*: S1 ('MetaSel ('Just "edges") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Edge]))))

data PathParams Source #

Constructors

PathParams 

Fields

Instances

Instances details
FromJSON PathParams Source # 
Instance details

Defined in Language.Explorer.Tools.Protocol

Generic PathParams Source # 
Instance details

Defined in Language.Explorer.Tools.Protocol

Associated Types

type Rep PathParams :: Type -> Type #

type Rep PathParams Source # 
Instance details

Defined in Language.Explorer.Tools.Protocol

type Rep PathParams = D1 ('MetaData "PathParams" "Language.Explorer.Tools.Protocol" "exploring-interpreters-1.4.0.0-EP4IQ6ofril6gCKSnbbHJe" 'False) (C1 ('MetaCons "PathParams" 'PrefixI 'True) (S1 ('MetaSel ('Just "source") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "target") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))

allRefs :: Explorer p IO c o -> [(Ref, c)] Source #

deref :: (Eq o, Monoid o, Eq p, ToJSON c) => Value -> ExceptT ErrorMessage (EIP p IO c o) Value Source #

intProg :: Int -> Int -> IO (Maybe Int, ()) Source #

serve :: (Eq o, Monoid o, ToJSON o, Eq p, ToJSON p, ToJSON c, ExplorerPostValue p c o) => String -> Explorer p IO c o -> (String -> Maybe p) -> IO () Source #

acceptCommand :: (Monoid o, Eq o, Eq p, ToJSON o, ToJSON p, ToJSON c, ExplorerPostValue p c o) => Explorer p IO c o -> (String -> Maybe p) -> Socket -> ByteString -> IO (Explorer p IO c o) Source #