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

Safe HaskellNone




type Returns' a = Returns (CanFail a) Source

failure :: MonadFail m => Text -> m a Source

mapCanFailT :: (m (CanFail a) -> n (CanFail b)) -> CanFailT m a -> CanFailT n b Source

eitherFail :: MonadFail m => m (Either Text a) -> m a Source

tryOrFail :: (MonadBaseControl IO m, MonadFail m) => m a -> m (CanFail a) Source

Try the given action, returning a Failure if it throw a RunnerException, otherwise returning Success or propagation any exceptions.

maybeFail :: MonadFail m => Text -> m (Maybe a) -> m a Source

newtype StCFR m a Source




unStCFR :: StM m (CanFail a)

data IdeCommand Source


GetInitialProjectInfo Text (Returns' InitialProjectInfo) 
ReparseProjectSettings (Returns' (Maybe RunnerProjectClosed)) 
SetSettings SetSettingsInput (Returns' (Either CompileIdent RunnerProjectClosed)) 
SetPublic Bool (Returns' ()) 
GetPublic (Returns' Bool) 
SetProjectMetadata Text Text (Returns' ()) 
SaveProjectState ProjectState Text (Returns' ()) 
DeleteProject Text (Returns' ()) 
ResetProjectSettings Text (Returns' RunnerProjectClosed) 
SdistTarball (Returns' (Either Text SdistTarballInfo)) 
RestartBackend Text (Returns' RunnerProjectClosed) 
GenerateHaddocks (Returns' Text) 
Ping (Returns' ()) 
AddFile NewFileInfo (Returns' SaveFileOutput) 
SaveFile EncFileName Text FayTutorialToken (Returns' SaveFileOutput) 
DeleteFile EncFileName (Returns' (Maybe CompileDesc)) 
RenameFile EncFileName NewFileInfo RenameType (Returns' RenameFileOutput) 
GetFile EncFileName (Returns' FayFileContent) 
GetFileToken EncFileName (Returns' FayTutorialToken) 
GetAllFiles (Returns' [FileDesc]) 
SetModuleExclusion EncFileName Bool (Returns' (Maybe CompileDesc)) 
ReformatModule EncFileName (Returns' (Maybe CompileDesc)) 
RenderFileMarkdown EncFileName (Returns' HtmlReply) 
GetTypeInfo SourceSpan (Returns' (Maybe TypeInfo)) 
GetTypeInfoDominators SourceSpan (Returns' [TypeInfo]) 
GetFindUsages SourceSpan (Returns' [SearchResult]) 
GetDefinitionSource SourceSpan (Returns' IdInfo) 
GetAutocompletions AutoCompleteInput (Returns' [Text]) 
IdeHoogleSearch (Maybe EncFileName) Bool Int Int Int Text (Returns' (Text, [HoogleResult], Maybe Int))

module context, is it exact?, number to query, offset in result, number to yield, query contents

SearchProject SearchQuery Int Int Bool (Returns' [SearchResult])

query, offset, limit, case sensitive?

SetTarget (Maybe (Either EncFileName RunConfigId)) (Returns' (Maybe CompileDesc)) 
GetTarget (Returns' (Maybe (Either EncFileName RunConfigId))) 
RunTarget Bool (Returns' ProcId)

True == run compiled code, False == run bytecode jww (2014-02-04): Make these use the current target.

CompileBinary EncFileName [(Text, Text)] (Returns' UploadedBuild)

module to compile and extra files to include in tarball

GetGitHistory Int Int (Returns' [GitHistoryItem]) 
IsProjectDirty (Returns' Bool) 
SetRoot Text Text (Returns' CompileDesc) 
SetRemotes RemotesList (Returns' ()) 
GetGitConfig Text (Returns' Text) 
SetGitConfig Text Text (Returns' ()) 
GitCommit Text (Returns' CommitSHA)

Text == Log message

GitReset (Returns' RunnerProjectClosed) 
GitPush Text (Returns' GitPushResult)

Text == URL

GitPushIgnoreDirty Text (Returns' ())

Text == URL

GitPull Text (Returns' GitPullResult)

Text == URL

GitMergeAbort (Returns' RunnerProjectClosed)

Text == URL

GitMergeDone MaybeText (Returns' GitResolvedResult)

Text == URL, Msg

GitResolveFile EncFileName (Returns' ()) 
GitDiff (Returns' Text) 
StartGitShell (Returns' GitShellId) 
GitShellInput GitShellId Text (Returns' ()) 
ApplyGitShell GitShellId (Returns' RunnerProjectClosed) 
CancelGitShell GitShellId (Returns' ()) 
CreateBranch BranchName CommitName (Returns' ()) 
DeleteBranch BranchName (Returns' ()) 
CheckoutBranch BranchName (Returns' GitCheckoutResult) 
RenameRefactoring SourceSpan Text RefactoringContext (Returns' RefactoringOutput) 
ExtractRefactoring SourceSpan Text RefactoringContext (Returns' RefactoringOutput) 
GetKeterYaml FayDeploymentId ModuleName (Returns' KeterYaml) 
SetRunConfigs [(RunConfigId, RunConfig)] (Returns' ()) 
SetDeployments [(FayDeploymentId, Deployment)] (Returns' ()) 
GetNewRunConfig (Returns' NewRunConfig) 
GetNewDeployment (Returns' NewDeployment) 
GetNewWebApp FayDeploymentId (Returns' NewWebApp) 
GetNewBgJob FayDeploymentId (Returns' NewBgJob) 
CheckHostName Text (Returns' UseHostName) 
GetRandomHostName (Returns' RandomHostName) 
GetDeploymentManagerInfo (Returns' DeploymentManagerInfo) 
PutStdin ProcId Text (Returns' Bool)

Bool == whether the stdin was successfully delivered

StopRunningCode (Returns' ()) 
StartInteractive [FileToRun] (Returns' (ErrorsAnd ProcId))

Text == GHC environment, Just result gives a failure

StartInteractiveWeb [FileToRun] (Returns' (ErrorsAnd ApprootPid)) 
HoogleSearch Bool Text Text (Returns' FayHoogleResults)

Bool == is it an exact search?, module source code for import statement, query

GetConflictingPackages (Returns' [[(Bool, Text)]]) 

data TextReply Source

A simple text reply.




unTextReply :: Text

data HtmlReply Source

An html reply.




unHtmlReply :: Text

data NewBgJob Source

Make a new background job.


NewBgJob (FayBgJobId, BgJob) 

data UseHostName Source

Result of trying to use a hostname.



Host name is in use by someone else, can't be used.


Host name was already or has now been registered and is now in use.


Couldn't register the hostname due to quota.


Invalid hostname.

data ExpiryTime Source

A date of expiration, if any.


ExpiryTime (Maybe Integer) 

data Theme Source

Themes supported by the IDE.