Skip to content

Commit b7b1abc

Browse files
amesgenmrkkrp
authored andcommitted
Switch to ghc-lib-parser-9.14 and Cabal-syntax-3.16
1 parent 6f396b1 commit b7b1abc

Some content is hidden

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

51 files changed

+707
-498
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
ghc: [ghc984, ghc9101, ghc9121]
15+
ghc: [ghc9102, ghc9122, ghc9141]
1616
name: Build and test on ${{ matrix.ghc }}
1717
runs-on: ubuntu-latest
1818
steps:

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@
33
* Fixed printing of guards on pattern binds. [Issue
44
1178](https://github.com/tweag/ormolu/issues/1178).
55

6+
* Switched to `ghc-lib-parser-9.14`, with the following new syntactic features:
7+
* GHC proposal [#493](https://github.com/ghc-proposals/ghc-proposals/blob/e2c683698323cec3e33625369ae2b5f585387c70/proposals/0493-specialise-expressions.rst): expressions in SPECIALISE pragmas
8+
* Multiline strings in foreign import declarations.
9+
* `ExplicitNamespaces` supports the `data` namespace specifier in import and export lists, replacing `pattern`.
10+
* `LinearTypes` adds new syntax to support non-linear record fields.
11+
* `RequiredTypeArguments` allows visible forall in GADT syntax.
12+
13+
* Updated to `Cabal-syntax-3.16`.
14+
15+
* Correctly format string literals containing the `\^\` escape sequence. [Issue
16+
1165](https://github.com/tweag/ormolu/issues/1165).
17+
618
## Ormolu 0.8.0.2
719

820
* Fixed a performance regression introduced in 0.8.0.0. [Issue

cabal.project

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
packages: . extract-hackage-info
22

3-
index-state: 2025-01-16T23:07:37Z
3+
index-state: 2026-02-17T00:12:25Z
44

55
tests: True
66
multi-repl: True
77

88
constraints: ormolu +dev
9+
10+
allow-newer:
11+
*:template-haskell,
12+
*:base,
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{-# LANGUAGE LinearTypes #-}
2+
3+
data Record = Rec {x %'Many :: Int, y :: Char}
4+
5+
data T2 a b c where
6+
MkT2 :: a -> b %1 -> c %1 -> T2 a b c
7+
8+
data T2 a b c = MkT2 {x %Many :: a, y :: b, z :: c}
9+
10+
data T3 a m where
11+
MkT3 :: a %m -> T3 a m
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{-# LANGUAGE LinearTypes #-}
2+
data Record = Rec { x %'Many :: Int, y :: Char }
3+
4+
data T2 a b c where
5+
MkT2 :: a -> b %1 -> c %1 -> T2 a b c
6+
7+
data T2 a b c = MkT2 { x %Many :: a, y :: b, z :: c }
8+
9+
data T3 a m where
10+
MkT3 :: a %m -> T3 a m
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
data T a where
2+
Typed :: forall a -> a -> T a
3+
4+
f1 (Typed a x) = x :: a
5+
6+
f2 (Typed Int n) = n * 2
7+
8+
f3 (Typed ((->) w Bool) g) = not . g
9+
10+
data D x where
11+
MkD1 ::
12+
forall a b ->
13+
a ->
14+
b ->
15+
D (a, b)
16+
MkD2 ::
17+
forall a.
18+
forall b ->
19+
a ->
20+
b ->
21+
D (a, b)
22+
MkD3 ::
23+
forall a ->
24+
a ->
25+
forall b ->
26+
b ->
27+
D (a, b)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
data T a where
2+
Typed :: forall a -> a -> T a
3+
4+
f1 (Typed a x) = x :: a
5+
f2 (Typed Int n) = n*2
6+
f3 (Typed ((->) w Bool) g) = not . g
7+
8+
data D x where
9+
MkD1 :: forall a b ->
10+
a ->
11+
b ->
12+
D (a, b)
13+
14+
MkD2 :: forall a.
15+
forall b ->
16+
a ->
17+
b ->
18+
D (a, b)
19+
20+
MkD3 :: forall a ->
21+
a ->
22+
forall b ->
23+
b ->
24+
D (a, b)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{-# LANGUAGE MultilineStrings #-}
2+
3+
foreign import capi
4+
"""
5+
foo
6+
bar
7+
"""
8+
foo :: Int -> Int
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{-# language MultilineStrings #-}
2+
3+
foreign import capi """
4+
foo
5+
bar
6+
""" foo :: Int -> Int
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{-# SPECIALIZE addMult @Double #-}
2+
{-# SPECIALIZE addMult (5 :: Int) #-}
3+
{-# SPECIALIZE addMult 5 :: Int -> Int #-}
4+
5+
{-# SPECIALIZE [1] forall x y. f @Int True (x, y) #-}
6+
7+
{-# SPECIALIZE forall x xs. loop (x : xs)
8+
#-}

0 commit comments

Comments
 (0)