Skip to content

Commit

Permalink
Cabal flag to allow embedding Agda 2.6.2.2 instead of 2.6.3
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasabel committed Nov 23, 2023
1 parent df8fb16 commit 6b0386c
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 10 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## v0.2.6.3.0 - 2023-11-23

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

### Added
- Build flag `Agda-2-6-2-2` to embed Agda-2.6.2.2 rather than 2.6.3.

## v0.2.6.2.2.1 - 2023-11-21

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

### Changed

- Bundle Agda-2.6.2.2.
- Embed Agda-2.6.2.2.
- 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.
- Builds with `lsp` < 1.5 on GHC 8.10 (LTS 18.28) and 9.0 (LTS 19.33).

Expand Down
29 changes: 26 additions & 3 deletions agda-language-server.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ source-repository head
type: git
location: https://github.com/banacorn/agda-language-server

flag Agda-2-6-2-2
description: Embed Agda-2.6.2.2 (rather than 2.6.3)
manual: True
default: False

library
exposed-modules:
Agda
Expand Down Expand Up @@ -67,7 +72,7 @@ library
TypeOperators
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
build-depends:
Agda ==2.6.3
Agda
, aeson
, base >=4.7 && <5
, bytestring
Expand All @@ -81,6 +86,12 @@ library
, strict
, text
default-language: Haskell2010
if flag(Agda-2-6-2-2)
build-depends:
Agda ==2.6.2.2
else
build-depends:
Agda ==2.6.3

executable als
main-is: Main.hs
Expand All @@ -94,7 +105,7 @@ executable als
TypeOperators
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
build-depends:
Agda ==2.6.3
Agda
, aeson
, agda-language-server
, base >=4.7 && <5
Expand All @@ -109,6 +120,12 @@ executable als
, strict
, text
default-language: Haskell2010
if flag(Agda-2-6-2-2)
build-depends:
Agda ==2.6.2.2
else
build-depends:
Agda ==2.6.3

test-suite als-test
type: exitcode-stdio-1.0
Expand Down Expand Up @@ -150,7 +167,7 @@ test-suite als-test
TypeOperators
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
build-depends:
Agda ==2.6.3
Agda
, aeson
, base >=4.7 && <5
, bytestring
Expand All @@ -168,3 +185,9 @@ test-suite als-test
, tasty-quickcheck
, text
default-language: Haskell2010
if flag(Agda-2-6-2-2)
build-depends:
Agda ==2.6.2.2
else
build-depends:
Agda ==2.6.3
25 changes: 20 additions & 5 deletions package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,24 @@ category: Development
# common to point users to the README.md file.
description: Please see the README on GitHub at <https://github.com/agda/agda-language-server#readme>

default-extensions:
- LambdaCase
- OverloadedStrings
- TypeOperators
flags:
Agda-2-6-2-2:
description: Embed Agda-2.6.2.2 (rather than 2.6.3)
manual: true
default: false

when:
- condition: flag(Agda-2-6-2-2)
then:
dependencies:
- Agda == 2.6.2.2
else:
dependencies:
- Agda == 2.6.3

dependencies:
- base >= 4.7 && < 5
- Agda == 2.6.3
- Agda
- aeson
- bytestring
- containers
Expand All @@ -44,6 +54,11 @@ dependencies:
- text
- process

default-extensions:
- LambdaCase
- OverloadedStrings
- TypeOperators

library:
source-dirs: src
ghc-options:
Expand Down
2 changes: 2 additions & 0 deletions stack-8.10-Agda-2.6.2.2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ extra-deps:
- lsp-types-1.3.0.1

flags:
agda-language-server:
Agda-2-6-2-2: true
Agda:
# optimise-heavily: true
enable-cluster-counting: true
2 changes: 2 additions & 0 deletions stack-9.0-Agda-2.6.2.2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ extra-deps:
# - Agda-2.6.2.2 # This is the lts-19.33 version of Agda

flags:
agda-language-server:
Agda-2-6-2-2: true
Agda:
# optimise-heavily: true
enable-cluster-counting: true
2 changes: 2 additions & 0 deletions stack-9.2-Agda-2.6.2.2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ extra-deps:
- Agda-2.6.2.2

flags:
agda-language-server:
Agda-2-6-2-2: true
Agda:
# optimise-heavily: true
enable-cluster-counting: true

0 comments on commit 6b0386c

Please sign in to comment.