Skip to content

Commit 6b0386c

Browse files
committed
Cabal flag to allow embedding Agda 2.6.2.2 instead of 2.6.3
1 parent df8fb16 commit 6b0386c

6 files changed

+57
-10
lines changed

CHANGELOG.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
77
## v0.2.6.3.0 - 2023-11-23
88

99
### Changed
10-
- Bundle Agda-2.6.3.
10+
- Embed Agda-2.6.3.
1111
- Builds with `lsp` < 1.7 on GHC 8.10 (LTS 18.28), 9.0 (LTS 19.33), and 9.2 (LTS 20.26),
1212
and with Cabal also on 9.4 and 9.6.
1313

14+
### Added
15+
- Build flag `Agda-2-6-2-2` to embed Agda-2.6.2.2 rather than 2.6.3.
16+
1417
## v0.2.6.2.2.1 - 2023-11-21
1518

1619
### Added
@@ -22,7 +25,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
2225

2326
### Changed
2427

25-
- Bundle Agda-2.6.2.2.
28+
- Embed Agda-2.6.2.2.
2629
- Versioning scheme: _x.a.b.c.d.y_ where _a.b.c.d_ is the 4-digit Agda version (2.6.2.2), _x_ is 0 but may be bumped for revolutionary changes to the agda-language-server, and _y_ is for patch releases.
2730
- Builds with `lsp` < 1.5 on GHC 8.10 (LTS 18.28) and 9.0 (LTS 19.33).
2831

agda-language-server.cabal

+26-3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ source-repository head
3030
type: git
3131
location: https://github.com/banacorn/agda-language-server
3232

33+
flag Agda-2-6-2-2
34+
description: Embed Agda-2.6.2.2 (rather than 2.6.3)
35+
manual: True
36+
default: False
37+
3338
library
3439
exposed-modules:
3540
Agda
@@ -67,7 +72,7 @@ library
6772
TypeOperators
6873
ghc-options: -Wincomplete-patterns -Wunused-do-bind -Wunused-foralls -Wwarnings-deprecations -Wwrong-do-bind -Wmissing-fields -Wmissing-methods -Wmissing-pattern-synonym-signatures -Wmissing-signatures -Werror=incomplete-patterns -fno-warn-orphans
6974
build-depends:
70-
Agda ==2.6.3
75+
Agda
7176
, aeson
7277
, base >=4.7 && <5
7378
, bytestring
@@ -81,6 +86,12 @@ library
8186
, strict
8287
, text
8388
default-language: Haskell2010
89+
if flag(Agda-2-6-2-2)
90+
build-depends:
91+
Agda ==2.6.2.2
92+
else
93+
build-depends:
94+
Agda ==2.6.3
8495

8596
executable als
8697
main-is: Main.hs
@@ -94,7 +105,7 @@ executable als
94105
TypeOperators
95106
ghc-options: -Wincomplete-patterns -Wunused-do-bind -Wunused-foralls -Wwarnings-deprecations -Wwrong-do-bind -Wmissing-fields -Wmissing-methods -Wmissing-pattern-synonym-signatures -Wmissing-signatures -threaded -rtsopts -with-rtsopts=-N -Werror=incomplete-patterns -fno-warn-orphans
96107
build-depends:
97-
Agda ==2.6.3
108+
Agda
98109
, aeson
99110
, agda-language-server
100111
, base >=4.7 && <5
@@ -109,6 +120,12 @@ executable als
109120
, strict
110121
, text
111122
default-language: Haskell2010
123+
if flag(Agda-2-6-2-2)
124+
build-depends:
125+
Agda ==2.6.2.2
126+
else
127+
build-depends:
128+
Agda ==2.6.3
112129

113130
test-suite als-test
114131
type: exitcode-stdio-1.0
@@ -150,7 +167,7 @@ test-suite als-test
150167
TypeOperators
151168
ghc-options: -Wincomplete-patterns -Wunused-do-bind -Wunused-foralls -Wwarnings-deprecations -Wwrong-do-bind -Wmissing-fields -Wmissing-methods -Wmissing-pattern-synonym-signatures -Wmissing-signatures -threaded -rtsopts -with-rtsopts=-N -Werror=incomplete-patterns -fno-warn-orphans
152169
build-depends:
153-
Agda ==2.6.3
170+
Agda
154171
, aeson
155172
, base >=4.7 && <5
156173
, bytestring
@@ -168,3 +185,9 @@ test-suite als-test
168185
, tasty-quickcheck
169186
, text
170187
default-language: Haskell2010
188+
if flag(Agda-2-6-2-2)
189+
build-depends:
190+
Agda ==2.6.2.2
191+
else
192+
build-depends:
193+
Agda ==2.6.3

package.yaml

+20-5
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,24 @@ category: Development
2424
# common to point users to the README.md file.
2525
description: Please see the README on GitHub at <https://github.com/agda/agda-language-server#readme>
2626

27-
default-extensions:
28-
- LambdaCase
29-
- OverloadedStrings
30-
- TypeOperators
27+
flags:
28+
Agda-2-6-2-2:
29+
description: Embed Agda-2.6.2.2 (rather than 2.6.3)
30+
manual: true
31+
default: false
32+
33+
when:
34+
- condition: flag(Agda-2-6-2-2)
35+
then:
36+
dependencies:
37+
- Agda == 2.6.2.2
38+
else:
39+
dependencies:
40+
- Agda == 2.6.3
3141

3242
dependencies:
3343
- base >= 4.7 && < 5
34-
- Agda == 2.6.3
44+
- Agda
3545
- aeson
3646
- bytestring
3747
- containers
@@ -44,6 +54,11 @@ dependencies:
4454
- text
4555
- process
4656

57+
default-extensions:
58+
- LambdaCase
59+
- OverloadedStrings
60+
- TypeOperators
61+
4762
library:
4863
source-dirs: src
4964
ghc-options:

stack-8.10-Agda-2.6.2.2.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ extra-deps:
1414
- lsp-types-1.3.0.1
1515

1616
flags:
17+
agda-language-server:
18+
Agda-2-6-2-2: true
1719
Agda:
1820
# optimise-heavily: true
1921
enable-cluster-counting: true

stack-9.0-Agda-2.6.2.2.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ extra-deps:
1212
# - Agda-2.6.2.2 # This is the lts-19.33 version of Agda
1313

1414
flags:
15+
agda-language-server:
16+
Agda-2-6-2-2: true
1517
Agda:
1618
# optimise-heavily: true
1719
enable-cluster-counting: true

stack-9.2-Agda-2.6.2.2.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ extra-deps:
1010
- Agda-2.6.2.2
1111

1212
flags:
13+
agda-language-server:
14+
Agda-2-6-2-2: true
1315
Agda:
1416
# optimise-heavily: true
1517
enable-cluster-counting: true

0 commit comments

Comments
 (0)