-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Reformatted. * Added GH workflows. * Fixed tests. * Bumped primitive dependency version.
- Loading branch information
1 parent
134d6ba
commit 2826eb7
Showing
16 changed files
with
450 additions
and
308 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: main arm64 | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
workflow_dispatch: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
call-workflow: | ||
uses: layer-3-communications/.github/.github/workflows/build-haskell.yaml@main | ||
with: | ||
build-arch: arm64 | ||
slack-name: ${{ github.ref_name }} | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: pull request arm64 | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "*" | ||
|
||
jobs: | ||
call-workflow: | ||
uses: layer-3-communications/.github/.github/workflows/build-haskell.yaml@main | ||
with: | ||
build-arch: arm64 | ||
slack-name: ${{ github.event.pull_request.head.ref }} | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: main x64 | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
workflow_dispatch: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
call-workflow: | ||
uses: layer-3-communications/.github/.github/workflows/build-haskell.yaml@main | ||
with: | ||
build-arch: x64 | ||
slack-name: ${{ github.ref_name }} | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: pull request x64 | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "*" | ||
|
||
jobs: | ||
call-workflow: | ||
uses: layer-3-communications/.github/.github/workflows/build-haskell.yaml@main | ||
with: | ||
build-arch: x64 | ||
slack-name: ${{ github.event.pull_request.head.ref }} | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.vscode/ | ||
dist | ||
dist-* | ||
cabal-dev | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Number of spaces per indentation step | ||
indentation: 2 | ||
|
||
# Max line length for automatic line breaking | ||
column-limit: 200 | ||
|
||
# Styling of arrows in type signatures (choices: trailing, leading, or leading-args) | ||
function-arrows: trailing | ||
|
||
# How to place commas in multi-line lists, records, etc. (choices: leading or trailing) | ||
comma-style: leading | ||
|
||
# Styling of import/export lists (choices: leading, trailing, or diff-friendly) | ||
import-export-style: leading | ||
|
||
# Whether to full-indent or half-indent 'where' bindings past the preceding body | ||
indent-wheres: false | ||
|
||
# Whether to leave a space before an opening record brace | ||
record-brace-space: true | ||
|
||
# Number of spaces between top-level declarations | ||
newlines-between-decls: 1 | ||
|
||
# How to print Haddock comments (choices: single-line, multi-line, or multi-line-compact) | ||
haddock-style: multi-line | ||
|
||
# How to print module docstring | ||
haddock-style-module: null | ||
|
||
# Styling of let blocks (choices: auto, inline, newline, or mixed) | ||
let-style: auto | ||
|
||
# How to align the 'in' keyword with respect to the 'let' keyword (choices: left-align, right-align, or no-space) | ||
in-style: right-align | ||
|
||
# Whether to put parentheses around a single constraint (choices: auto, always, or never) | ||
single-constraint-parens: always | ||
|
||
# Output Unicode syntax (choices: detect, always, or never) | ||
unicode: never | ||
|
||
# Give the programmer more choice on where to insert blank lines | ||
respectful: true | ||
|
||
# Fixity information for operators | ||
fixities: [] | ||
|
||
# Module reexports Fourmolu should know about | ||
reexports: [] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,57 @@ | ||
cabal-version: 3.0 | ||
name: http-interchange | ||
version: 0.3.1.0 | ||
license: BSD-3-Clause | ||
license-file: LICENSE | ||
author: Andrew Martin | ||
maintainer: [email protected] | ||
synopsis: Types and serialization for HTTP | ||
cabal-version: 3.0 | ||
name: http-interchange | ||
version: 0.3.1.0 | ||
license: BSD-3-Clause | ||
license-file: LICENSE | ||
author: Andrew Martin | ||
maintainer: [email protected] | ||
synopsis: Types and serialization for HTTP | ||
description: | ||
Types and serialization for HTTP. This includes things like request | ||
line, status line, and headers. There is also a collection type | ||
for headers that supports fast, case-insensitive lookup. | ||
copyright: 2023 Andrew Martin | ||
category: Data | ||
build-type: Simple | ||
|
||
copyright: 2023 Andrew Martin | ||
category: Data | ||
build-type: Simple | ||
extra-doc-files: CHANGELOG.md | ||
|
||
library | ||
ghc-options: -Wall -O2 | ||
ghc-options: -Wall -O2 | ||
exposed-modules: | ||
Http.Request | ||
Http.Response | ||
Http.Bodied | ||
Http.Header | ||
Http.Headers | ||
Http.Request | ||
Http.Response | ||
Http.Types | ||
|
||
build-depends: | ||
, base >=4.16.3.0 && <5 | ||
, bytesmith >=0.3.10 | ||
, byteslice >=0.2.11 | ||
, primitive >=0.7.4 | ||
, text >=2.0 | ||
, bytebuild >=0.3.10 | ||
, contiguous >=0.6.3 | ||
hs-source-dirs: src | ||
, base >=4.16.3.0 && <5 | ||
, bytebuild >=0.3.10 | ||
, byteslice >=0.2.11 | ||
, bytesmith >=0.3.10 | ||
, contiguous >=0.6.3 | ||
, primitive >=0.9.0 | ||
, text >=2.0 | ||
|
||
hs-source-dirs: src | ||
default-language: GHC2021 | ||
|
||
test-suite test | ||
ghc-options: -Wall | ||
ghc-options: -Wall | ||
default-language: GHC2021 | ||
type: exitcode-stdio-1.0 | ||
hs-source-dirs: test | ||
main-is: Main.hs | ||
type: exitcode-stdio-1.0 | ||
hs-source-dirs: test | ||
main-is: Main.hs | ||
build-depends: | ||
, aeson >=2.1 | ||
, base >=4.16.3.0 | ||
, http-interchange | ||
, tasty >=1.4.3 | ||
, tasty-golden >=2.3.5 | ||
, aeson >=2.1 | ||
, base >=4.16.3.0 | ||
, byteslice | ||
, bytestring >=0.11 | ||
, filepath | ||
, bytestring >=0.11 | ||
, primitive >=0.7.4 | ||
, pretty-show >=1.10 | ||
, http-interchange | ||
, pretty-show >=1.10 | ||
, primitive >=0.9.0 | ||
, tasty >=1.4.3 | ||
, tasty-golden >=2.3.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
module Http.Bodied | ||
( Bodied(..) | ||
( Bodied (..) | ||
) where | ||
|
||
import Data.Bytes.Chunks (Chunks) | ||
|
||
-- | An HTTP request or response with a body. | ||
data Bodied a = Bodied | ||
{ metadata :: !a | ||
-- ^ The request or response. | ||
-- ^ The request or response. | ||
, body :: !Chunks | ||
-- ^ The body. | ||
} deriving (Show,Eq) | ||
-- ^ The body. | ||
} | ||
deriving (Show, Eq) |
Oops, something went wrong.