Skip to content

Commit a7001c1

Browse files
authored
Merge pull request github#618 from github/eight-dot-ten-patrickt
Update to GHC v8.10.1
2 parents b30e5c3 + 4dce233 commit a7001c1

File tree

50 files changed

+526
-587
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+526
-587
lines changed

.ghci.repl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@
2424
:seti -Wno-safe
2525
:seti -Wno-unsafe
2626
:seti -Wno-star-is-type
27+
-- 8.8+
2728
:seti -Wno-missing-deriving-strategies
29+
-- 8.10+
30+
:seti -Wno-missing-safe-haskell-mode
31+
:seti -Wno-prepositive-qualified-module
2832

2933
-- Turn on some language extensions you use a lot
3034
:seti -XFlexibleContexts -XOverloadedStrings -XTypeApplications
@@ -44,5 +48,6 @@
4448
-- Better typed holes
4549
:set -funclutter-valid-hole-fits -fabstract-refinement-hole-fits -frefinement-level-hole-fits=2
4650

47-
-- This usually impairs understanding
51+
-- We have this one on in the project but not in the REPL to reduce noise
4852
:seti -Wno-type-defaults
53+
:set -Wno-unused-packages

.github/workflows/bazel.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name: Bazel CI
33
on:
44
# Trigger the workflow on push or pull request,
55
# but only for the master branch
6-
push:
7-
branches:
8-
- master
9-
pull_request:
6+
# push:
7+
# branches:
8+
# - master
9+
# pull_request: {}
1010

1111
jobs:
1212
build:
@@ -40,5 +40,6 @@ jobs:
4040
4141
- name: Build & test
4242
run: |
43-
bin/bazel test --config=ci --test_tag_filters=language-test //...
44-
bin/bazel test --config=ci //semantic-source //semantic:spec
43+
bin/bazel clean
44+
bin/bazel test --sandbox_debug --config=ci --test_tag_filters=language-test //...
45+
bin/bazel test --sandbox_debug --config=ci //semantic-source //semantic:spec

.github/workflows/haskell.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
ghc: ["8.8.3"]
17+
ghc: ["8.8.3", "8.10.1"]
1818
cabal: ["3.2.0.0"]
1919

2020
steps:
@@ -69,7 +69,6 @@ jobs:
6969
cabal v2-run --project-file=cabal.project.ci semantic-tsx:test
7070
cabal v2-run --project-file=cabal.project.ci semantic-typescript:test
7171
cabal v2-run --project-file=cabal.project.ci semantic-source:test
72-
cabal v2-run --project-file=cabal.project.ci semantic-source:doctest -- semantic-source/src
7372
7473
- name: Write out cache
7574
run: ./cabal-cache sync-to-archive --threads=2 --archive-uri=dist-cache

WORKSPACE

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,11 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
1515
# an updated version.
1616
#
1717
# [1] https://github.com/tweag/rules_haskell/issues/1349
18-
#
19-
# http_archive(
20-
# name = "rules_haskell",
21-
# sha256 = "56a8e6337df8802f1e0e7d2b3d12d12d5d96c929c8daecccc5738a0f41d9c1e4",
22-
# strip_prefix = "rules_haskell-0.12",
23-
# urls = ["https://github.com/tweag/rules_haskell/archive/v0.12.tar.gz"],
24-
# )
2518
http_archive(
2619
name = "rules_haskell",
27-
sha256 = "78d017aa732b430c0681fff4514503af78a8d8c44df165e603a9433745b16e5e",
28-
strip_prefix = "rules_haskell-abaec6502a4474f10b3c367fb5e90173ee0e349c",
29-
urls = ["https://github.com/tweag/rules_haskell/archive/abaec6502a4474f10b3c367fb5e90173ee0e349c.tar.gz"],
20+
sha256 = "5e8077ae243b4bcf7bb913dfd9b4335c3b4bd2554658c62db7b3eb5351c80d8e",
21+
strip_prefix = "rules_haskell-aabeedc18f5e5db030ca1aa0c10a7dc14e4a4a55",
22+
urls = ["https://github.com/tweag/rules_haskell/archive/aabeedc18f5e5db030ca1aa0c10a7dc14e4a4a55.tar.gz"],
3023
)
3124

