fpco-api- Simple interface to the FP Complete IDE API.

Safe HaskellNone




newtype ByteString64 Source

The standard ByteString instances in aeson are broken: they assume UTF8 encoding. This type instead uses base64 for proper round-tripping.



data FileUpdate Source

When a file in the project representation is changed by a ProjectUpdate request, it often results in a change reflected in what we know about the file. This change is reported in the UpdateActions structure using this FileUpdate type.

data TargetUpdate Source

A project's target is a single module containing a function named main. This type reflects if any change in the current target has been made.

data UpdateActions Source

After a ProjectUpdate request is processed, a set of UpdateActions will result to reflect what changes have been made to the project representation (and subsequently, what changes may need to be reflected in the ide-backend, the database, and other caches).

data CompileDesc Source

Describe a compilation which has been accepted by the isolation-runner. This includes sufficient information to tell what is "in" the compilation, and to distinguish it from any other compilation.

type FayTutorialToken = TutorialConcurrentToken Source

A token for the tutorial.

jobStillRunningTimeoutSeconds :: Int Source

The timing separation between JobStillRunning messages. Note that the actual interval will always be larger than this due to network overhead, etc.

data ProjectMessagesOutput Source




pmoStatusSnap :: Maybe ProjectStatusSnapshot

Note: The usage of Maybe here is purely a bandwidth optimization. Semantically, it is more correct to simply include the snapshot each time. To avoid passing back the same information, however, the snapshot is only transferred when the current hash does not match the hash provided in the request.

pmoStatusHash :: StatusHash

The current hash at the time messages were returned.

pmoLastMessage :: Integer

The highest message ID we've yet seen, used as next argument in ProjectMessagesInput to avoid looking at the same messages again.

pmoMessages :: [RunnerMessage]
pmoMailboxId :: MailboxId

data RunnerMessage Source


ProjectMessage LogLevel Text 
ProcessOutput ProcId Text 
ProcessStopped ProcId ProcessResult 
GitShellOutput GitShellId GitShellOutput 
CompileComplete CompileId CompileResult 
ProjectHasOpened SessionId 
ProjectHasClosed SessionId Bool Text

If the Bool is True, it indicates that the client should resume polling for project messages from a newly created project. If False, there is some more severe problem initiating the project, and the client should let the user know that the project may require manual recovery.

IdeCommandOutput JobId Text

FIXME At some point in the future, it would be nice to replace the second Text with a Value, to make it clear that we're encoding arbitrary JSON values. This is semantically more correct, and more efficient, but requires changes to the Fay encode/decode code, and therefore is not trivial to implement.

JobException JobId Text 
JobStillRunning JobId

Indicates to the client that a job is still being actively worked on.

data SourceInfo Source

An error or warning in a source module.

Most errors are associated with a span of text, but some have only a location point.

data InfoChunkTag Source



Note: Ideally we'd distinguish identifiers, types, exprs, etc

ICTRefactor Text [(SourceSpan, Text)]

The Text is a description of the action (for use in hovertext), and the list stores the replacements that should be performed.


data PictureStatus Source

Status of a picture.




pictureName :: Text

The title to use in the IDE UI.

pictureUrl :: Text

URL of the actual image.

pictureHash :: Text

Hash of the file contents, whenever the picture changes this is updated.

data Progress Source

This type represents intermediate progress information during compilation.




progressStep :: Int

The current step number

When these Progress messages are generated from progress updates from ghc, it is entirely possible that we might get step 426, 1626, 3/26; the steps may not be continuous, might even be out of order, and may not finish at X/X.

progressNumSteps :: Int

The total number of steps

progressMsg :: Text

The parsed message. For instance, in the case of progress messages during compilation, progressOrigMsg might be

[1 of 2] Compiling M (some/path/to/file.hs, some/other/path/to/file.o)

while progressMsg will just be 'Compiling M'

data ErrorsAnd x Source


ErrorsAnd [String] (Maybe (Automatic x)) 


Eq x => Eq (ErrorsAnd x) 
Data x => Data (ErrorsAnd x) 
Read x => Read (ErrorsAnd x) 
Show x => Show (ErrorsAnd x) 
Typeable (* -> *) ErrorsAnd