Safe Haskell | None |
---|---|
Language | Haskell2010 |
Stack.Types.TemplateName
Description
Template name handling.
Synopsis
- data TemplateName
- data RepoTemplatePath = RepoTemplatePath {
- rtpService :: RepoService
- rtpUser :: Text
- rtpTemplate :: Text
- data RepoService
- data TemplatePath
- mkTemplateName :: String -> Q Exp
- templateName :: TemplateName -> Text
- templatePath :: TemplateName -> TemplatePath
- parseTemplateNameFromString :: String -> Either String TemplateName
- parseRepoPathWithService :: RepoService -> Text -> Maybe RepoTemplatePath
- templateNameArgument :: Mod ArgumentFields TemplateName -> Parser TemplateName
- templateParamArgument :: Mod OptionFields (Text, Text) -> Parser (Text, Text)
Documentation
data TemplateName #
A template name.
Instances
Eq TemplateName # | |
Defined in Stack.Types.TemplateName | |
Ord TemplateName # | |
Defined in Stack.Types.TemplateName Methods compare :: TemplateName -> TemplateName -> Ordering # (<) :: TemplateName -> TemplateName -> Bool # (<=) :: TemplateName -> TemplateName -> Bool # (>) :: TemplateName -> TemplateName -> Bool # (>=) :: TemplateName -> TemplateName -> Bool # max :: TemplateName -> TemplateName -> TemplateName # min :: TemplateName -> TemplateName -> TemplateName # | |
Show TemplateName # | |
Defined in Stack.Types.TemplateName Methods showsPrec :: Int -> TemplateName -> ShowS # show :: TemplateName -> String # showList :: [TemplateName] -> ShowS # | |
FromJSON TemplateName # | |
Defined in Stack.Types.TemplateName |
data RepoTemplatePath #
Details for how to access a template from a remote repo.
Constructors
RepoTemplatePath | |
Fields
|
Instances
Eq RepoTemplatePath # | |
Defined in Stack.Types.TemplateName Methods (==) :: RepoTemplatePath -> RepoTemplatePath -> Bool # (/=) :: RepoTemplatePath -> RepoTemplatePath -> Bool # | |
Ord RepoTemplatePath # | |
Defined in Stack.Types.TemplateName Methods compare :: RepoTemplatePath -> RepoTemplatePath -> Ordering # (<) :: RepoTemplatePath -> RepoTemplatePath -> Bool # (<=) :: RepoTemplatePath -> RepoTemplatePath -> Bool # (>) :: RepoTemplatePath -> RepoTemplatePath -> Bool # (>=) :: RepoTemplatePath -> RepoTemplatePath -> Bool # max :: RepoTemplatePath -> RepoTemplatePath -> RepoTemplatePath # min :: RepoTemplatePath -> RepoTemplatePath -> RepoTemplatePath # | |
Show RepoTemplatePath # | |
Defined in Stack.Types.TemplateName Methods showsPrec :: Int -> RepoTemplatePath -> ShowS # show :: RepoTemplatePath -> String # showList :: [RepoTemplatePath] -> ShowS # |
data RepoService #
Services from which templates can be retrieved from a repository.
Instances
Eq RepoService # | |
Defined in Stack.Types.TemplateName | |
Ord RepoService # | |
Defined in Stack.Types.TemplateName Methods compare :: RepoService -> RepoService -> Ordering # (<) :: RepoService -> RepoService -> Bool # (<=) :: RepoService -> RepoService -> Bool # (>) :: RepoService -> RepoService -> Bool # (>=) :: RepoService -> RepoService -> Bool # max :: RepoService -> RepoService -> RepoService # min :: RepoService -> RepoService -> RepoService # | |
Show RepoService # | |
Defined in Stack.Types.TemplateName Methods showsPrec :: Int -> RepoService -> ShowS # show :: RepoService -> String # showList :: [RepoService] -> ShowS # |
data TemplatePath #
Constructors
AbsPath (Path Abs File) | an absolute path on the filesystem |
RelPath (Path Rel File) | a relative path on the filesystem, or relative to the template repository |
UrlPath String | a full URL |
RepoPath RepoTemplatePath |
Instances
Eq TemplatePath # | |
Defined in Stack.Types.TemplateName | |
Ord TemplatePath # | |
Defined in Stack.Types.TemplateName Methods compare :: TemplatePath -> TemplatePath -> Ordering # (<) :: TemplatePath -> TemplatePath -> Bool # (<=) :: TemplatePath -> TemplatePath -> Bool # (>) :: TemplatePath -> TemplatePath -> Bool # (>=) :: TemplatePath -> TemplatePath -> Bool # max :: TemplatePath -> TemplatePath -> TemplatePath # min :: TemplatePath -> TemplatePath -> TemplatePath # | |
Show TemplatePath # | |
Defined in Stack.Types.TemplateName Methods showsPrec :: Int -> TemplatePath -> ShowS # show :: TemplatePath -> String # showList :: [TemplatePath] -> ShowS # |
mkTemplateName :: String -> Q Exp #
Make a template name.
templateName :: TemplateName -> Text #
Get a text representation of the template name.
templatePath :: TemplateName -> TemplatePath #
Get the path of the template.
parseTemplateNameFromString :: String -> Either String TemplateName #
Parse a template name from a string.
parseRepoPathWithService :: RepoService -> Text -> Maybe RepoTemplatePath #
Parses a template path of the form user/template
, given a service
templateNameArgument :: Mod ArgumentFields TemplateName -> Parser TemplateName #
An argument which accepts a template name of the format
foo.hsfiles
or foo
, ultimately normalized to foo
.
templateParamArgument :: Mod OptionFields (Text, Text) -> Parser (Text, Text) #
An argument which accepts a key:value
pair for specifying parameters.