| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Language.PureScript.Ide.Rebuild
Synopsis
- rebuildFileSync :: forall m. (Ide m, MonadLogger m, MonadError IdeError m) => FilePath -> Maybe FilePath -> Set CodegenTarget -> m Success
- rebuildFileAsync :: forall m. (Ide m, MonadLogger m, MonadError IdeError m) => FilePath -> Maybe FilePath -> Set CodegenTarget -> m Success
- rebuildFile :: (Ide m, MonadLogger m, MonadError IdeError m) => FilePath -> Maybe FilePath -> Set CodegenTarget -> (ReaderT IdeEnvironment (LoggingT IO) () -> m ()) -> m Success
Documentation
rebuildFileSync :: forall m. (Ide m, MonadLogger m, MonadError IdeError m) => FilePath -> Maybe FilePath -> Set CodegenTarget -> m Success Source #
rebuildFileAsync :: forall m. (Ide m, MonadLogger m, MonadError IdeError m) => FilePath -> Maybe FilePath -> Set CodegenTarget -> m Success Source #
Arguments
| :: (Ide m, MonadLogger m, MonadError IdeError m) | |
| => FilePath | The file to rebuild |
| -> Maybe FilePath | The file to use as the location for parsing and errors |
| -> Set CodegenTarget | The targets to codegen |
| -> (ReaderT IdeEnvironment (LoggingT IO) () -> m ()) | A runner for the second build with open exports |
| -> m Success |
Given a filepath performs the following steps:
- Reads and parses a PureScript module from the filepath.
- Builds a dependency graph for the parsed module from the already loaded ExternsFiles.
- Attempts to find an FFI definition file for the module by looking for a file with the same filepath except for a .js extension.
- Passes all the created artifacts to
rebuildModule. - If the rebuilding succeeds, returns a
RebuildSuccesswith the generated warnings, and if rebuilding fails, returns aRebuildErrorwith the generated errors.