Karya, built on Sun Nov 26 01:04:37 PST 2017 (patch 0a920b2bde70c0cbac8ee09d158064798b61bbe5)

Safe HaskellNone

App.ReplProtocol

Contents

Description

Define the protocol between the sequencer's repl port and the repl client.

Synopsis

types

data Query Source #

This is a simple RPC mechanism.

data Response Source #

Constructors

RSaveFile !(Maybe IO.FilePath)

current save file

RCommand !CmdResult 
RCompletion ![Text]

possible completions for the prefix

data Result Source #

Constructors

Raw !Text

Print this text directly, without formatting it.

Format !Text

Format and print.

Edit !Editor 

data Editor Source #

Open an editor locally.

Constructors

Editor 

Fields

data File Source #

Constructors

FileName !IO.FilePath

open this file

Text !Text

open this text in a temp file

Instances

protocol

query_save_file :: PortID -> IO.IO (Maybe (Maybe IO.FilePath)) Source #

Ask for the current save filename. Nothing for an error, and Just Nothing for no save file.

format

format_result :: CmdResult -> Text Source #

Format the response and strip trailing whitespace.