Skip to content

Commit 8a77af5

Browse files
authored
Merge branch 'main' into mergify/configuration-deprecated-update
2 parents c737e48 + a621e14 commit 8a77af5

Some content is hidden

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

43 files changed

+433
-271
lines changed

.github/dependabot.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"

.travis-functions.sh

-3
This file was deleted.

dhall-bash/dhall-bash.cabal

+5-5
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ Executable dhall-to-bash
4444
Other-Modules:
4545
Paths_dhall_bash
4646
Build-Depends:
47-
base ,
48-
bytestring ,
49-
dhall ,
50-
dhall-bash ,
51-
optparse-generic >= 1.1.1 && < 1.6 ,
47+
base >= 4.11.0.0 && < 5 ,
48+
bytestring ,
49+
dhall ,
50+
dhall-bash ,
51+
optparse-generic >= 1.1.1 && < 1.6,
5252
text
5353
GHC-Options: -Wall
5454
Default-Language: Haskell2010

dhall-csv/dhall-csv.cabal

+33-33
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,17 @@ Executable dhall-to-csv
5757
Hs-Source-Dirs: dhall-to-csv
5858
Main-Is: Main.hs
5959
Build-Depends:
60-
ansi-terminal ,
61-
base ,
62-
bytestring ,
63-
cassava ,
64-
dhall ,
65-
dhall-csv ,
66-
optparse-applicative ,
67-
prettyprinter ,
68-
prettyprinter-ansi-terminal >= 1.1.1 && < 1.2 ,
69-
unordered-containers ,
70-
vector ,
60+
ansi-terminal ,
61+
base >= 4.12.0.0 && < 5 ,
62+
bytestring ,
63+
cassava ,
64+
dhall ,
65+
dhall-csv ,
66+
optparse-applicative ,
67+
prettyprinter ,
68+
prettyprinter-ansi-terminal >= 1.1.1 && < 1.2,
69+
unordered-containers ,
70+
vector ,
7171
text
7272
Other-Modules:
7373
Paths_dhall_csv
@@ -78,17 +78,17 @@ Executable csv-to-dhall
7878
Hs-Source-Dirs: csv-to-dhall
7979
Main-Is: Main.hs
8080
Build-Depends:
81-
ansi-terminal ,
82-
base ,
83-
bytestring ,
84-
cassava ,
85-
dhall ,
86-
dhall-csv ,
87-
optparse-applicative ,
88-
prettyprinter ,
89-
prettyprinter-ansi-terminal >= 1.1.1 && < 1.2 ,
90-
unordered-containers ,
91-
vector ,
81+
ansi-terminal ,
82+
base >= 4.12.0.0 && < 5 ,
83+
bytestring ,
84+
cassava ,
85+
dhall ,
86+
dhall-csv ,
87+
optparse-applicative ,
88+
prettyprinter ,
89+
prettyprinter-ansi-terminal >= 1.1.1 && < 1.2,
90+
unordered-containers ,
91+
vector ,
9292
text
9393
Other-Modules:
9494
Paths_dhall_csv
@@ -100,17 +100,17 @@ Test-Suite tasty
100100
Hs-Source-Dirs: tasty
101101
Main-Is: Main.hs
102102
Build-Depends:
103-
base ,
104-
bytestring ,
105-
cassava ,
106-
dhall ,
107-
dhall-csv ,
108-
filepath ,
109-
tasty < 1.6 ,
110-
tasty-silver < 3.4 ,
111-
tasty-hunit >= 0.2 ,
112-
unordered-containers ,
113-
text ,
103+
base >= 4.12.0.0 && < 5 ,
104+
bytestring ,
105+
cassava ,
106+
dhall ,
107+
dhall-csv ,
108+
filepath ,
109+
tasty < 1.6,
110+
tasty-silver < 3.4,
111+
tasty-hunit >= 0.2 ,
112+
unordered-containers ,
113+
text ,
114114
vector
115115
GHC-Options: -Wall
116116
Default-Language: Haskell2010

