stack-2.1.1.1: The Haskell Tool Stack

Safe HaskellNone
LanguageHaskell2010

Stack.Types.TemplateName

Description

Template name handling.

Synopsis

Documentation

data RepoService Source #

Services from which templates can be retrieved from a repository.

Constructors

Github 
Gitlab 
Bitbucket 

data TemplatePath Source #

Constructors

AbsPath (Path Abs File)

an absolute path on the filesystem

RelPath String (Path Rel File)

a relative path on the filesystem, or relative to the template repository. To avoid path separator conversion on Windows, the raw command-line parameter passed is also given as the first field (possibly with .hsfiles appended).

UrlPath String

a full URL

RepoPath RepoTemplatePath 

templateName :: TemplateName -> Text Source #

Get a text representation of the template name.

templatePath :: TemplateName -> TemplatePath Source #

Get the path of the template.

parseTemplateNameFromString :: String -> Either String TemplateName Source #

Parse a template name from a string.

parseRepoPathWithService :: RepoService -> Text -> Maybe RepoTemplatePath Source #

Parses a template path of the form user/template, given a service

templateNameArgument :: Mod ArgumentFields TemplateName -> Parser TemplateName Source #

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) Source #

An argument which accepts a key:value pair for specifying parameters.

defaultTemplateName :: TemplateName Source #

The default template name you can use if you don't have one.