Safe Haskell | None |
---|
- data Alias
- data Variable
- type Recipe = Recipe1
- class Referal x where
- class Placable a where
- data Reference
- class ReferenceLike a where
- data A a
- data Make a
- toMake :: (Map String Variable, Map Target Recipe2, [Target]) -> String
- runMake :: Make () -> IO String
- runMake_ :: Make () -> IO ()
- type Rule = Alias
- type Rules = [Alias]
- rule :: Rulable f a => f -> A () -> a
- ruleM :: (Monad m, Rulable f a) => f -> A () -> m a
- phony :: FilePath -> A a -> Alias
- phonyM :: Monad m => String -> A () -> m Alias
- depend :: Referal x => x -> A ()
- unsafe :: A () -> A ()
- defaultSelfUpdate :: Alias
- class FileLike a where
- fromFilePath :: FilePath -> a
- combine :: a -> a -> a
- takeBaseName :: a -> a
- takeFileName :: a -> a
- makeRelative :: a -> a -> a
- replaceExtension :: a -> String -> a
- takeExtension :: a -> String
- takeExtensions :: a -> String
- takeDirectory :: a -> a
- dropExtensions :: a -> a
- type File = FileT FilePath
- file' :: String -> String -> String -> File
- (.=) :: FileLike a => a -> String -> a
- (</>) :: FileLike a => a -> a -> a
- toFilePath :: FileT FilePath -> FilePath
- prerequisites :: A (Set File)
- shell :: CommandGen -> A ()
- cmd :: QuasiQuoter
- makevar :: String -> String -> Variable
- extvar :: String -> Variable
- dst :: A (Set File)
- makefile :: File
- newtype CommandGen = CommandGen (A Command)
- unCommand :: CommandGen -> A Command
- module Control.Monad
- module Control.Applicative
Documentation
The File Alias records the file which may be referenced from other rules, it's Brothers, and the recipes required to build this file.
Item wich have it's position in the Makefile. Positioned adds the metric to the contained datatype. Note, that the metric is not the subject of Eq or Ord. mappend-ing two metrics results in taking the minimal one. data Pos a = Pos { ppos :: Int, pwhat :: a } deriving(Show, Eq)
Makefile variable
Data structure x may be referenced from within the command. Referal class specifies side effects of such referencing. For example, referencig the file leads to adding it to the prerequisites list.
class ReferenceLike a whereSource
fromFilePath :: FilePath -> aSource
takeBaseName :: a -> aSource
takeFileName :: a -> aSource
makeRelative :: a -> a -> aSource
replaceExtension :: a -> String -> aSource
takeExtension :: a -> StringSource
takeExtensions :: a -> StringSource
takeDirectory :: a -> aSource
dropExtensions :: a -> aSource
prerequisites :: A (Set File)Source
shell :: CommandGen -> A ()Source
Has effect of a function :: QQ -> CommandGen where QQ is a string supporting $VARs. Each $VAR will be dereferenced using Ref typeclass. Result will be equivalent to
return Command $ do s1 <- ref gcc s2 <- ref (flags :: Variable) s3 <- ref s4 <- ref (file :: File) return (s1 ++ s2 ++ s3)
Later, this command may be examined or passed to the shell function to apply it to the recepi
newtype CommandGen Source
CommandGen is a recipe packed in the newtype to prevent partial expantion
unCommand :: CommandGen -> A CommandSource
module Control.Monad
module Control.Applicative