Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type Paths = XPaths [Text]
- type XPaths r = Record '["pathSelf" >: Format r r, "pathFeed" >: Format r r, "pathRepos" >: Format r r, "pathRepo" >: Format r (Text -> Text -> r), "pathRepoMove" >: Format r (Text -> Text -> r), "pathChown" >: Format r (Text -> Text -> r), "pathRepair" >: Format r (Text -> Text -> r), "pathBuilds" >: Format r (Text -> Text -> r), "pathBuild" >: Format r (Text -> Text -> Text -> r), "pathApprove" >: Format r (Text -> Text -> Int -> Int -> r), "pathDecline" >: Format r (Text -> Text -> Int -> Int -> r), "pathPromote" >: Format r (Text -> Text -> Int -> r), "pathRollback" >: Format r (Text -> Text -> Int -> r), "pathJob" >: Format r (Text -> Text -> Int -> Int -> r), "pathLog" >: Format r (Text -> Text -> Int -> Int -> Int -> r), "pathRepoSecrets" >: Format r (Text -> Text -> r), "pathRepoSecret" >: Format r (Text -> Text -> Text -> r), "pathRepoRegistries" >: Format r (Text -> Text -> r), "pathRepoRegistry" >: Format r (Text -> Text -> Text -> r), "pathEncryptSecret" >: Format r (Text -> Text -> r), "pathEncryptRegistry" >: Format r (Text -> Text -> r), "pathSign" >: Format r (Text -> Text -> r), "pathVerify" >: Format r (Text -> Text -> r), "pathCrons" >: Format r (Text -> Text -> r), "pathCron" >: Format r (Text -> Text -> Text -> r), "pathUsers" >: Format r r, "pathUser" >: Format r (Text -> r), "pathQueue" >: Format r r, "pathServers" >: Format r r, "pathServer" >: Format r (Text -> r), "pathScalerPause" >: Format r r, "pathScalerResume" >: Format r r, "pathNodes" >: Format r r, "pathNode" >: Format r (Text -> r), "pathVersion" >: Format r r]
- paths :: Paths
- format :: Path a -> a
- data Format r a
Documentation
type XPaths r = Record '["pathSelf" >: Format r r, "pathFeed" >: Format r r, "pathRepos" >: Format r r, "pathRepo" >: Format r (Text -> Text -> r), "pathRepoMove" >: Format r (Text -> Text -> r), "pathChown" >: Format r (Text -> Text -> r), "pathRepair" >: Format r (Text -> Text -> r), "pathBuilds" >: Format r (Text -> Text -> r), "pathBuild" >: Format r (Text -> Text -> Text -> r), "pathApprove" >: Format r (Text -> Text -> Int -> Int -> r), "pathDecline" >: Format r (Text -> Text -> Int -> Int -> r), "pathPromote" >: Format r (Text -> Text -> Int -> r), "pathRollback" >: Format r (Text -> Text -> Int -> r), "pathJob" >: Format r (Text -> Text -> Int -> Int -> r), "pathLog" >: Format r (Text -> Text -> Int -> Int -> Int -> r), "pathRepoSecrets" >: Format r (Text -> Text -> r), "pathRepoSecret" >: Format r (Text -> Text -> Text -> r), "pathRepoRegistries" >: Format r (Text -> Text -> r), "pathRepoRegistry" >: Format r (Text -> Text -> Text -> r), "pathEncryptSecret" >: Format r (Text -> Text -> r), "pathEncryptRegistry" >: Format r (Text -> Text -> r), "pathSign" >: Format r (Text -> Text -> r), "pathVerify" >: Format r (Text -> Text -> r), "pathCrons" >: Format r (Text -> Text -> r), "pathCron" >: Format r (Text -> Text -> Text -> r), "pathUsers" >: Format r r, "pathUser" >: Format r (Text -> r), "pathQueue" >: Format r r, "pathServers" >: Format r r, "pathServer" >: Format r (Text -> r), "pathScalerPause" >: Format r r, "pathScalerResume" >: Format r r, "pathNodes" >: Format r r, "pathNode" >: Format r (Text -> r), "pathVersion" >: Format r r] Source #
A formatter. When you construct formatters the first type
parameter, r
, will remain polymorphic. The second type
parameter, a
, will change to reflect the types of the data that
will be formatted. For example, in
myFormat :: Formatter r (Text -> Int -> r) myFormat = "Person's name is " % text % ", age is " % hex
the first type parameter remains polymorphic, and the second type
parameter is Text -> Int -> r
, which indicates that it formats a
Text
and an Int
.
When you run the Format
, for example with format
, you provide
the arguments and they will be formatted into a string.
> format ("Person's name is " % text % ", age is " % hex) "Dave" 54 "Person's name is Dave, age is 36"
Instances
Functor (Format r) | Not particularly useful, but could be. |
Category Format | The same as (%). At present using |
a ~ r => IsString (Format r a) | Useful instance for writing format string. With this you can
write |
Defined in Formatting.Internal fromString :: String -> Format r a # | |
Semigroup (Format r (a -> r)) | |
Monoid (Format r (a -> r)) | Useful instance for applying two formatters to the same input
argument. For example: |