Skip to content

Commit 553dfe0

Browse files
committed
ghc2021
1 parent 83cdf99 commit 553dfe0

21 files changed

+233
-303
lines changed

.envrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
use flake
2+
3+
watch_file **/*.cabal cabal.project.freeze **/*.nix flake.lock

ascii/ascii.cabal

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cabal-version: 3.0
22

33
name: ascii
4-
version: 1.7.0.0
4+
version: 1.7.0.1
55
synopsis: The ASCII character set and encoding
66
category: Data, Text
77

@@ -24,7 +24,7 @@ source-repository head
2424
location: git://github.com/typeclasses/ascii.git
2525

2626
common base
27-
default-language: Haskell2010
27+
default-language: GHC2021
2828
ghc-options: -Wall
2929
default-extensions: NoImplicitPrelude
3030
build-depends:
@@ -36,14 +36,13 @@ common base
3636
, ascii-predicates == 1.0.1.*
3737
, ascii-superset == 1.3.0.*
3838
, ascii-th == 1.2.0.*
39-
, base ^>= 4.14 || ^>= 4.15 || ^>= 4.16 || ^>= 4.17
40-
, bytestring ^>= 0.10.12 || ^>= 0.11
41-
, text ^>= 1.2.4 || ^>= 2.0
39+
, base ^>= 4.16 || ^>= 4.17 || ^>= 4.18
40+
, bytestring ^>= 0.11.4
41+
, text ^>= 1.2.5 || ^>= 2.0
4242

4343
library
4444
import: base
4545
hs-source-dirs: library
46-
default-extensions: RankNTypes ScopedTypeVariables TypeApplications
4746
exposed-modules: ASCII
4847
reexported-modules:
4948
, ASCII.Case
@@ -72,4 +71,4 @@ test-suite test-ascii
7271
default-extensions: OverloadedStrings QuasiQuotes
7372
build-depends:
7473
, ascii
75-
, hspec ^>= 2.8.5 || ^>= 2.9 || ^>= 2.10
74+
, hspec ^>= 2.9.7 || ^>= 2.10 || ^>= 2.11

ascii/changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### 1.7.0.1 (2023-06-26)
2+
3+
Upgrade language to GHC2021
4+
15
### 1.7.0.0 (2023-03-01)
26

37
Rename `toAsciiCharMaybe` to `toCharMaybe`

contributing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The `ascii` package re-exports definitions and entire modules from other package
2222

