Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype Make a = Make {}
- runMake :: Options -> Make a -> IO (Either MultipleErrors a, MultipleErrors)
- makeIO :: (MonadIO m, MonadError MultipleErrors m) => Text -> IO a -> m a
- getTimestamp :: (MonadIO m, MonadError MultipleErrors m) => FilePath -> m UTCTime
- getTimestampMaybe :: (MonadIO m, MonadError MultipleErrors m) => FilePath -> m (Maybe UTCTime)
- readTextFile :: (MonadIO m, MonadError MultipleErrors m) => FilePath -> m Text
- readJSONFile :: (MonadIO m, MonadError MultipleErrors m) => FromJSON a => FilePath -> m (Maybe a)
- readJSONFileIO :: FromJSON a => FilePath -> IO (Maybe a)
- readCborFile :: (MonadIO m, MonadError MultipleErrors m) => Serialise a => FilePath -> m (Maybe a)
- readCborFileIO :: Serialise a => FilePath -> IO (Maybe a)
- readExternsFile :: (MonadIO m, MonadError MultipleErrors m) => FilePath -> m (Maybe ExternsFile)
- hashFile :: (MonadIO m, MonadError MultipleErrors m) => FilePath -> m ContentHash
- writeTextFile :: FilePath -> ByteString -> Make ()
- writeJSONFile :: (MonadIO m, MonadError MultipleErrors m) => ToJSON a => FilePath -> a -> m ()
- writeCborFile :: (MonadIO m, MonadError MultipleErrors m) => Serialise a => FilePath -> a -> m ()
- writeCborFileIO :: Serialise a => FilePath -> a -> IO ()
- copyFile :: (MonadIO m, MonadError MultipleErrors m) => FilePath -> FilePath -> m ()
Implementation of Make API using files on disk
A monad for running make actions
Instances
MonadIO Make Source # | |
Defined in Language.PureScript.Make.Monad | |
Applicative Make Source # | |
Functor Make Source # | |
Monad Make Source # | |
MonadBaseControl IO Make Source # | |
MonadError MultipleErrors Make Source # | |
Defined in Language.PureScript.Make.Monad throwError :: MultipleErrors -> Make a # catchError :: Make a -> (MultipleErrors -> Make a) -> Make a # | |
MonadReader Options Make Source # | |
MonadWriter MultipleErrors Make Source # | |
Defined in Language.PureScript.Make.Monad writer :: (a, MultipleErrors) -> Make a # tell :: MultipleErrors -> Make () # listen :: Make a -> Make (a, MultipleErrors) # pass :: Make (a, MultipleErrors -> MultipleErrors) -> Make a # | |
MonadBase IO Make Source # | |
Defined in Language.PureScript.Make.Monad | |
type StM Make a Source # | |
Defined in Language.PureScript.Make.Monad |
runMake :: Options -> Make a -> IO (Either MultipleErrors a, MultipleErrors) Source #
Execute a Make
monad, returning either errors, or the result of the compile plus any warnings.
makeIO :: (MonadIO m, MonadError MultipleErrors m) => Text -> IO a -> m a Source #
getTimestamp :: (MonadIO m, MonadError MultipleErrors m) => FilePath -> m UTCTime Source #
Get a file's modification time in the Make
monad, capturing any errors
using the MonadError
instance.
getTimestampMaybe :: (MonadIO m, MonadError MultipleErrors m) => FilePath -> m (Maybe UTCTime) Source #
Get a file's modification time in the Make
monad, returning Nothing if
the file does not exist.
readTextFile :: (MonadIO m, MonadError MultipleErrors m) => FilePath -> m Text Source #
Read a text file strictly in the Make
monad, capturing any errors using
the MonadError
instance.
readJSONFile :: (MonadIO m, MonadError MultipleErrors m) => FromJSON a => FilePath -> m (Maybe a) Source #
Read a JSON file in the Make
monad, returning Nothing
if the file does
not exist or could not be parsed. Errors are captured using the MonadError
instance.
readCborFile :: (MonadIO m, MonadError MultipleErrors m) => Serialise a => FilePath -> m (Maybe a) Source #
Read a Cbor encoded file in the Make
monad, returning
Nothing
if the file does not exist or could not be parsed. Errors
are captured using the MonadError
instance.
readExternsFile :: (MonadIO m, MonadError MultipleErrors m) => FilePath -> m (Maybe ExternsFile) Source #
Read an externs file, returning Nothing
if the file does not exist,
could not be parsed, or was generated by a different version of the
compiler.
hashFile :: (MonadIO m, MonadError MultipleErrors m) => FilePath -> m ContentHash Source #
writeTextFile :: FilePath -> ByteString -> Make () Source #
Write a text file in the Make
monad, capturing any errors using the
MonadError
instance.
writeJSONFile :: (MonadIO m, MonadError MultipleErrors m) => ToJSON a => FilePath -> a -> m () Source #
Write a JSON file in the Make
monad, capturing any errors using the
MonadError
instance.
writeCborFile :: (MonadIO m, MonadError MultipleErrors m) => Serialise a => FilePath -> a -> m () Source #
copyFile :: (MonadIO m, MonadError MultipleErrors m) => FilePath -> FilePath -> m () Source #
Copy a file in the Make
monad, capturing any errors using the
MonadError
instance.