Skip to content

Commit 9c25fb7

Browse files
Release 0.7.0.1
2 parents e84d0a7 + 38a9c12 commit 9c25fb7

18 files changed

+91
-57
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
strategy:
1515
matrix:
16-
ghc: ['8.2.2', '8.4.4', '8.6.5', '8.8.4', '8.10.4']
16+
ghc: ['8.2.2', '8.4.4', '8.6.5', '8.8.4', '8.10.7']
1717
steps:
1818
- name: Checkout
1919
uses: actions/checkout@v2
@@ -32,7 +32,7 @@ jobs:
3232
runs-on: ubuntu-latest
3333
strategy:
3434
matrix:
35-
ghc: ['8.2.2', '8.4.4', '8.6.5', '8.8.4', '8.10.4']
35+
ghc: ['8.2.2', '8.4.4', '8.6.5', '8.8.4', '8.10.7']
3636
steps:
3737
- name: Checkout
3838
uses: actions/checkout@v2

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,18 @@ following conventions:
2424

2525
[KaC]: <https://keepachangelog.com/en/1.0.0/>
2626

27+
## 0.7.0.1 (2021-10-10)
28+
29+
### Non-Breaking
30+
31+
* Add dependency bounds
32+
2733
## 0.7.0.0 (2021-06-25)
2834

35+
### Non-Breaking
36+
37+
* Use TTC 1.1.0.1
38+
2939
### Breaking
3040

3141
* Fix `--help` when using `optparse-applicative` `0.16`

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ deb: # build .deb package for VERSION in a Debian container
124124
> -e DEBFULLNAME="$(MAINTAINER_NAME)" \
125125
> -e DEBEMAIL="$(MAINTAINER_EMAIL)" \
126126
> -v $(PWD)/build:/host \
127-
> extremais/pkg-debian-stack:buster \
127+
> extremais/pkg-debian-stack:bullseye \
128128
> /home/docker/bin/make-deb.sh "$(SRC)"
129129
.PHONY: deb
130130

@@ -311,8 +311,8 @@ test-all: # run tests for all configured Stackage releases
311311
> @make test CONFIG=stack-8.6.5.yaml
312312
> @command -v hr >/dev/null 2>&1 && hr "stack-8.8.4.yaml" || true
313313
> @make test CONFIG=stack-8.8.4.yaml
314-
> @command -v hr >/dev/null 2>&1 && hr "stack-8.10.4.yaml" || true
315-
> @make test CONFIG=stack-8.10.4.yaml
314+
> @command -v hr >/dev/null 2>&1 && hr "stack-8.10.7.yaml" || true
315+
> @make test CONFIG=stack-8.10.7.yaml
316316
.PHONY: test-all
317317

318318
test-nightly: # run tests for the latest Stackage nightly release

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ packages used depend entirely on the contents of the template.
4242
### Installation From Source
4343

4444
Queue Sheet can be built from source using [Stack][]. For example, you can
45-
install the latest release (to `/usr/bin` on Linux) as follows:
45+
install the latest release (to `/usr/local` on Linux) as follows:
4646

