-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reformatted. Added workflows. Updated package metadata.
- Loading branch information
1 parent
add05c6
commit b6fa1f0
Showing
31 changed files
with
2,109 additions
and
1,696 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 @@ | ||
@byteverse/l3c |
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,12 @@ | ||
name: build | ||
on: | ||
pull_request: | ||
branches: | ||
- "*" | ||
|
||
jobs: | ||
call-workflow: | ||
uses: byteverse/.github/.github/workflows/build.yaml@main | ||
secrets: inherit | ||
with: | ||
release: false |
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,12 @@ | ||
name: release | ||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
call-workflow: | ||
uses: byteverse/.github/.github/workflows/build.yaml@main | ||
secrets: inherit | ||
with: | ||
release: true |
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
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,25 +1,26 @@ | ||
cabal-version: 2.4 | ||
name: byteslice | ||
version: 0.2.13.0 | ||
synopsis: Slicing managed and unmanaged memory | ||
cabal-version: 2.4 | ||
name: byteslice | ||
version: 0.2.13.1 | ||
synopsis: Slicing managed and unmanaged memory | ||
description: | ||
This library provides types that allow the user to talk about a slice of | ||
a ByteArray or a MutableByteArray. It also offers UnmanagedBytes, which | ||
is kind of like a slice into unmanaged memory. However, it is just an | ||
address and a length. | ||
homepage: https://github.com/andrewthad/byteslice | ||
bug-reports: https://github.com/andrewthad/byteslice/issues | ||
license: BSD-3-Clause | ||
license-file: LICENSE | ||
author: Andrew Martin | ||
maintainer: [email protected] | ||
copyright: 2020 Andrew Martin | ||
category: Data | ||
extra-source-files: CHANGELOG.md | ||
|
||
homepage: https://github.com/byteverse/byteslice | ||
bug-reports: https://github.com/byteverse/byteslice/issues | ||
license: BSD-3-Clause | ||
license-file: LICENSE | ||
author: Andrew Martin | ||
maintainer: [email protected] | ||
copyright: 2020 Andrew Martin | ||
category: Data | ||
extra-doc-files: CHANGELOG.md | ||
|
||
flag avoid-rawmemchr | ||
default: True | ||
description: Avoid using rawmemchr which is non-portable GNU libc only | ||
default: True | ||
description: Avoid using rawmemchr which is non-portable GNU libc only | ||
|
||
library | ||
exposed-modules: | ||
|
@@ -35,70 +36,84 @@ library | |
Data.Bytes.Text.Utf8 | ||
Data.Bytes.Text.Windows1252 | ||
Data.Bytes.Types | ||
|
||
other-modules: | ||
Data.Bytes.Search | ||
Cstrlen | ||
Data.Bytes.Byte | ||
Data.Bytes.Pure | ||
Data.Bytes.IO | ||
Data.Bytes.Internal.Show | ||
Data.Bytes.IO | ||
Data.Bytes.Pure | ||
Data.Bytes.Search | ||
Reps | ||
Cstrlen | ||
|
||
build-depends: | ||
, base >=4.14 && <5 | ||
, bytestring >=0.10.8 && <0.13 | ||
, natural-arithmetic >=0.1.4 | ||
, primitive >=0.7.4 && <0.10 | ||
, primitive-addr >=0.1 && <0.2 | ||
, primitive-unlifted >=0.1.2 && <2.2 | ||
, run-st >=0.1.1 && <0.2 | ||
, text >=1.2.5 | ||
, text-short >=0.1.3 && <0.2 | ||
, tuples >=0.1 && <0.2 | ||
, vector >=0.12 && <0.14 | ||
hs-source-dirs: src | ||
ghc-options: -Wall -O2 | ||
if impl(ghc>=9.2) | ||
, base >=4.14 && <5 | ||
, bytestring >=0.10.8 && <0.13 | ||
, natural-arithmetic >=0.1.4 | ||
, primitive >=0.7.4 && <0.10 | ||
, primitive-addr >=0.1 && <0.2 | ||
, primitive-unlifted >=0.1.2 && <2.2 | ||
, run-st >=0.1.1 && <0.2 | ||
, text >=1.2.5 | ||
, text-short >=0.1.3 && <0.2 | ||
, tuples >=0.1 && <0.2 | ||
, vector >=0.12 && <0.14 | ||
|
||
hs-source-dirs: src | ||
ghc-options: -Wall -O2 | ||
|
||
if impl(ghc >=9.2) | ||
hs-source-dirs: src-new-reps | ||
|
||
else | ||
hs-source-dirs: src-old-reps | ||
if impl(ghc>=9.0) | ||
|
||
if impl(ghc >=9.0) | ||
hs-source-dirs: src-ghc-cstrlen | ||
|
||
else | ||
hs-source-dirs: src-no-ghc-cstrlen | ||
|
||
default-language: Haskell2010 | ||
include-dirs: include | ||
includes: bs_custom.h | ||
include-dirs: include | ||
includes: bs_custom.h | ||
install-includes: bs_custom.h | ||
c-sources: cbits/bs_custom.c | ||
c-sources: cbits/bs_custom.c | ||
|
||
if flag(avoid-rawmemchr) | ||
cc-options: -DAVOID_RAWMEMCHR=1 | ||
|
||
test-suite test | ||
default-language: Haskell2010 | ||
type: exitcode-stdio-1.0 | ||
hs-source-dirs: test | ||
main-is: Main.hs | ||
ghc-options: -Wall -O2 | ||
type: exitcode-stdio-1.0 | ||
hs-source-dirs: test | ||
main-is: Main.hs | ||
ghc-options: -Wall -O2 | ||
build-depends: | ||
, base >=4.11.1 && <5 | ||
, base >=4.11.1 && <5 | ||
, byteslice | ||
, bytestring | ||
, primitive | ||
, quickcheck-classes >=0.6.4 | ||
, quickcheck-classes >=0.6.4 | ||
, tasty | ||
, tasty-hunit | ||
, tasty-quickcheck | ||
, text >=1.2 | ||
, transformers | ||
, text >=1.2 | ||
|
||
benchmark bench | ||
type: exitcode-stdio-1.0 | ||
type: exitcode-stdio-1.0 | ||
build-depends: | ||
, base | ||
, byteslice | ||
, gauge | ||
, primitive | ||
ghc-options: -Wall -O2 | ||
|
||
ghc-options: -Wall -O2 | ||
default-language: Haskell2010 | ||
hs-source-dirs: bench | ||
main-is: Main.hs | ||
hs-source-dirs: bench | ||
main-is: Main.hs | ||
|
||
source-repository head | ||
type: git | ||
location: git://github.com/byteverse/byteslice.git |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{-# language MagicHash #-} | ||
{-# LANGUAGE MagicHash #-} | ||
|
||
module Cstrlen | ||
( cstringLength# | ||
|
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,16 +1,16 @@ | ||
{-# language DataKinds #-} | ||
{-# language GADTSyntax #-} | ||
{-# language KindSignatures #-} | ||
{-# language MagicHash #-} | ||
{-# language UnboxedTuples #-} | ||
{-# language UnliftedNewtypes #-} | ||
{-# LANGUAGE DataKinds #-} | ||
{-# LANGUAGE GADTSyntax #-} | ||
{-# LANGUAGE KindSignatures #-} | ||
{-# LANGUAGE MagicHash #-} | ||
{-# LANGUAGE UnboxedTuples #-} | ||
{-# LANGUAGE UnliftedNewtypes #-} | ||
|
||
module Reps | ||
( Bytes#(..) | ||
( Bytes# (..) | ||
, word8ToWord# | ||
) where | ||
|
||
import GHC.Exts (ByteArray#,Int#,RuntimeRep(..),Levity(Unlifted),TYPE,word8ToWord#) | ||
import GHC.Exts (ByteArray#, Int#, Levity (Unlifted), RuntimeRep (..), TYPE, word8ToWord#) | ||
|
||
newtype Bytes# :: TYPE ('TupleRep '[ 'BoxedRep 'Unlifted,'IntRep,'IntRep]) where | ||
newtype Bytes# :: TYPE ('TupleRep '[ 'BoxedRep 'Unlifted, 'IntRep, 'IntRep]) where | ||
Bytes# :: (# ByteArray#, Int#, Int# #) -> Bytes# |
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
Oops, something went wrong.