Skip to content

Commit

Permalink
Merge pull request #17 from Vlix/export-everything-from-Types-module
Browse files Browse the repository at this point in the history
Export everything from types module
  • Loading branch information
Vlix authored Dec 11, 2023
2 parents 8b98876 + e21a90b commit 891aec1
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog for `http-types`

## 0.12.5 [XXXX-XX-XX]

* Export everything from `Network.HTTP.Types`

## 0.12.4 [2023-11-29]

* Add `Data` and `Generic` instances to `ByteRange`, `StdMethod`, `Status` and `HttpVersion`.
Expand Down
45 changes: 42 additions & 3 deletions Network/HTTP/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ module Network.HTTP.Types (
imATeapot418,
status422,
unprocessableEntity422,
status426,
upgradeRequired426,
status428,
preconditionRequired428,
status429,
Expand Down Expand Up @@ -150,26 +152,61 @@ module Network.HTTP.Types (
RequestHeaders,
ResponseHeaders,

-- ** Common headers
-- ** Header constants
hAccept,
hAcceptCharset,
hAcceptEncoding,
hAcceptLanguage,
hAcceptRanges,
hAge,
hAllow,
hAuthorization,
hCacheControl,
hCookie,
hConnection,
hContentDisposition,
hContentEncoding,
hContentLanguage,
hContentLength,
hContentLocation,
hContentMD5,
hContentRange,
hContentType,
hCookie,
hDate,
hETag,
hExpect,
hExpires,
hFrom,
hHost,
hIfMatch,
hIfModifiedSince,
hIfNoneMatch,
hIfRange,
hIfUnmodifiedSince,
hLastModified,
hLocation,
hMaxForwards,
hMIMEVersion,
hOrigin,
hPragma,
hPrefer,
hPreferenceApplied,
hProxyAuthenticate,
hProxyAuthorization,
hRange,
hReferer,
hRetryAfter,
hServer,
hSetCookie,
hTE,
hTrailer,
hTransferEncoding,
hUpgrade,
hUserAgent,
hVary,
hVia,
hWWWAuthenticate,
hWarning,

-- ** Byte ranges
ByteRange (..),
Expand Down Expand Up @@ -216,7 +253,9 @@ module Network.HTTP.Types (
renderQueryBuilderPartialEscape,

-- ** Generalized query types
QueryLike (toQuery),
QueryLike (..),
QueryKeyLike (..),
QueryValueLike (..),

-- ** Path

Expand Down
12 changes: 9 additions & 3 deletions Network/HTTP/Types/Status.hs
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ module Network.HTTP.Types.Status (
status504,
gatewayTimeout504,
status505,
httpVersionNotSupported505,
status511,
networkAuthenticationRequired511,
httpVersionNotSupported505,

-- * Checking status code category
statusIsInformational,
Expand All @@ -138,8 +138,14 @@ import GHC.Generics (Generic)
--
-- Note that the 'Show' instance is only for debugging.
data Status = Status
{ statusCode :: Int
, statusMessage :: B.ByteString
{ -- | The 3-digit code of a 'Status'
--
-- For example: "200" in a @200 OK@ status
statusCode :: Int
, -- | The textual message of a 'Status'
--
-- For example: "Not Found" in a @404 Not Found@ status
statusMessage :: B.ByteString
}
deriving
( Show
Expand Down
4 changes: 2 additions & 2 deletions http-types.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Cabal-version: 3.0
Name: http-types
Version: 0.12.4
Version: 0.12.5
Synopsis: Generic HTTP types for Haskell (for both client and server code).
Description: Types and functions to describe and handle HTTP concepts.
Including "methods", "headers", "query strings", "paths" and "HTTP versions".
Expand All @@ -17,7 +17,7 @@ Extra-source-files: README, CHANGELOG
Source-repository this
type: git
location: https://github.com/Vlix/http-types.git
tag: 0.12.4
tag: v0.12.5

Source-repository head
type: git
Expand Down

0 comments on commit 891aec1

Please sign in to comment.