Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare 0.3.11.1 release. #34

Merged
merged 1 commit into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@byteverse/l3c
11 changes: 11 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: build
on:
pull_request:
branches:
- "*"

jobs:
call-workflow:
uses: byteverse/.github/.github/workflows/build-matrix.yaml@main
with:
cabal-file: bytesmith.cabal
43 changes: 0 additions & 43 deletions .github/workflows/haskell-ci.yml

This file was deleted.

10 changes: 10 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: release
on:
push:
tags:
- "*"

jobs:
call-workflow:
uses: byteverse/.github/.github/workflows/release.yaml@main
secrets: inherit
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.vscode/
dist
dist-*
cabal-dev
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Revision history for bytesmith

## 0.3.11.1 -- 2024-02-13

* Update package metadata.

## 0.3.11.0 -- 2024-01-05

* Add `Data.Bytes.Parser.Latin.hexWord32`.
Expand Down
2 changes: 0 additions & 2 deletions Setup.hs

This file was deleted.

24 changes: 14 additions & 10 deletions bench/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,28 @@
import Data.Char (ord)
import Data.Primitive (ByteArray)
import Data.Word (Word8)
import Gauge.Main (defaultMain,bench,whnf)
import Gauge.Main (bench, defaultMain, whnf)

import qualified Data.Bytes.Parser as P
import qualified Data.Bytes.Parser.Latin as Latin
import qualified GHC.Exts as Exts

main :: IO ()
main = defaultMain
[ bench "decPositiveInteger" $ whnf
(\x -> P.parseByteArray (Latin.decUnsignedInteger ()) x)
encodedBigNumber
]
main =
defaultMain
[ bench "decPositiveInteger" $
whnf
(\x -> P.parseByteArray (Latin.decUnsignedInteger ()) x)
encodedBigNumber
]

encodedBigNumber :: ByteArray
encodedBigNumber = stringToByteArray $ show $ id @Integer $
246246357264327645234627753190240202405243024304504230544
*
732345623640035232405249305932503920593209520932095234651
encodedBigNumber =
stringToByteArray $
show $
id @Integer $
246246357264327645234627753190240202405243024304504230544
* 732345623640035232405249305932503920593209520932095234651

stringToByteArray :: String -> ByteArray
stringToByteArray =
Expand Down
96 changes: 53 additions & 43 deletions bytesmith.cabal
Original file line number Diff line number Diff line change
@@ -1,79 +1,89 @@
cabal-version: 2.2
name: bytesmith
version: 0.3.11.0
synopsis: Nonresumable byte parser
cabal-version: 2.2
name: bytesmith
version: 0.3.11.1
synopsis: Nonresumable byte parser
description:
Parse bytes as fast as possible. This is a nonresumable parser
that aggresively uses `UnboxedSums` to avoid performing any
allocations.
homepage: https://github.com/andrewthad/bytesmith
bug-reports: https://github.com/andrewthad/bytesmith/issues
license: BSD-3-Clause
license-file: LICENSE
author: Andrew Martin
maintainer: [email protected]
copyright: 2019 Andrew Martin
category: Data
extra-source-files: CHANGELOG.md
tested-with: GHC == 8.6.5 || == 8.8.4 || == 8.10.7 || == 9.0.2 || == 9.2.5 || == 9.4.3

homepage: https://github.com/byteverse/bytesmith
bug-reports: https://github.com/byteverse/bytesmith/issues
license: BSD-3-Clause
license-file: LICENSE
author: Andrew Martin
maintainer: [email protected]
copyright: 2019 Andrew Martin
category: Data
extra-doc-files: CHANGELOG.md
tested-with: GHC ==9.4.8 || ==9.6.3 || ==9.8.1

common build-settings
default-language: Haskell2010
ghc-options: -Wall -Wunused-packages

library
import: build-settings
exposed-modules:
Data.Bytes.Parser
Data.Bytes.Parser.BigEndian
Data.Bytes.Parser.LittleEndian
Data.Bytes.Parser.Ascii
Data.Bytes.Parser.Base128
Data.Bytes.Parser.BigEndian
Data.Bytes.Parser.Latin
Data.Bytes.Parser.Leb128
Data.Bytes.Parser.LittleEndian
Data.Bytes.Parser.Rebindable
Data.Bytes.Parser.Unsafe
Data.Bytes.Parser.Utf8

other-modules:
Data.Bytes.Parser.Internal
Data.Bytes.Parser.Types

build-depends:
, base >=4.12 && <5
, byteslice >=0.2.6 && <0.3
, bytestring >=0.10.8 && <0.13
, contiguous >= 0.6 && < 0.7
, natural-arithmetic >=0.1.3
, primitive >=0.7 && <0.10
, run-st >=0.1 && <0.2
, text-short >=0.1.3 && <0.2
, wide-word >=0.1.0.9 && <0.2
hs-source-dirs: src
ghc-options: -O2 -Wall
default-language: Haskell2010
, base >=4.12 && <5
, byteslice >=0.2.6 && <0.3
, bytestring >=0.10.8 && <0.13
, contiguous >=0.6 && <0.7
, natural-arithmetic >=0.1.3
, primitive >=0.7 && <0.10
, run-st >=0.1 && <0.2
, text-short >=0.1.3 && <0.2
, wide-word >=0.1.0.9 && <0.2

hs-source-dirs: src
ghc-options: -O2

test-suite test
default-language: Haskell2010
type: exitcode-stdio-1.0
import: build-settings
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Main.hs
ghc-options: -Wall -O2
main-is: Main.hs
build-depends:
, base >=4.12.0.0 && <5
, base >=4.12.0.0 && <5
, byte-order
, byteslice
, bytesmith
, primitive
, byteslice
, tasty-hunit
, tasty
, tasty-hunit
, tasty-quickcheck
, byte-order
, text-short
, wide-word

benchmark bench
type: exitcode-stdio-1.0
import: build-settings
type: exitcode-stdio-1.0
build-depends:
, base
, byteslice
, bytestring
, bytesmith
, gauge
, primitive
, bytesmith
ghc-options: -Wall -O2
default-language: Haskell2010

ghc-options: -O2
hs-source-dirs: bench
main-is: Main.hs
main-is: Main.hs

source-repository head
type: git
location: git://github.com/byteverse/bytesmith.git
51 changes: 51 additions & 0 deletions fourmolu.yaml
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: []

4 changes: 0 additions & 4 deletions src/Data/Bytes/Parser.hs
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
{-# language BangPatterns #-}
{-# language BinaryLiterals #-}
{-# language DataKinds #-}
{-# language DeriveFunctor #-}
{-# language DerivingStrategies #-}
{-# language GADTSyntax #-}
{-# language KindSignatures #-}
{-# language LambdaCase #-}
{-# language MagicHash #-}
{-# language MultiWayIf #-}
{-# language PolyKinds #-}
{-# language RankNTypes #-}
{-# language ScopedTypeVariables #-}
{-# language StandaloneDeriving #-}
{-# language TypeApplications #-}
{-# language UnboxedSums #-}
{-# language UnboxedTuples #-}
{-# language CPP #-}

Expand Down
Loading
Loading