Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data MakeActions m = MakeActions {
- getInputTimestampsAndHashes :: ModuleName -> m (Either RebuildPolicy (Map FilePath (UTCTime, m ContentHash)))
- getOutputTimestamp :: ModuleName -> m (Maybe UTCTime)
- readExterns :: ModuleName -> m (FilePath, Maybe ExternsFile)
- codegen :: Module Ann -> Module -> ExternsFile -> SupplyT m ()
- ffiCodegen :: Module Ann -> m ()
- progress :: ProgressMessage -> m ()
- readCacheDb :: m CacheDb
- writeCacheDb :: CacheDb -> m ()
- writePackageJson :: m ()
- outputPrimDocs :: m ()
- data RebuildPolicy
- data ProgressMessage = CompilingModule ModuleName (Maybe (Int, Int))
- renderProgressMessage :: Text -> ProgressMessage -> Text
- buildMakeActions :: FilePath -> Map ModuleName (Either RebuildPolicy FilePath) -> Map ModuleName FilePath -> Bool -> MakeActions Make
- checkForeignDecls :: Module ann -> FilePath -> Make (Either MultipleErrors (ForeignModuleType, Set Ident))
- cacheDbFile :: FilePath -> FilePath
- readCacheDb' :: (MonadIO m, MonadError MultipleErrors m) => FilePath -> m CacheDb
- writeCacheDb' :: (MonadIO m, MonadError MultipleErrors m) => FilePath -> CacheDb -> m ()
- ffiCodegen' :: Map ModuleName FilePath -> Set CodegenTarget -> Maybe (ModuleName -> String -> FilePath) -> Module Ann -> Make ()
Documentation
data MakeActions m Source #
Actions that require implementations when running in "make" mode.
This type exists to make two things abstract:
- The particular backend being used (JavaScript, C++11, etc.)
- The details of how files are read/written etc.
MakeActions | |
|
data RebuildPolicy Source #
Determines when to rebuild a module
RebuildNever | Never rebuild this module |
RebuildAlways | Always rebuild this module |
Instances
Show RebuildPolicy Source # | |
Defined in Language.PureScript.Make.Actions showsPrec :: Int -> RebuildPolicy -> ShowS # show :: RebuildPolicy -> String # showList :: [RebuildPolicy] -> ShowS # | |
Eq RebuildPolicy Source # | |
Defined in Language.PureScript.Make.Actions (==) :: RebuildPolicy -> RebuildPolicy -> Bool # (/=) :: RebuildPolicy -> RebuildPolicy -> Bool # | |
Ord RebuildPolicy Source # | |
Defined in Language.PureScript.Make.Actions compare :: RebuildPolicy -> RebuildPolicy -> Ordering # (<) :: RebuildPolicy -> RebuildPolicy -> Bool # (<=) :: RebuildPolicy -> RebuildPolicy -> Bool # (>) :: RebuildPolicy -> RebuildPolicy -> Bool # (>=) :: RebuildPolicy -> RebuildPolicy -> Bool # max :: RebuildPolicy -> RebuildPolicy -> RebuildPolicy # min :: RebuildPolicy -> RebuildPolicy -> RebuildPolicy # |
data ProgressMessage Source #
Progress messages from the make process
CompilingModule ModuleName (Maybe (Int, Int)) | Compilation started for the specified module |
Instances
Show ProgressMessage Source # | |
Defined in Language.PureScript.Make.Actions showsPrec :: Int -> ProgressMessage -> ShowS # show :: ProgressMessage -> String # showList :: [ProgressMessage] -> ShowS # | |
Eq ProgressMessage Source # | |
Defined in Language.PureScript.Make.Actions (==) :: ProgressMessage -> ProgressMessage -> Bool # (/=) :: ProgressMessage -> ProgressMessage -> Bool # | |
Ord ProgressMessage Source # | |
Defined in Language.PureScript.Make.Actions compare :: ProgressMessage -> ProgressMessage -> Ordering # (<) :: ProgressMessage -> ProgressMessage -> Bool # (<=) :: ProgressMessage -> ProgressMessage -> Bool # (>) :: ProgressMessage -> ProgressMessage -> Bool # (>=) :: ProgressMessage -> ProgressMessage -> Bool # max :: ProgressMessage -> ProgressMessage -> ProgressMessage # min :: ProgressMessage -> ProgressMessage -> ProgressMessage # |
renderProgressMessage :: Text -> ProgressMessage -> Text Source #
Render a progress message
:: FilePath | the output directory |
-> Map ModuleName (Either RebuildPolicy FilePath) | a map between module names and paths to the file containing the PureScript module |
-> Map ModuleName FilePath | a map between module name and the file containing the foreign javascript for the module |
-> Bool | Generate a prefix comment? |
-> MakeActions Make |
A set of make actions that read and write modules from the given directory.
checkForeignDecls :: Module ann -> FilePath -> Make (Either MultipleErrors (ForeignModuleType, Set Ident)) Source #
Check that the declarations in a given PureScript module match with those in its corresponding foreign module.
cacheDbFile :: FilePath -> FilePath Source #
Given the output directory, determines the location for the CacheDb file
:: (MonadIO m, MonadError MultipleErrors m) | |
=> FilePath | The path to the output directory |
-> m CacheDb |
:: (MonadIO m, MonadError MultipleErrors m) | |
=> FilePath | The path to the output directory |
-> CacheDb | The CacheDb to be written |
-> m () |
ffiCodegen' :: Map ModuleName FilePath -> Set CodegenTarget -> Maybe (ModuleName -> String -> FilePath) -> Module Ann -> Make () Source #
FFI check and codegen action. If path maker is supplied copies foreign module to the output.