Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Defines types and functions for generating Makefiles.
Synopsis
- type VarName = String
- type VarVal = String
- data MakeString
- = Mr String
- | Mv MVar
- | Mc MakeString MakeString
- data MVar
- (+:+) :: MakeString -> MakeString -> MakeString
- renderMS :: MakeString -> String
- renderVar :: (String -> String) -> MVar -> String
- makeS :: String -> MakeString
- mkWindowsVar :: VarName -> VarVal -> VarVal -> MakeString
- mkOSVar :: VarName -> VarVal -> VarVal -> VarVal -> MakeString
- mkImplicitVar :: VarName -> MakeString
- mkFreeVar :: VarName -> MakeString
Types
data MakeString Source #
Mr String | A string for Makefiles. |
Mv MVar | Holds a Makefile variable. |
Mc MakeString MakeString | Concatenates two |
Instances
Monoid MakeString Source # | |
Defined in Build.Drasil.Make.MakeString mempty :: MakeString # mappend :: MakeString -> MakeString -> MakeString # mconcat :: [MakeString] -> MakeString # | |
Semigroup MakeString Source # | |
Defined in Build.Drasil.Make.MakeString (<>) :: MakeString -> MakeString -> MakeString # sconcat :: NonEmpty MakeString -> MakeString # stimes :: Integral b => b -> MakeString -> MakeString # |
For creating Makefile variables.
Functions
(+:+) :: MakeString -> MakeString -> MakeString Source #
Concatenates two MakeString
s with a space in between.
renderMS :: MakeString -> String Source #
Renders a MakeString
. Variables have the form "$(var
)".
renderVar :: (String -> String) -> MVar -> String Source #
Renders variables. Takes in a function for the variable, and the type of variable.
makeS :: String -> MakeString Source #
Constructor for converting a String
into a MakeString
.
mkWindowsVar :: VarName -> VarVal -> VarVal -> MakeString Source #
Constructor for Windows OS variables.
mkOSVar :: VarName -> VarVal -> VarVal -> VarVal -> MakeString Source #
Constructor for OS variables.
mkImplicitVar :: VarName -> MakeString Source #
Constructor for Implicit
variables.