3225
load(
@@ -45,7 +38,7 @@ load(
4538
# Download a GHC binary distribution from haskell.org and register it as a toolchain.
4639
rules_haskell_toolchains(
4740
locale = "en_US.UTF-8",
48-
version = "8.8.3",
41+
version = "8.10.1",
4942
)
5043

5144
# Enable GHC persistent worker mode, if that's your bag.
@@ -75,6 +68,7 @@ stack_snapshot(
7568
"async",
7669
"attoparsec",
7770
"base",
71+
"base64-bytestring",
7872
"bazel-runfiles",
7973
"bifunctors",
8074
"bytestring",
@@ -100,7 +94,9 @@ stack_snapshot(
10094
"hspec",
10195
"hspec-core",
10296
"hspec-expectations",
97+
"proto-lens-jsonpb",
10398
"lens",
99+
"lingo",
104100
"network",
105101
"network-uri",
106102
"optparse-applicative",
@@ -112,7 +108,6 @@ stack_snapshot(
112108
"prettyprinter-ansi-terminal",
113109
"process",
114110
"proto-lens",
115-
"proto-lens-jsonpb",
116111
"proto-lens-runtime",
117112
"raw-strings-qq",
118113
"recursion-schemes",
@@ -243,15 +238,6 @@ tree_sitter_node_types_hackage(
243238
version = "0.1.0.1",
244239
)
245240

246-
# Download lingo (which has its own Bazel build instructions).
247-
248-
http_archive(
249-
name = "lingo",
250-
sha256 = "32a5e2d66e4620ff7004acab4802dc948b852ce26725012283a85d41af97275f",
251-
strip_prefix = "lingo-haskell-6614b9afe1a519364491c170d6b06ff5cd96153a",
252-
urls = ["https://github.com/tclem/lingo-haskell/archive/6614b9afe1a519364491c170d6b06ff5cd96153a.tar.gz"],
253-
)
254-
255241
load("//:build/example_repos.bzl", "declare_example_repos")
256242

257243
declare_example_repos()

build/common.bzl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ GHC_FLAGS = [
3131
"-Wno-star-is-type",
3232
"-Wno-missing-deriving-strategies",
3333
"-DBAZEL_BUILD=1",
34+
"-Wno-unused-packages",
35+
"-Wno-prepositive-qualified-module",
36+
"-Wno-missing-safe-haskell-mode",
3437
] + select(
3538
{
3639
"//:release": RELEASE_GHC_FLAGS,
@@ -126,7 +129,6 @@ def semantic_language_library(language, name, srcs, ts_package = "", nodetypes =
126129
"@stackage//:fused-effects",
127130
"@stackage//:fused-syntax",
128131
"@stackage//:generic-lens",
129-
"@stackage//:generic-monoid",
130132
"@stackage//:hashable",
131133
"@stackage//:lens",
132134
"@stackage//:pathtype",

cabal.project

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,6 @@ packages: semantic
2121
semantic-tsx
2222
semantic-typescript
2323

24-
-- Packages brought in from other repos instead of hackage
25-
-- ATTENTION: remember to update cabal.project.ci when bumping SHAs here!
26-
source-repository-package
27-
type: git
28-
location: https://github.com/tclem/proto-lens-jsonpb
29-
tag: 5d40444be689bef1e12cbe38da0261283775ec64
30-
3124
source-repository-package
3225
type: git
3326
location: https://github.com/antitypical/fused-syntax.git

cabal.project.ci

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,6 @@ packages: semantic
2121
semantic-tsx
2222
semantic-typescript
2323

24-
-- Packages brought in from other repos instead of hackage
25-
-- ATTENTION: remember to update cabal.project when bumping SHAs here!
26-
source-repository-package
27-
type: git
28-
location: https://github.com/tclem/proto-lens-jsonpb
29-
tag: 5d40444be689bef1e12cbe38da0261283775ec64
30-
3124
source-repository-package
3225
type: git
3326
location: https://github.com/antitypical/fused-syntax.git

script/ghci-flags

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ function flags {
4646

4747
echo "-optP-Wno-macro-redefined"
4848

49+
echo "-DBAZEL_BUILD=0"
50+
4951
# .hs source dirs
5052
# TODO: would be nice to figure this out from cabal.project & the .cabal files
5153
echo "-isemantic/app"
@@ -98,8 +100,9 @@ function flags {
98100
echo "-Wno-name-shadowing"
99101
echo "-Wno-safe"
100102
echo "-Wno-unsafe"
101-
[[ "$ghc_version" = 8.6.* ]] || [[ "$ghc_version" = 8.8.* ]] && echo "-Wno-star-is-type" || true
102-
[[ "$ghc_version" = 8.8.* ]] && echo "-Wno-missing-deriving-strategies" || true
103+
[[ "$ghc_version" = 8.6.* ]] || [[ "$ghc_version" = 8.8.* ]] || [[ "$ghc_version" = 8.10.* ]] && echo "-Wno-star-is-type" || true
104+
[[ "$ghc_version" = 8.8.* ]] || [[ "$ghc_version" = 8.10.* ]] && echo "-Wno-missing-deriving-strategies" || true
105+
[[ "$ghc_version" = 8.10.* ]] && echo "-Wno-missing-safe-haskell-mode" && echo "-Wno-prepositive-qualified-module" && echo "-Wno-unused-packages"
103106
}
104107

105108
flags > "$output_file"

semantic-analysis/semantic-analysis.cabal

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ common common
3535
-Wno-star-is-type
3636
if (impl(ghc >= 8.8))
3737
ghc-options: -Wno-missing-deriving-strategies
38+
if (impl(ghc >= 8.10))
39+
ghc-options:
40+
-Wno-missing-safe-haskell-mode
41+
-Wno-prepositive-qualified-module
3842

3943
library
4044
import: common
@@ -63,19 +67,10 @@ library
6367
, algebraic-graphs ^>= 0.3
6468
, base >= 4.13 && < 5
6569
, containers ^>= 0.6
66-
, filepath
6770
, fused-effects ^>= 1.1
68-
, fused-effects-readline ^>= 0.1
6971
, fused-syntax
7072
, hashable
71-
, haskeline ^>= 0.7.5
72-
, hashable
73-
, lingo ^>= 0.3.2.0
7473
, pathtype ^>= 0.8.1
75-
, prettyprinter >= 1.2 && < 2
76-
, prettyprinter-ansi-terminal ^>= 1.1.1
77-
, semantic-source ^>= 0.1.0
78-
, semilattices
79-
, terminal-size ^>= 0.3
74+
, semantic-source ^>= 0.1.0.1
8075
, text ^>= 1.2.3.1
8176
, transformers ^>= 0.5

semantic-ast/semantic-ast.cabal

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ common haskell
3434
-Wno-star-is-type
3535
if (impl(ghc >= 8.8))
3636
ghc-options: -Wno-missing-deriving-strategies
37+
if (impl(ghc >= 8.10))
38+
ghc-options:
39+
-Wno-missing-safe-haskell-mode
40+
-Wno-prepositive-qualified-module
3741
cpp-options:
3842
-DBAZEL_BUILD=0
3943

@@ -56,31 +60,24 @@ library
5660

5761
-- other-modules:
5862
-- other-extensions:
59-
build-depends: base ^>= 4.13
60-
, aeson ^>= 1.4.2.0
61-
, aeson-pretty ^>= 0.8.8
62-
, bytestring ^>= 0.10.9
63-
, containers >= 0.6.0.1
64-
, directory ^>= 1.3.3.2
65-
, filepath ^>= 1.4.1
66-
, fused-effects ^>= 1.1
67-
, tree-sitter ^>= 0.9.0.0
68-
, semantic-source ^>= 0.1.0
69-
, template-haskell ^>= 2.15
70-
, bytestring ^>= 0.10.8.2
71-
, optparse-applicative >= 0.14.3 && < 0.16
72-
, pretty-simple ^>= 3.1.0.0
73-
, tree-sitter-python ^>= 0.9.0.1
74-
, text ^>= 1.2.3.1
75-
, unordered-containers ^>= 0.2.10
76-
, hedgehog >= 0.6 && <2
77-
, pathtype ^>= 0.8.1
78-
, Glob ^>= 0.10.0
79-
, attoparsec ^>= 0.13.2.2
80-
, text ^>= 1.2.3
81-
, tasty ^>= 1.2.3
82-
, tasty-hedgehog ^>= 1.0.0.1
83-
, tasty-hunit ^>= 0.10.0.2
63+
build-depends:
64+
, aeson ^>= 1.4.2.0
65+
, attoparsec ^>= 0.13.2.2
66+
, base >= 4.13 && < 5
67+
, bytestring ^>= 0.10.9
68+
, containers >= 0.6.0.1
69+
, directory ^>= 1.3.3.2
70+
, filepath ^>= 1.4.1
71+
, fused-effects ^>= 1.1
72+
, Glob ^>= 0.10.0
73+
, pathtype ^>= 0.8.1
74+
, semantic-source ^>= 0.1.0.1
75+
, tasty ^>= 1.2.3
76+
, tasty-hunit ^>= 0.10.0.2
77+
, template-haskell >= 2.15 && < 2.17
78+
, text ^>= 1.2.3.1
79+
, tree-sitter ^>= 0.9.0.0
80+
, unordered-containers ^>= 0.2.10
8481

8582
hs-source-dirs: src
8683
default-language: Haskell2010

0 commit comments

Comments
 (0)