purescript-0.13.6: PureScript Programming Language Compiler

Safe HaskellNone
LanguageHaskell2010

Language.PureScript.Make.Monad

Contents

Synopsis

Implementation of Make API using files on disk

newtype Make a Source #

A monad for running make actions

Instances
Monad Make Source # 
Instance details

Defined in Language.PureScript.Make.Monad

Methods

(>>=) :: Make a -> (a -> Make b) -> Make b #

(>>) :: Make a -> Make b -> Make b #

return :: a -> Make a #

fail :: String -> Make a #

Functor Make Source # 
Instance details

Defined in Language.PureScript.Make.Monad

Methods

fmap :: (a -> b) -> Make a -> Make b #

(<$) :: a -> Make b -> Make a #

Applicative Make Source # 
Instance details

Defined in Language.PureScript.Make.Monad

Methods

pure :: a -> Make a #

(<*>) :: Make (a -> b) -> Make a -> Make b #

liftA2 :: (a -> b -> c) -> Make a -> Make b -> Make c #

(*>) :: Make a -> Make b -> Make b #

(<*) :: Make a -> Make b -> Make a #

MonadIO Make Source # 
Instance details

Defined in Language.PureScript.Make.Monad

Methods

liftIO :: IO a -> Make a #

MonadError MultipleErrors Make Source # 
Instance details

Defined in Language.PureScript.Make.Monad

MonadReader Options Make Source # 
Instance details

Defined in Language.PureScript.Make.Monad

Methods

ask :: Make Options #

local :: (Options -> Options) -> Make a -> Make a #

reader :: (Options -> a) -> Make a #

MonadBase IO Make Source # 
Instance details

Defined in Language.PureScript.Make.Monad

Methods

liftBase :: IO α -> Make α #

MonadBaseControl IO Make Source # 
Instance details

Defined in Language.PureScript.Make.Monad

Associated Types

type StM Make a :: Type #

Methods

liftBaseWith :: (RunInBase Make IO -> IO a) -> Make a #

restoreM :: StM Make a -> Make a #

MonadWriter MultipleErrors Make Source # 
Instance details

Defined in Language.PureScript.Make.Monad

type StM Make a Source # 
Instance details

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 :: Text -> IO a -> Make a Source #

Run an IO action in the Make monad. The String argument should describe what we were trying to do; it is used for rendering errors in the case that an IOException is thrown.

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.

copyFile :: FilePath -> FilePath -> Make () Source #

Copy a file in the Make monad, capturing any errors using the MonadError instance.