2323
The goal is to support new releases of dependencies as quickly as possible. If there is a new version of a library that we do not yet support, please open an [issue](https://github.com/typeclasses/ascii/issues), and consider submitting a fix.
2424

25-
We support any version of GHC that was released within the last two years, plus one older version. Support for anything older will be dropped, even if there is no compelling reason, to make things easier to maintain. (If you have some need for support of older compilers, [talk to us](https://github.com/typeclasses/ascii/discussions) about changing this policy.)
25+
We support roughly the last three versions of GHC. Support for anything older will be dropped, even if there is no compelling reason, to make things easier to maintain. (If you have some need for support of older compilers, [talk to us](https://github.com/typeclasses/ascii/discussions) about changing this policy.)
2626

2727
Version bounds (the `build-depends` files in Cabal files) should reflect the versions that have been tested; a package should not declare support for a version unless there is an [Action](https://github.com/typeclasses/ascii/actions) that actually builds with it. When submitting a bounds change pull request, please update the [build configurations](https://github.com/typeclasses/ascii/tree/master/configurations) so that the automated testing can verify that everything works with the newly-included version.
2828

default.nix

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

flake.lock

Lines changed: 61 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
inputs = {
3+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
4+
flake-utils.url = "github:numtide/flake-utils";
5+
};
6+
7+
outputs = inputs:
8+
inputs.flake-utils.lib.eachDefaultSystem (system:
9+
let
10+
pkgs = import inputs.nixpkgs { inherit system; };
11+
in
12+
import ./nix { inherit pkgs; }
13+
);
14+
}

nix/ascii-case-1.0.1.nix

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

nix/default.nix

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
{ pkgs }:
2+
3+
let
4+
inherit (pkgs.lib) fold composeExtensions concatMap attrValues;
5+
6+
hls = pkgs.haskell-language-server.override {
7+
supportedGhcVersions = [ "96" ];
8+
};
9+
10+
combineOverrides = old:
11+
fold composeExtensions (old.overrides or (_: _: { }));
12+
13+
testConfigurations =
14+
let
15+
makeTestConfiguration = { ghcVersion, overrides ? new: old: { } }:
16+
let
17+
inherit (pkgs.haskell.lib) dontCheck packageSourceOverrides;
18+
in
19+
(pkgs.haskell.packages.${ghcVersion}.override (old: {
20+
overrides =
21+
combineOverrides old [
22+
(packageSourceOverrides { ascii = ../ascii; })
23+
overrides
24+
];
25+
})).ascii;
26+
in
27+
rec {
28+
ghc-9-2 = makeTestConfiguration {
29+
ghcVersion = "ghc92";
30+
overrides = new: old: {
31+
ascii-char = new.callPackage ./haskell/ascii-char.nix { };
32+
ascii-case = new.callPackage ./haskell/ascii-case.nix { };
33+
ascii-caseless = new.callPackage ./haskell/ascii-caseless.nix { };
34+
ascii-group = new.callPackage ./haskell/ascii-group.nix { };
35+
ascii-numbers = new.callPackage ./haskell/ascii-numbers.nix { };
36+
ascii-predicates = new.callPackage ./haskell/ascii-predicates.nix { };
37+
ascii-superset = new.callPackage ./haskell/ascii-superset.nix { };
38+
ascii-th = new.callPackage ./haskell/ascii-th.nix { };
39+
};
40+
};
41+
ghc-9-4 = makeTestConfiguration {
42+
ghcVersion = "ghc94";
43+
overrides = new: old: {
44+
ascii-char = new.callPackage ./haskell/ascii-char.nix { };
45+
ascii-case = new.callPackage ./haskell/ascii-case.nix { };
46+
ascii-caseless = new.callPackage ./haskell/ascii-caseless.nix { };
47+
ascii-group = new.callPackage ./haskell/ascii-group.nix { };
48+
ascii-numbers = new.callPackage ./haskell/ascii-numbers.nix { };
49+
ascii-predicates = new.callPackage ./haskell/ascii-predicates.nix { };
50+
ascii-superset = new.callPackage ./haskell/ascii-superset.nix { };
51+
ascii-th = new.callPackage ./haskell/ascii-th.nix { };
52+
};
53+
};
54+
ghc-9-6 = makeTestConfiguration {
55+
ghcVersion = "ghc96";
56+
overrides = new: old: {
57+
ascii-char = new.callPackage ./haskell/ascii-char.nix { };
58+
ascii-case = new.callPackage ./haskell/ascii-case.nix { };
59+
ascii-caseless = new.callPackage ./haskell/ascii-caseless.nix { };
60+
ascii-group = new.callPackage ./haskell/ascii-group.nix { };
61+
ascii-numbers = new.callPackage ./haskell/ascii-numbers.nix { };
62+
ascii-predicates = new.callPackage ./haskell/ascii-predicates.nix { };
63+
ascii-superset = new.callPackage ./haskell/ascii-superset.nix { };
64+
ascii-th = new.callPackage ./haskell/ascii-th.nix { };
65+
invert = new.callPackage ./haskell/invert.nix { };
66+
};
67+
};
68+
all = pkgs.symlinkJoin {
69+
name = "ascii-tests";
70+
paths = [ ghc-9-2 ghc-9-4 ghc-9-6 ];
71+
};
72+
};
73+
74+
in
75+
{
76+
77+
packages = { inherit testConfigurations; };
78+
79+
devShells.default = pkgs.mkShell {
80+
inputsFrom = [ testConfigurations.ghc-9-6.env ];
81+
buildInputs = [ hls pkgs.cabal-install ];
82+
};
83+
84+
}

nix/haskell/ascii-case.nix

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{ mkDerivation, ascii-char, base, hashable, hspec, lib }:
2+
mkDerivation {
3+
pname = "ascii-case";
4+
version = "1.0.1.3";
5+
sha256 = "1c4db1b2510934b78c2adc0ef6e52701d7f31ccc11162df7982879d25c440c19";
6+
libraryHaskellDepends = [ ascii-char base hashable ];
7+
testHaskellDepends = [ ascii-char base hspec ];
8+
homepage = "https://github.com/typeclasses/ascii-case";
9+
description = "ASCII letter case";
10+
license = lib.licenses.asl20;
11+
}

nix/ascii-caseless-0.0.0.nix renamed to nix/haskell/ascii-caseless.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
}:
33
mkDerivation {
44
pname = "ascii-caseless";
5-
version = "0.0.0.0";
6-
sha256 = "82f0c296922beb42e0d4888f81f39fb26835f6140b4ebb1c1aa61da27f2b6003";
5+
version = "0.0.0.1";
6+
sha256 = "9865b552a66d782a08e2a86ada3ef3520e6c1008ff8914b335bf453cc6100b2d";
77
libraryHaskellDepends = [ ascii-case ascii-char base hashable ];
88
testHaskellDepends = [ ascii-case ascii-char base hspec ];
99
homepage = "https://github.com/typeclasses/ascii-caseless";

nix/ascii-char-1.0.1.nix renamed to nix/haskell/ascii-char.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ mkDerivation {
33
pname = "ascii-char";
44
version = "1.0.1.0";
55
sha256 = "9b56ef31b90e0ef697e7624c8054e957cf155d3df68a71318766e837b81f9aba";
6+
revision = "1";
7+
editedCabalFile = "1f4v2vxpj2f3783xlqm1iay46wj78m1r0byiw01s5f81j49ldpgf";
68
libraryHaskellDepends = [ base hashable ];
79
testHaskellDepends = [ base hspec ];
810
homepage = "https://github.com/typeclasses/ascii-char";

nix/haskell/ascii-group.nix

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{ mkDerivation, ascii-char, base, hashable, hedgehog, lib }:
2+
mkDerivation {
3+
pname = "ascii-group";
4+
version = "1.0.0.16";
5+
sha256 = "d8c2dacddf9bbda41bd33ffd9965a33be7cd7985400360ac31e8d07f96291086";
6+
libraryHaskellDepends = [ ascii-char base hashable ];
7+
testHaskellDepends = [ ascii-char base hedgehog ];
8+
homepage = "https://github.com/typeclasses/ascii-group";
9+
description = "ASCII character groups";
10+
license = lib.licenses.asl20;
11+
}

nix/ascii-numbers-1.2.0.nix renamed to nix/haskell/ascii-numbers.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
}:
44
mkDerivation {
55
pname = "ascii-numbers";
6-
version = "1.2.0.0";
7-
sha256 = "59fc670d7a271c3cebb1850ae2e5d6d304590e8a62f45b5f5510230bf9798214";
6+
version = "1.2.0.1";
7+
sha256 = "fecd3940a5da5e1660a9db09d30cf8215a71596607482daa515a53c10132d4e0";
88
libraryHaskellDepends = [
99
ascii-case ascii-char ascii-superset base bytestring hashable text
1010
];

nix/ascii-predicates-1.0.1.nix renamed to nix/haskell/ascii-predicates.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{ mkDerivation, ascii-char, base, hedgehog, lib }:
22
mkDerivation {
33
pname = "ascii-predicates";
4-
version = "1.0.1.1";
5-
sha256 = "aceeb9d3c673e519f1bd8574314539cfa0e7760eeb5c8e9230a4c9136e6913e5";
4+
version = "1.0.1.3";
5+
sha256 = "ae4ed704ea77fbff9c8fb107d6b35413a121f3674c63156236af776639009ebd";
66
libraryHaskellDepends = [ ascii-char base ];
77
testHaskellDepends = [ ascii-char base hedgehog ];
88
homepage = "https://github.com/typeclasses/ascii-predicates";

nix/ascii-superset-1.3.0.nix renamed to nix/haskell/ascii-superset.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
}:
44
mkDerivation {
55
pname = "ascii-superset";
6-
version = "1.3.0.0";
7-
sha256 = "6338923c26fe6ee010741b2936d871efd3ecd6273a1f619366a26355de944e33";
6+
version = "1.3.0.1";
7+
sha256 = "d441ff82b6158a798bd6478e969e7c656c0895590e4f71a64c720aa3bd5b8e4d";
88
libraryHaskellDepends = [
99
ascii-case ascii-caseless ascii-char base bytestring hashable text
1010
];

nix/ascii-th-1.2.0.nix renamed to nix/haskell/ascii-th.nix

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44
}:
55
mkDerivation {
66
pname = "ascii-th";
7-
version = "1.2.0.0";
8-
sha256 = "6f41d2216e473011cc660d05429c1ce2a7c76bdb87cd303a816871974b3a661f";
9-
revision = "1";
10-
editedCabalFile = "1r6z6brkfahs9zifjhr7bpqblkiajcjknkgx2i57jrn5s3b97phk";
7+
version = "1.2.0.1";
8+
sha256 = "09b9da4fbb9ce3a600c00390b214964a6c4c260522a59a69c346350adc53473e";
119
libraryHaskellDepends = [
1210
ascii-case ascii-caseless ascii-char ascii-superset base
1311
template-haskell

0 commit comments

Comments
 (0)