Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Hpack.Error
Synopsis
- data HpackError
- = HpackVersionNotSupported FilePath Version Version
- | DefaultsFileNotFound FilePath
- | DefaultsDownloadFailed URL Status
- | CycleInDefaults [FilePath]
- | ParseError String
- | DecodeValueError FilePath String
- formatHpackError :: ProgramName -> HpackError -> String
- newtype ProgramName = ProgramName {
- unProgramName :: String
- type URL = String
- data Status = Status {
- statusCode :: Int
- statusMessage :: ByteString
- 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 #
Constructors
HpackVersionNotSupported FilePath Version Version | |
DefaultsFileNotFound FilePath | |
DefaultsDownloadFailed URL Status | |
CycleInDefaults [FilePath] | |
ParseError String | |
DecodeValueError FilePath String |
Instances
Show HpackError Source # | |
Defined in Hpack.Error Methods showsPrec :: Int -> HpackError -> ShowS show :: HpackError -> String showList :: [HpackError] -> ShowS | |
Eq HpackError Source # | |
Defined in Hpack.Error |
formatHpackError :: ProgramName -> HpackError -> String Source #
newtype ProgramName Source #
Constructors
ProgramName | |
Fields
|
Instances
IsString ProgramName Source # | |
Defined in Hpack.Error Methods fromString :: String -> ProgramName | |
Show ProgramName Source # | |
Defined in Hpack.Error Methods showsPrec :: Int -> ProgramName -> ShowS show :: ProgramName -> String showList :: [ProgramName] -> ShowS | |
Eq ProgramName Source # | |
Defined in Hpack.Error |
Constructors
Status | |
Fields
|
Instances
Data Status | |
Defined in Network.HTTP.Types.Status Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Status -> c Status gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Status dataTypeOf :: Status -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Status) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Status) gmapT :: (forall b. Data b => b -> b) -> Status -> Status gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Status -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Status -> r gmapQ :: (forall d. Data d => d -> u) -> Status -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> Status -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> Status -> m Status gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Status -> m Status gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Status -> m Status | |
Bounded Status | |
Defined in Network.HTTP.Types.Status | |
Enum Status | |
Defined in Network.HTTP.Types.Status | |
Generic Status | |
Show Status | |
Eq Status | |
Ord Status | |
type Rep Status | |
Defined in Network.HTTP.Types.Status type Rep Status = D1 ('MetaData "Status" "Network.HTTP.Types.Status" "http-types-0.12.4-5Uc5fIBVPyb2wUw46MBC7Q" 'False) (C1 ('MetaCons "Status" 'PrefixI 'True) (S1 ('MetaSel ('Just "statusCode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "statusMessage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) |
formatStatus :: Status -> String Source #