purescript-0.15.15: PureScript Programming Language Compiler

Safe Haskell | None
Language | Haskell2010

Language.PureScript.Publish

Synopsis

- preparePackage :: PublishOptions -> IO (Either PackageError UploadedPackage)
- preparePackage' :: PublishOptions -> PrepareM UploadedPackage
- unsafePreparePackage :: PublishOptions -> IO UploadedPackage
- data PrepareM a
- runPrepareM :: PrepareM a -> IO (Either PackageError (a, [PackageWarning]))
- warn :: PackageWarning -> PrepareM ()
- userError :: UserError -> PrepareM a
- internalError :: InternalError -> PrepareM a
- otherError :: OtherError -> PrepareM a
- data PublishOptions = PublishOptions {
  - publishGetVersion :: PrepareM (Text, Version)
  - publishGetTagTime :: Text -> PrepareM UTCTime
  - publishWorkingTreeDirty :: PrepareM ()
  - publishCompileOutputDir :: FilePath
  - publishManifestFile :: FilePath
  - publishResolutionsFile :: FilePath
  }
- defaultPublishOptions :: PublishOptions
- getGitWorkingTreeStatus :: FilePath -> PrepareM TreeStatus
- checkCleanWorkingTree :: PublishOptions -> PrepareM ()
- getVersionFromGitTag :: PrepareM (Text, Version)
- getManifestRepositoryInfo :: PackageMeta -> PrepareM (GithubUser, GithubRepo)
- getModules :: PublishOptions -> [(PackageName, FilePath)] -> PrepareM ([Module], Map ModuleName PackageName)

# Documentation

preparePackage :: PublishOptions -> IO (Either PackageError UploadedPackage) #

Attempt to retrieve package metadata from the current directory. Returns a PackageError on failure

preparePackage' :: PublishOptions -> PrepareM UploadedPackage #

unsafePreparePackage :: PublishOptions -> IO UploadedPackage #

Attempt to retrieve package metadata from the current directory. Calls exitFailure if no package metadata could be retrieved.

data PrepareM a #

#### Instances

Instances details

MonadIO PrepareM # |
Instance details Defined in Language.PureScript.Publish Methods liftIO :: IO a -> PrepareM a #
Applicative PrepareM # |
Instance details Defined in Language.PureScript.Publish Methods pure :: a -> PrepareM a # (<*>) :: PrepareM (a -> b) -> PrepareM a -> PrepareM b # liftA2 :: (a -> b -> c) -> PrepareM a -> PrepareM b -> PrepareM c # (*>) :: PrepareM a -> PrepareM b -> PrepareM b # (<*) :: PrepareM a -> PrepareM b -> PrepareM a #
Functor PrepareM # |
Instance details Defined in Language.PureScript.Publish Methods fmap :: (a -> b) -> PrepareM a -> PrepareM b # (<$) :: a -> PrepareM b -> PrepareM a #
Monad PrepareM # |
Instance details Defined in Language.PureScript.Publish Methods (>>=) :: PrepareM a -> (a -> PrepareM b) -> PrepareM b # (>>) :: PrepareM a -> PrepareM b -> PrepareM b # return :: a -> PrepareM a #
MonadError PackageError PrepareM # |
Instance details Defined in Language.PureScript.Publish Methods throwError :: PackageError -> PrepareM a # catchError :: PrepareM a -> (PackageError -> PrepareM a) -> PrepareM a #
MonadWriter [PackageWarning] PrepareM # |
Instance details Defined in Language.PureScript.Publish Methods writer :: (a, [PackageWarning]) -> PrepareM a # tell :: [PackageWarning] -> PrepareM () # listen :: PrepareM a -> PrepareM (a, [PackageWarning]) # pass :: PrepareM (a, [PackageWarning] -> [PackageWarning]) -> PrepareM a #

runPrepareM :: PrepareM a -> IO (Either PackageError (a, [PackageWarning])) #

warn :: PackageWarning -> PrepareM () #

userError :: UserError -> PrepareM a #

internalError :: InternalError -> PrepareM a #

otherError :: OtherError -> PrepareM a #

data PublishOptions #

Constructors

PublishOptions |
Fields publishGetVersion :: PrepareM (Text, Version) How to obtain the version tag and version that the data being generated will refer to. publishGetTagTime :: Text -> PrepareM UTCTime How to obtain at what time the version was committed publishWorkingTreeDirty :: PrepareM () What to do when the working tree is dirty publishCompileOutputDir :: FilePath Compiler output directory (which must include up-to-date docs.json files for any modules we are producing docs for). publishManifestFile :: FilePath Path to the manifest file; a JSON file including information about the package, such as name, author, dependency version bounds. publishResolutionsFile :: FilePath Path to the resolutions file; a JSON file containing all of the package's dependencies, their versions, and their paths on the disk.

defaultPublishOptions :: PublishOptions #

getGitWorkingTreeStatus :: FilePath -> PrepareM TreeStatus #

checkCleanWorkingTree :: PublishOptions -> PrepareM () #

getVersionFromGitTag :: PrepareM (Text, Version) #

getManifestRepositoryInfo :: PackageMeta -> PrepareM (GithubUser, GithubRepo) #

getModules :: PublishOptions -> [(PackageName, FilePath)] -> PrepareM ([Module], Map ModuleName PackageName) #