Skip to content

Commit da678ce

Browse files
Prepare 0.1.4.1 release
Reformatted. Added workflows. Updated package metadata.
1 parent 2bb027a commit da678ce

File tree

16 files changed

+476
-335
lines changed

16 files changed

+476
-335
lines changed

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@byteverse/l3c

.github/workflows/build.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: build
2+
on:
3+
pull_request:
4+
branches:
5+
- "*"
6+
7+
jobs:
8+
call-workflow:
9+
uses: byteverse/.github/.github/workflows/build.yaml@main
10+
secrets: inherit
11+
with:
12+
release: false

.github/workflows/release.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: release
2+
on:
3+
push:
4+
tags:
5+
- "*"
6+
7+
jobs:
8+
call-workflow:
9+
uses: byteverse/.github/.github/workflows/build.yaml@main
10+
secrets: inherit
11+
with:
12+
release: true

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.vscode/
12
dist
23
dist-*
34
cabal-dev

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Revision history for array-builder
22

3+
## 0.1.4.1 -- 2024-02-01
4+
5+
* Update package metadata.
6+
37
## 0.1.4.0 -- 2023-08-30
48

59
* Add `constructN` functions to Data.Builder.Catenable.Bytes.

Setup.hs

-2
This file was deleted.

array-builder.cabal

+40-31
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
cabal-version: 2.2
2-
name: array-builder
3-
version: 0.1.4.0
4-
synopsis: Builders for arrays
5-
homepage: https://github.com/andrewthad/array-builder
6-
bug-reports: https://github.com/andrewthad/array-builder/issues
7-
license: BSD-3-Clause
8-
license-file: LICENSE
9-
author: Andrew Martin
10-
maintainer: [email protected]
11-
copyright: 2019 Andrew Martin
12-
category: Data
13-
extra-source-files: CHANGELOG.md
1+
cabal-version: 2.2
2+
name: array-builder
3+
version: 0.1.4.1
4+
synopsis: Builders for arrays
5+
description: Builders for arrays.
6+
homepage: https://github.com/byteverse/array-builder
7+
bug-reports: https://github.com/byteverse/array-builder/issues
8+
license: BSD-3-Clause
9+
license-file: LICENSE
10+
author: Andrew Martin
11+
maintainer: [email protected]
12+
copyright: 2019 Andrew Martin
13+
category: Data
14+
extra-doc-files: CHANGELOG.md
1415

1516
library
1617
exposed-modules:
@@ -19,35 +20,43 @@ library
1920
Data.Builder.Catenable.Bytes
2021
Data.Builder.Catenable.Text
2122
Data.Builder.ST
22-
other-modules:
23-
Compat
23+
24+
other-modules: Compat
2425
build-depends:
25-
, array-chunks >=0.1 && <0.2
26-
, base >=4.12 && <5
27-
, bytebuild >=0.3.5
28-
, byteslice >=0.2.7
29-
, bytestring
30-
, natural-arithmetic >=0.1.3
31-
, primitive >=0.6.4 && <0.10
32-
, run-st >=0.1 && <0.2
33-
, text-short >=0.1.3
34-
hs-source-dirs: src
35-
if impl(ghc >= 8.9)
26+
, array-chunks >=0.1 && <0.2
27+
, base >=4.12 && <5
28+
, bytebuild >=0.3.5 && <0.4
29+
, byteslice >=0.2.7 && <0.3
30+
, bytestring >=0.11.5 && <0.12
31+
, natural-arithmetic >=0.1.3 && <0.3
32+
, primitive >=0.6.4 && <0.10
33+
, run-st >=0.1 && <0.2
34+
, text-short >=0.1.3 && <0.2
35+
36+
hs-source-dirs: src
37+
38+
if impl(ghc >=8.9)
3639
hs-source-dirs: src-post-8.9
40+
3741
else
3842
hs-source-dirs: src-pre-8.9
43+
3944
default-language: Haskell2010
40-
ghc-options: -Wall -O2
45+
ghc-options: -Wall -O2
4146

4247
test-suite test
43-
type: exitcode-stdio-1.0
44-
hs-source-dirs: test
45-
main-is: Main.hs
48+
type: exitcode-stdio-1.0
49+
hs-source-dirs: test
50+
main-is: Main.hs
4651
build-depends:
4752
, array-builder
4853
, base
4954
, tasty
5055
, tasty-hunit
51-
ghc-options: -Wall -O2
56+
57+
ghc-options: -Wall -O2
5258
default-language: Haskell2010
5359

60+
source-repository head
61+
type: git
62+
location: git://github.com/byteverse/array-builder.git

fourmolu.yaml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Number of spaces per indentation step
2+
indentation: 2
3+
4+
# Max line length for automatic line breaking
5+
column-limit: 200
6+
7+
# Styling of arrows in type signatures (choices: trailing, leading, or leading-args)
8+
function-arrows: trailing
9+
10+
# How to place commas in multi-line lists, records, etc. (choices: leading or trailing)
11+
comma-style: leading
12+
13+
# Styling of import/export lists (choices: leading, trailing, or diff-friendly)
14+
import-export-style: leading
15+
16+
# Whether to full-indent or half-indent 'where' bindings past the preceding body
17+
indent-wheres: false
18+
19+
# Whether to leave a space before an opening record brace
20+
record-brace-space: true
21+
22+
# Number of spaces between top-level declarations
23+
newlines-between-decls: 1
24+
25+
# How to print Haddock comments (choices: single-line, multi-line, or multi-line-compact)
26+
haddock-style: multi-line
27+
28+
# How to print module docstring
29+
haddock-style-module: null
30+
31+
# Styling of let blocks (choices: auto, inline, newline, or mixed)
32+
let-style: auto
33+
34+
# How to align the 'in' keyword with respect to the 'let' keyword (choices: left-align, right-align, or no-space)
35+
in-style: right-align
36+
37+
# Whether to put parentheses around a single constraint (choices: auto, always, or never)
38+
single-constraint-parens: always
39+
40+
# Output Unicode syntax (choices: detect, always, or never)
41+
unicode: never
42+
43+
# Give the programmer more choice on where to insert blank lines
44+
respectful: true
45+
46+
# Fixity information for operators
47+
fixities: []
48+
49+
# Module reexports Fourmolu should know about
50+
reexports: []
51+

