Skip to content

Commit 04299ea

Browse files
committed
Update Haskell compiler to GHC 9.10
1 parent 4426a86 commit 04299ea

8 files changed

Lines changed: 69 additions & 117 deletions

File tree

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
branches: [main]
88

99
env:
10-
ghc: "9.8.4"
10+
ghc: "9.10.3"
1111
cabal: "3.12.1.0"
1212

1313
jobs:
@@ -17,7 +17,7 @@ jobs:
1717
- uses: actions/checkout@v4
1818

1919
- name: Install devbox
20-
uses: jetify-com/devbox-install-action@v0.13.0
20+
uses: jetify-com/devbox-install-action@v0.14.0
2121
with:
2222
enable-cache: true
2323

@@ -38,7 +38,7 @@ jobs:
3838

3939
linux:
4040
runs-on: ubuntu-latest
41-
container: alpine:3.17
41+
container: alpine:3.18
4242
needs: validate-code-formatting
4343

4444
steps:
@@ -48,7 +48,7 @@ jobs:
4848
- uses: actions/checkout@v4
4949

5050
- name: Install GHCup
51-
run: curl https://downloads.haskell.org/~ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 -o /usr/local/bin/ghcup && chmod a+x /usr/local/bin/ghcup
51+
run: curl https://downloads.haskell.org/~ghcup/0.1.50.2/x86_64-linux-ghcup-0.1.50.2 -o /usr/local/bin/ghcup && chmod a+x /usr/local/bin/ghcup
5252

5353
- name: Cache ghcup
5454
uses: actions/cache@v4

builder/src/Reporting/Exit.hs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,7 @@ diffToReport diff =
128128
Help.report
129129
"UNKNOWN PACKAGE"
130130
Nothing
131-
( "I cannot find a package called:"
132-
)
131+
("I cannot find a package called:")
133132
[ D.indent 4 $ D.red $ D.fromChars $ Pkg.toChars pkg,
134133
"Maybe you want one of these instead?",
135134
D.indent 4 $ D.dullyellow $ D.vcat $ map (D.fromChars . Pkg.toChars) suggestions,
@@ -1976,8 +1975,7 @@ makeToReport make =
19761975
Help.report
19771976
"TOO MANY FILES"
19781977
Nothing
1979-
( "When producing an HTML file or executable, I can only handle one file."
1980-
)
1978+
("When producing an HTML file or executable, I can only handle one file.")
19811979
[ D.fillSep
19821980
[ "Switch",
19831981
"to",
@@ -2145,8 +2143,7 @@ makeToReport make =
21452143
Help.report
21462144
"HTML FILES CAN ONLY BE CREATED FOR BROWSER PLATFORM"
21472145
Nothing
2148-
( "When producing a HTML file, I require that the project platform is `browser`."
2149-
)
2146+
("When producing a HTML file, I require that the project platform is `browser`.")
21502147
[ D.reflow $
21512148
"Try changing the `target` value in `gren.json` to `browser`.\
21522149
\ alternatively, pass a filename ending with `.js` to the compiler."
@@ -2155,8 +2152,7 @@ makeToReport make =
21552152
Help.report
21562153
"EXECUTABLES CAN ONLY BE CREATED FOR NODE PLATFORM"
21572154
Nothing
2158-
( "When producing an executable, I require that the project platform is `node`."
2159-
)
2155+
("When producing an executable, I require that the project platform is `node`.")
21602156
[ D.reflow $
21612157
"Try changing the `target` value in `gren.json` to `node`.\
21622158
\ alternatively, pass a filename ending with `.js` to the compiler."

builder/src/Reporting/Task.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ where
1616

1717
newtype Task x a
1818
= Task
19-
( forall result. (a -> IO result) -> (x -> IO result) -> IO result
20-
)
19+
(forall result. (a -> IO result) -> (x -> IO result) -> IO result)
2120

2221
run :: Task x a -> IO (Either x a)
2322
run (Task task) =

compiler/src/Generate/JavaScript.hs

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -176,13 +176,11 @@ addGlobalHelp mode graph global@(Opt.Global home _) state =
176176
| length args > 1 ->
177177
addStmt
178178
(addDeps deps state)
179-
( trackedFn region global args (Expr.generateFunctionImplementation mode argLookup home funcStart args body)
180-
)
179+
(trackedFn region global args (Expr.generateFunctionImplementation mode argLookup home funcStart args body))
181180
Just (Opt.Define region expr deps) ->
182181
addStmt
183182
(addDeps deps state)
184-
( trackedVar region global (Expr.generate mode argLookup home expr)
185-
)
183+
(trackedVar region global (Expr.generate mode argLookup home expr))
186184
Just (Opt.DefineTailFunc region argNames body deps) ->
187185
addStmt
188186
(addDeps deps state)
@@ -193,49 +191,41 @@ addGlobalHelp mode graph global@(Opt.Global home _) state =
193191
| arity > 1 ->
194192
addStmt
195193
state
196-
( ctor global arity (Expr.generateCtorImplementation mode global index arity)
197-
)
194+
(ctor global arity (Expr.generateCtorImplementation mode global index arity))
198195
Just (Opt.Ctor index arity) ->
199196
addStmt
200197
state
201-
( var global (Expr.generateCtor mode global index arity)
202-
)
198+
(var global (Expr.generateCtor mode global index arity))
203199
Just (Opt.Link linkedGlobal) ->
204200
addGlobal mode graph state linkedGlobal
205201
Just (Opt.Cycle names values functions deps) ->
206202
addStmt
207203
(addDeps deps state)
208-
( generateCycle mode argLookup global names values functions
209-
)
204+
(generateCycle mode argLookup global names values functions)
210205
Just (Opt.Manager effectsType) ->
211206
generateManager mode graph global effectsType state
212207
Just (Opt.Kernel chunks deps) ->
213208
addDeps deps (addKernel state (generateKernel mode chunks))
214209
Just (Opt.Enum index) ->
215210
addStmt
216211
state
217-
( generateEnum mode global index
218-
)
212+
(generateEnum mode global index)
219213
Just Opt.Box ->
220214
addStmt
221215
(addGlobal mode graph state identity)
222-
( generateBox mode global
223-
)
216+
(generateBox mode global)
224217
Just (Opt.PortIncoming isBytes decoder deps) ->
225218
addStmt
226219
(addDeps deps state)
227-
( generatePort mode global "incomingPort" isBytes decoder
228-
)
220+
(generatePort mode global "incomingPort" isBytes decoder)
229221
Just (Opt.PortOutgoing isBytes encoder deps) ->
230222
addStmt
231223
(addDeps deps state)
232-
( generatePort mode global "outgoingPort" isBytes encoder
233-
)
224+
(generatePort mode global "outgoingPort" isBytes encoder)
234225
Just (Opt.PortTask inputBytes maybeEncoder outputBytes decoder deps) ->
235226
addStmt
236227
(addDeps deps state)
237-
( generateTaskPort mode global inputBytes maybeEncoder outputBytes decoder
238-
)
228+
(generateTaskPort mode global inputBytes maybeEncoder outputBytes decoder)
239229

240230
addStmt :: State -> JS.Stmt -> State
241231
addStmt (State seen builder) stmt =

devbox.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.14.0/.schema/devbox.schema.json",
33
"packages": [
44
"nodejs@20",
5-
"ormolu@0.7",
6-
"ghc@9.8",
5+
"ormolu@0.8",
6+
"ghc@9.10",
77
88
],
99
"shell": {

0 commit comments

Comments
 (0)