Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data HpackError
- formatHpackError :: ProgramName -> HpackError -> String
- newtype ProgramName = ProgramName {}
- type URL = String
- data Status = Status {}
- formatStatus :: Status -> String
Documentation
NOTE: This module is exposed to allow integration of Hpack into other tools. It is not meant for general use by end users. The following caveats apply:
- The API is undocumented, consult the source instead.
- The exposed types and functions primarily serve Hpack's own needs, not that of a public API. Breaking changes can happen as Hpack evolves.
As an Hpack user you either want to use the hpack
executable or a build
tool that supports Hpack (e.g. stack
or cabal2nix
).
data HpackError Source #
HpackVersionNotSupported FilePath Version Version | |
DefaultsFileNotFound FilePath | |
DefaultsDownloadFailed URL Status | |
CycleInDefaults [FilePath] | |
ParseError String | |
DecodeValueError FilePath String |
Instances
Show HpackError Source # | |
Defined in Hpack.Error showsPrec :: Int -> HpackError -> ShowS # show :: HpackError -> String # showList :: [HpackError] -> ShowS # | |
Eq HpackError Source # | |
Defined in Hpack.Error (==) :: HpackError -> HpackError -> Bool # (/=) :: HpackError -> HpackError -> Bool # |
formatHpackError :: ProgramName -> HpackError -> String Source #
newtype ProgramName Source #
Instances
IsString ProgramName Source # | |
Defined in Hpack.Error fromString :: String -> ProgramName # | |
Show ProgramName Source # | |
Defined in Hpack.Error showsPrec :: Int -> ProgramName -> ShowS # show :: ProgramName -> String # showList :: [ProgramName] -> ShowS # | |
Eq ProgramName Source # | |
Defined in Hpack.Error (==) :: ProgramName -> ProgramName -> Bool # (/=) :: ProgramName -> ProgramName -> Bool # |
HTTP Status.
Only the statusCode
is used for comparisons.
Please use mkStatus
to create status codes from code and message, or the Enum
instance or the
status code constants (like ok200
). There might be additional record members in the future.
Note that the Show instance is only for debugging.
formatStatus :: Status -> String Source #