src-post-8.9/Compat.hs

+20-20
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
1-
{-# language MagicHash #-}
2-
{-# language UnboxedTuples #-}
1+
{-# LANGUAGE MagicHash #-}
2+
{-# LANGUAGE UnboxedTuples #-}
33

44
module Compat
55
( unsafeShrinkAndFreeze
66
, unsafeShrinkAndFreeze#
77
) where
88

9-
import Data.Primitive (SmallArray(..),SmallMutableArray(..))
10-
import GHC.Exts (SmallArray#,SmallMutableArray#,Int(I#))
11-
import GHC.Exts (State#,Int#)
12-
import GHC.ST (ST(ST))
9+
import Data.Primitive (SmallArray (..), SmallMutableArray (..))
10+
import GHC.Exts (Int (I#), Int#, SmallArray#, SmallMutableArray#, State#)
11+
import GHC.ST (ST (ST))
1312

1413
import qualified GHC.Exts as Exts
1514

1615
-- Shrink the mutable array in place and then freeze it.
1716
-- The argument must not be reused after being passed to
1817
-- this function.
1918
unsafeShrinkAndFreeze ::
20-
SmallMutableArray s a
21-
-> Int
22-
-> ST s (SmallArray a)
23-
{-# inline unsafeShrinkAndFreeze #-}
24-
unsafeShrinkAndFreeze (SmallMutableArray x) (I# n) = ST
25-
(\s0 -> case Exts.shrinkSmallMutableArray# x n s0 of
26-
s1 -> case Exts.unsafeFreezeSmallArray# x s1 of
27-
(# s2, r #) -> (# s2, SmallArray r #)
28-
)
19+
SmallMutableArray s a ->
20+
Int ->
21+
ST s (SmallArray a)
22+
{-# INLINE unsafeShrinkAndFreeze #-}
23+
unsafeShrinkAndFreeze (SmallMutableArray x) (I# n) =
24+
ST
25+
( \s0 -> case Exts.shrinkSmallMutableArray# x n s0 of
26+
s1 -> case Exts.unsafeFreezeSmallArray# x s1 of
27+
(# s2, r #) -> (# s2, SmallArray r #)
28+
)
2929

3030
unsafeShrinkAndFreeze# ::
31-
SmallMutableArray# s a
32-
-> Int#
33-
-> State# s
34-
-> (# State# s, SmallArray# a #)
35-
{-# inline unsafeShrinkAndFreeze# #-}
31+
SmallMutableArray# s a ->
32+
Int# ->
33+
State# s ->
34+
(# State# s, SmallArray# a #)
35+
{-# INLINE unsafeShrinkAndFreeze# #-}
3636
unsafeShrinkAndFreeze# x n s0 =
3737
case Exts.shrinkSmallMutableArray# x n s0 of
3838
s1 -> Exts.unsafeFreezeSmallArray# x s1

src-pre-8.9/Compat.hs

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
{-# language MagicHash #-}
2-
{-# language UnboxedTuples #-}
1+
{-# LANGUAGE MagicHash #-}
2+
{-# LANGUAGE UnboxedTuples #-}
33

44
module Compat
55
( unsafeShrinkAndFreeze
66
, unsafeShrinkAndFreeze#
77
) where
88

99
import Control.Monad.ST (ST)
10-
import Data.Primitive (SmallArray,SmallMutableArray)
11-
import GHC.Exts (SmallArray#,SmallMutableArray#,Int#,State#)
10+
import Data.Primitive (SmallArray, SmallMutableArray)
11+
import GHC.Exts (Int#, SmallArray#, SmallMutableArray#, State#)
1212

1313
import qualified Data.Primitive as PM
1414
import qualified GHC.Exts as Exts
@@ -17,17 +17,17 @@ import qualified GHC.Exts as Exts
1717
-- The argument must not be reused after being passed to
1818
-- this function.
1919
unsafeShrinkAndFreeze ::
20-
SmallMutableArray s a
21-
-> Int
22-
-> ST s (SmallArray a)
23-
{-# inline unsafeShrinkAndFreeze #-}
20+
SmallMutableArray s a ->
21+
Int ->
22+
ST s (SmallArray a)
23+
{-# INLINE unsafeShrinkAndFreeze #-}
2424
unsafeShrinkAndFreeze arr = PM.freezeSmallArray arr 0
2525

2626
unsafeShrinkAndFreeze# ::
27-
SmallMutableArray# s a
28-
-> Int#
29-
-> State# s
30-
-> (# State# s, SmallArray# a #)
31-
{-# inline unsafeShrinkAndFreeze# #-}
27+
SmallMutableArray# s a ->
28+
Int# ->
29+
State# s ->
30+
(# State# s, SmallArray# a #)
31+
{-# INLINE unsafeShrinkAndFreeze# #-}
3232
unsafeShrinkAndFreeze# x n s0 =
3333
Exts.freezeSmallArray# x 0# n s0

0 commit comments

Comments
 (0)