4747
```
4848
$ git clone https://github.com/ExtremaIS/queue-sheet-haskell.git

app/LibOA.hs

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@
1111
-- projects as required. If the library grows to a substantial size or others
1212
-- with to use it, I will reconsider.
1313
--
14-
-- Revision: 2021-06-24
14+
-- Revision: 2021-07-20
1515
------------------------------------------------------------------------------
1616

1717
{-# LANGUAGE CPP #-}
18+
{-# LANGUAGE LambdaCase #-}
19+
{-# LANGUAGE TupleSections #-}
1820

1921
module LibOA
2022
( -- * Options
@@ -27,6 +29,7 @@ module LibOA
2729
, (<||>)
2830
, section
2931
, table
32+
, table_
3033
, vspace
3134
) where
3235

@@ -35,7 +38,8 @@ import qualified Text.PrettyPrint.ANSI.Leijen as Doc
3538
import Text.PrettyPrint.ANSI.Leijen (Doc)
3639

3740
-- https://hackage.haskell.org/package/base
38-
import qualified Data.List as List
41+
import Data.List (intersperse, transpose)
42+
import Data.Maybe (fromMaybe)
3943
#if !MIN_VERSION_base (4,11,0)
4044
import Data.Monoid ((<>))
4145
#endif
@@ -115,15 +119,23 @@ infixr 5 <||>
115119
section :: String -> Doc -> Doc
116120
section title = (Doc.text title Doc.<$$>) . Doc.indent 2
117121

118-
-- | Create a two-column table
119-
table :: [(String, String)] -> Doc
120-
table rows =
121-
let width = 1 + maximum (map (length . fst) rows)
122-
in Doc.vcat
123-
[ Doc.fillBreak width (Doc.text l) Doc.<+> Doc.text r
124-
| (l, r) <- rows
125-
]
122+
-- | Create a table, with formatting
123+
table :: Int -> [[(String, Doc -> Doc)]] -> Doc
124+
table sep rows = Doc.vcat $
125+
map (fromMaybe Doc.empty . foldr go Nothing . zip lengths) rows
126+
where
127+
lengths :: [Int]
128+
lengths = map ((+) sep . maximum . map (length . fst)) $ transpose rows
129+
130+
go :: (Int, (String, Doc -> Doc)) -> Maybe Doc -> Maybe Doc
131+
go (len, (s, f)) = Just . \case
132+
Just doc -> Doc.fill len (f $ Doc.string s) <> doc
133+
Nothing -> f $ Doc.string s
134+
135+
-- | Create a table, without formatting
136+
table_ :: Int -> [[String]] -> Doc
137+
table_ sep = table sep . (map . map) (, id)
126138

127139
-- | Vertically space documents with blank lines between them
128140
vspace :: [Doc] -> Doc
129-
vspace = mconcat . List.intersperse (Doc.line <> Doc.line)
141+
vspace = mconcat . intersperse (Doc.line <> Doc.line)

default.nix

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#
99
# * Build QueueSheet with a specific compiler version:
1010
#
11-
# $ nix-build --argstr compiler ghc8104
11+
# $ nix-build --argstr compiler ghc8107
1212

13-
{ # This string argument specifies the compiler (example: "ghc8104"). When
13+
{ # This string argument specifies the compiler (example: "ghc8107"). When
1414
# not specified, the default compiler (configured below) is used.
1515
compiler ? null
1616
# This path argument specifies the packages to use. When not specified, a
@@ -26,12 +26,12 @@
2626
let
2727

2828
# This string defines the default compiler version.
29-
defaultCompiler = "ghc8104";
29+
defaultCompiler = "ghc8107";
3030

3131
# This set defines working revisions for supported compiler versions.
3232
nixpkgsRevs = {
33-
ghc8104 = "c92ca95afb5043bc6faa0d526460584eccff2277";
34-
ghc884 = "c92ca95afb5043bc6faa0d526460584eccff2277";
33+
ghc8107 = "b7d0ebd8f898c9a4b55653d2fefd12319f1bc3cf";
34+
ghc884 = "b7d0ebd8f898c9a4b55653d2fefd12319f1bc3cf";
3535
# ghc865 = "2d9888f61c80f28b09d64f5e39d0ba02e3923057"; NOTE ginger broken
3636
ghc844 = "6a80140fdf2157d1a5500a04c87033c0dcd6bf9b";
3737
ghc822 = "6a80140fdf2157d1a5500a04c87033c0dcd6bf9b";
@@ -63,7 +63,7 @@ let
6363
# Git ignore functionality from a fixed `nixpkgs` revision is used. Old
6464
# revisions do not work, proably due to an API change.
6565
gitIgnore = (
66-
import (nixpkgsTarball nixpkgsRevs.ghc8104) {}
66+
import (nixpkgsTarball nixpkgsRevs.ghc8107) {}
6767
).nix-gitignore.gitignoreSourcePure;
6868

6969
in
@@ -74,7 +74,10 @@ in
7474
root = gitIgnore [./.gitignore] ./.;
7575
name = "queue-sheet";
7676
source-overrides = {
77-
ttc = githubTagTarball "ExtremaIS" "ttc-haskell" "ttc-haskell-1.1.0.0";
77+
ttc = githubTagTarball "ExtremaIS" "ttc-haskell" "ttc-haskell-1.1.0.2";
78+
};
79+
overrides = self: super: {
80+
mono-traversable = pkgs.haskell.lib.dontCheck super.mono-traversable;
7881
};
7982
modifier = drv:
8083
if isShell

doc/queue-sheet.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.\" Automatically generated by Pandoc 2.11.4
22
.\"
3-
.TH "QUEUE-SHEET" "1" "" "queue-sheet-haskell 0.7.0.0 (2021-06-25)" "queue-sheet Manual"
3+
.TH "QUEUE-SHEET" "1" "" "queue-sheet-haskell 0.7.0.1 (2021-10-10)" "queue-sheet Manual"
44
.nh
55
.SH NAME
66
.PP
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# `queue-sheet-haskell` `0.7.0.1` Release Notes
2+
3+
Date
4+
: 2021-10-10
5+
6+
## Overview
7+
8+
This is a minor release of Queue Sheet that adds bounds to the dependencies,
9+
to make sure that builds do not break with breaking releases of dependencies
10+
(`aeson`). There are no changes to the code in this release.

queue-sheet.cabal

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: queue-sheet
2-
version: 0.7.0.0
2+
version: 0.7.0.1
33
category: Utils
44
synopsis: queue sheet utility
55
description:
@@ -15,14 +15,14 @@ copyright: Copyright (c) 2020-2021 Travis Cardwell
1515
license: MIT
1616
license-file: LICENSE
1717

18-
cabal-version: >=1.10
18+
cabal-version: 1.24
1919
build-type: Simple
2020
tested-with:
2121
GHC ==8.2.2
2222
|| ==8.4.4
2323
|| ==8.6.5
2424
|| ==8.8.4
25-
|| ==8.10.4
25+
|| ==8.10.7
2626

2727
extra-source-files:
2828
CHANGELOG.md
@@ -47,19 +47,19 @@ library
4747
other-modules:
4848
Paths_queue_sheet
4949
build-depends:
50-
aeson
50+
aeson >= 1.2 && <1.6
5151
, base >=4.7 && <5
52-
, bytestring
53-
, directory
54-
, filepath
55-
, ginger
56-
, process
57-
, scientific
58-
, text
59-
, transformers
60-
, ttc
61-
, vector
62-
, yaml
52+
, bytestring >=0.10.8 && <0.12
53+
, directory >=1.3 && <1.4
54+
, filepath >=1.4 && <1.5
55+
, ginger >=0.7.3 && <0.11
56+
, process >=1.6 && <1.7
57+
, scientific >=0.3 && <0.4
58+
, text >=1.2.3 && <1.3
59+
, transformers >=0.5.2 && <0.6
60+
, ttc >=1.1 && <1.2
61+
, vector >=0.12 && <0.13
62+
, yaml >=0.8 && <0.12
6363
default-language: Haskell2010
6464
if flag(write-hie)
6565
ghc-options: -Wall -fwrite-ide-info -hiedir=.hie
@@ -73,7 +73,7 @@ executable queue-sheet
7373
LibOA
7474
build-depends:
7575
ansi-wl-pprint >=0.6 && <0.7
76-
, base >=4.7 && <5
76+
, base
7777
, optparse-applicative >=0.14 && <0.17
7878
, queue-sheet
7979
default-language: Haskell2010
@@ -89,7 +89,7 @@ test-suite queue-sheet-test
8989
base
9090
, bytestring
9191
, queue-sheet
92-
, tasty
93-
, tasty-hunit
92+
, tasty >=1.0 && <1.5
93+
, tasty-hunit >=0.10 && <0.11
9494
default-language: Haskell2010
9595
ghc-options: -Wall

shell.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#
99
# * Run a Nix shell with a specific compiler version:
1010
#
11-
# $ nix-shell --argstr compiler ghc8104
11+
# $ nix-shell --argstr compiler ghc8107
1212

13-
{ # This string argument specifies the compiler (example: "ghc8104"). When
13+
{ # This string argument specifies the compiler (example: "ghc8107"). When
1414
# not specified, the default compiler is used.
1515
compiler ? null
1616
# This path argument specifies the packages to use. When not specified, a

stack-8.10.4.yaml

Lines changed: 0 additions & 4 deletions
This file was deleted.

stack-8.10.7.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
resolver: lts-18.13
2+
3+
packages:
4+
- .

stack-8.2.2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ packages:
55

66
extra-deps:
77
- ginger-0.8.4.0
8-
- ttc-1.1.0.0
8+
- ttc-1.1.0.1

stack-8.4.4.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ packages:
55

66
extra-deps:
77
- ginger-0.8.4.0
8-
- ttc-1.1.0.0
8+
- ttc-1.1.0.1

stack-8.6.5.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ packages:
44
- .
55

66
extra-deps:
7-
- ttc-1.1.0.0
7+
- ttc-1.1.0.1

stack-8.8.4.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ packages:
44
- .
55

66
extra-deps:
7-
- ttc-1.1.0.0
7+
- ttc-1.1.0.1

stack.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
stack-8.10.4.yaml
1+
stack-8.10.7.yaml

test-all.nix

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
{
88
queue-sheet-ghc-822 = import ./default.nix { compiler = "ghc822"; };
99
queue-sheet-ghc-844 = import ./default.nix { compiler = "ghc844"; };
10-
queue-sheet-ghc-865 = import ./default.nix { compiler = "ghc865"; };
10+
# queue-sheet-ghc-865 = import ./default.nix { compiler = "ghc865"; }; NOTE ginger broken
1111
queue-sheet-ghc-884 = import ./default.nix { compiler = "ghc884"; };
12-
queue-sheet-ghc-8104 = import ./default.nix { compiler = "ghc8104"; };
13-
queue-sheet-ghc-901 = import ./default.nix { compiler = "ghc901"; };
12+
queue-sheet-ghc-8107 = import ./default.nix { compiler = "ghc8107"; };
1413
}

0 commit comments

Comments
 (0)