Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype Make a = Make {}
- runMake :: Options -> Make a -> IO (Either MultipleErrors a, MultipleErrors)
- makeIO :: Text -> IO a -> Make a
- getTimestamp :: FilePath -> Make UTCTime
- getTimestampMaybe :: FilePath -> Make (Maybe UTCTime)
- readTextFile :: FilePath -> Make Text
- readJSONFile :: FromJSON a => FilePath -> Make (Maybe a)
- readExternsFile :: FilePath -> Make (Maybe ExternsFile)
- hashFile :: FilePath -> Make ContentHash
- writeTextFile :: FilePath -> ByteString -> Make ()
- writeJSONFile :: ToJSON a => FilePath -> a -> Make ()
- copyFile :: FilePath -> FilePath -> Make ()
Implementation of Make API using files on disk
A monad for running make actions
Instances
Monad Make Source # | |
Functor Make Source # | |
Applicative Make Source # | |
MonadIO Make Source # | |
Defined in Language.PureScript.Make.Monad | |
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 # | |
MonadBase IO Make Source # | |
Defined in Language.PureScript.Make.Monad | |
MonadBaseControl IO 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 # | |
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.
getTimestamp :: FilePath -> Make UTCTime Source #
Get a file's modification time in the Make
monad, capturing any errors
using the MonadError
instance.
getTimestampMaybe :: FilePath -> Make (Maybe UTCTime) Source #
Get a file's modification time in the Make
monad, returning Nothing if
the file does not exist.
readTextFile :: FilePath -> Make Text Source #
Read a text file strictly in the Make
monad, capturing any errors using
the MonadError
instance.
readJSONFile :: FromJSON a => FilePath -> Make (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.
readExternsFile :: FilePath -> Make (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.
writeTextFile :: FilePath -> ByteString -> Make () Source #
Write a text file in the Make
monad, capturing any errors using the
MonadError
instance.
writeJSONFile :: ToJSON a => FilePath -> a -> Make () Source #
Write a JSON file in the Make
monad, capturing any errors using the
MonadError
instance.