dhall-docs/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
1.0.12
2+
3+
* [Fix white flashes on page load in dark mode](https://github.com/dhall-lang/dhall-haskell/pull/2574)
4+
* [Render standalone text files as preformatted text](https://github.com/dhall-lang/dhall-haskell/pull/2565)
5+
* [Render Markdown files as HTML](https://github.com/dhall-lang/dhall-haskell/pull/2579)
6+
* [Default to browser settings for dark mode](https://github.com/dhall-lang/dhall-haskell/pull/2582)
7+
* [Fix typo and formatting in a warning message](https://github.com/dhall-lang/dhall-haskell/pull/2572)
8+
19
1.0.11
210

311
* Build against `dhall-1.42`

dhall-docs/dhall-docs.cabal

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Name: dhall-docs
2-
Version: 1.0.11
2+
Version: 1.0.12
33
Cabal-Version: >=1.10
44
Build-Type: Simple
55
License: BSD3
@@ -110,8 +110,8 @@ Executable dhall-docs
110110
Hs-Source-Dirs: dhall-docs
111111
Main-Is: Main.hs
112112
Build-Depends:
113-
base ,
114-
dhall ,
113+
base >= 4.11.0.0 && < 5,
114+
dhall ,
115115
dhall-docs
116116
Other-Modules:
117117
Paths_dhall_docs
@@ -124,10 +124,10 @@ Test-Suite doctest
124124
Main-Is: Main.hs
125125
GHC-Options: -Wall
126126
Build-Depends:
127-
base ,
128-
directory,
129-
filepath < 1.6 ,
130-
doctest >= 0.7.0
127+
base >= 4.11.0.0 && < 5 ,
128+
directory ,
129+
filepath < 1.6,
130+
doctest >= 0.7.0
131131
Other-Extensions: OverloadedStrings RecordWildCards
132132
Default-Language: Haskell2010
133133

@@ -136,12 +136,12 @@ Test-Suite tasty
136136
Hs-Source-Dirs: tasty
137137
Main-Is: Main.hs
138138
Build-Depends:
139-
base ,
140-
bytestring ,
141-
containers ,
142-
dhall ,
143-
dhall-docs ,
144-
foldl < 1.5 ,
139+
base >= 4.11.0.0 && < 5 ,
140+
bytestring ,
141+
containers ,
142+
dhall ,
143+
dhall-docs ,
144+
foldl < 1.5 ,
145145

146146
-- lucid preserves input attribute order since v2.11.0
147147
lucid >= 2.11.0 ,

dhall-json/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
1.7.13
2+
3+
* [Export `UnionConv`](https://github.com/dhall-lang/dhall-haskell/pull/2570)
4+
15
1.7.12
26

37
* Build against `dhall-1.42`

dhall-json/dhall-json.cabal

+17-17
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ Executable dhall-to-json
6868
Hs-Source-Dirs: dhall-to-json
6969
Main-Is: Main.hs
7070
Build-Depends:
71-
base ,
72-
aeson ,
73-
aeson-pretty >= 0.8.5 && < 0.9 ,
74-
bytestring ,
75-
dhall ,
76-
dhall-json ,
77-
optparse-applicative ,
71+
base >= 4.11.0.0 && < 5 ,
72+
aeson ,
73+
aeson-pretty >= 0.8.5 && < 0.9,
74+
bytestring ,
75+
dhall ,
76+
dhall-json ,
77+
optparse-applicative ,
7878
text
7979
Other-Modules:
8080
Paths_dhall_json
@@ -85,7 +85,7 @@ Executable dhall-to-yaml
8585
Hs-Source-Dirs: dhall-to-yaml
8686
Main-Is: Main.hs
8787
Build-Depends:
88-
base ,
88+
base >= 4.11.0.0 && < 5,
8989
dhall-json
9090
Other-Modules:
9191
Paths_dhall_json
@@ -96,7 +96,7 @@ Executable json-to-dhall
9696
Hs-Source-Dirs: json-to-dhall
9797
Main-Is: Main.hs
9898
Build-Depends:
99-
base ,
99+
base >= 4.11.0.0 && < 5 ,
100100
aeson ,
101101
ansi-terminal >= 0.6.3.1 && < 1.2 ,
102102
bytestring ,
@@ -117,14 +117,14 @@ Test-Suite tasty
117117
Hs-Source-Dirs: tasty
118118
Main-Is: Main.hs
119119
Build-Depends:
120-
base ,
121-
aeson ,
122-
bytestring ,
123-
dhall ,
124-
dhall-json ,
125-
tasty < 1.6,
126-
text ,
127-
tasty-hunit >= 0.2,
120+
base >= 4.11.0.0 && < 5 ,
121+
aeson ,
122+
bytestring ,
123+
dhall ,
124+
dhall-json ,
125+
tasty < 1.6,
126+
text ,
127+
tasty-hunit >= 0.2 ,
128128
tasty-silver >= 3.0
129129
GHC-Options: -Wall
130130
Default-Language: Haskell2010

dhall-lsp-server/dhall-lsp-server.cabal

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: dhall-lsp-server
2-
Version: 1.1.3
2+
Version: 1.1.4
33
cabal-version: 1.12
44
synopsis: Language Server Protocol (LSP) server for Dhall
55
homepage: https://github.com/dhall-lang/dhall-haskell/tree/master/dhall-lsp-server#readme
@@ -53,7 +53,7 @@ library
5353
, dhall >= 1.38.0 && < 1.43
5454
, dhall-json >= 1.4 && < 1.8
5555
, filepath >= 1.4.2 && < 1.6
56-
, lsp >= 2.1.0.0 && < 2.2
56+
, lsp >= 2.1.0.0 && < 2.8
5757
, lens >= 4.16.1 && < 5.4
5858
-- megaparsec follows SemVer: https://github.com/mrkkrp/megaparsec/issues/469#issuecomment-927918469
5959
, megaparsec >= 7.0.2 && < 10
@@ -77,7 +77,7 @@ executable dhall-lsp-server
7777
default-extensions: RecordWildCards OverloadedStrings
7878
ghc-options: -rtsopts
7979
build-depends:
80-
base
80+
base >= 4.11 && < 5
8181
, dhall-lsp-server
8282
, optparse-applicative
8383
default-language: Haskell2010
@@ -89,10 +89,10 @@ Test-Suite doctest
8989
Main-Is: Main.hs
9090
GHC-Options: -Wall
9191
Build-Depends:
92-
base ,
93-
directory >= 1.3.1.5 && < 1.4 ,
94-
filepath < 1.6 ,
95-
doctest >= 0.7.0 ,
92+
base >= 4.11 && < 5 ,
93+
directory >= 1.3.1.5 && < 1.4,
94+
filepath < 1.6,
95+
doctest >= 0.7.0 ,
9696
QuickCheck
9797
Other-Extensions: OverloadedStrings RecordWildCards
9898
Default-Language: Haskell2010
@@ -103,12 +103,12 @@ Test-Suite tests
103103
Main-Is: Main.hs
104104
GHC-Options: -Wall
105105
Build-Depends:
106-
base ,
107-
lsp-types >= 2.0.1 && < 2.1 ,
108-
hspec >= 2.7 && < 2.12 ,
109-
lsp-test >= 0.15.0.0 && < 0.16 ,
110-
tasty >= 0.11.2 && < 1.6 ,
111-
tasty-hspec >= 1.1 && < 1.3 ,
106+
base >= 4.11 && < 5 ,
107+
lsp-types >= 2.0.1 && < 2.4 ,
108+
hspec >= 2.7 && < 2.12,
109+
lsp-test >= 0.15.0.0 && < 0.18,
110+
tasty >= 0.11.2 && < 1.6 ,
111+
tasty-hspec >= 1.1 && < 1.3 ,
112112
text >= 0.11 && < 2.2
113113
Build-Tool-Depends: dhall-lsp-server:dhall-lsp-server
114114
Default-Language: Haskell2010

dhall-lsp-server/src/Dhall/LSP/Handlers.hs

+14-1
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,18 @@ import Text.Megaparsec (SourcePos (..), unPos)
9191
import qualified Data.Aeson as Aeson
9292
import qualified Data.Map.Strict as Map
9393
import qualified Data.Text as Text
94-
import qualified Data.Text.Utf16.Rope as Rope
9594
import qualified Language.LSP.Protocol.Types as LSP.Types
9695
import qualified Language.LSP.Server as LSP
9796
import qualified Language.LSP.VFS as LSP
9897
import qualified Network.URI as URI
9998
import qualified Network.URI.Encode as URI
10099

100+
#if MIN_VERSION_lsp(2,4,0)
101+
import qualified Data.Text.Utf16.Rope.Mixed as Rope
102+
#else
103+
import qualified Data.Text.Utf16.Rope as Rope
104+
#endif
105+
101106
liftLSP :: LspT ServerConfig IO a -> HandlerM a
102107
liftLSP m = lift (lift m)
103108

@@ -226,15 +231,23 @@ documentLinkHandler =
226231
filePath <- localToPath prefix file
227232
let filePath' = basePath </> filePath -- absolute file path
228233
let _range = rangeToJSON range_
234+
#if MIN_VERSION_lsp(2,5,0)
235+
let _target = Just (filePathToUri filePath')
236+
#else
229237
let _target = Just (getUri (filePathToUri filePath'))
238+
#endif
230239
let _tooltip = Nothing
231240
let _data_ = Nothing
232241
return [DocumentLink {..}]
233242

234243
go (range_, Import (ImportHashed _ (Remote url)) _) = do
235244
let _range = rangeToJSON range_
236245
let url' = url { headers = Nothing }
246+
#if MIN_VERSION_lsp(2,5,0)
247+
let _target = Just (Uri (pretty url'))
248+
#else
237249
let _target = Just (pretty url')
250+
#endif
238251
let _tooltip = Nothing
239252
let _data_ = Nothing
240253
return [DocumentLink {..}]

dhall-lsp-server/src/Dhall/LSP/Server.hs

+8
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,15 @@ runWith settings = withLogger $ \ioLogger -> do
6767

6868
let defaultConfig = def
6969

70+
#if MIN_VERSION_lsp(2,2,0)
71+
let configSection = "dhall"
72+
73+
let onConfigChange _newConfig = return ()
74+
75+
let parseConfig _oldConfig json =
76+
#else
7077
let onConfigurationChange _oldConfig json =
78+
#endif
7179
case fromJSON json of
7280
Aeson.Success config -> Right config
7381
Aeson.Error string -> Left (Text.pack string)

0 commit comments

Comments
 (0)