Skip to content

Commit

Permalink
ghc-lib-parser 9.8
Browse files Browse the repository at this point in the history
  • Loading branch information
amesgen committed Sep 21, 2023
1 parent fa9a9bd commit d305614
Show file tree
Hide file tree
Showing 35 changed files with 314 additions and 145 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: [ghc928, ghc945, ghc962]
ghc: [ghc945, ghc962]
name: Build and test on ${{ matrix.ghc }}
runs-on: ubuntu-latest
steps:
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## Unreleased

* Switched to `ghc-lib-parser-9.8`, with the following new syntactic features:
* `ExtendedLiterals`: `123#Int8` is of type `Int8#`. (disabled by default)
* `TypeAbstractions`: `@k`-binders in type decls (enabled by default)
* GHC proposal #134: deprecating/warning about exports
* GHC proposal #541: warning categories

## Ormolu 0.7.2.0

* Preserve necessary braces for final function arguments. [Issue
Expand Down
7 changes: 7 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
packages: . extract-hackage-info

constraints: ormolu +dev

source-repository-package
type: git
location: https://github.com/amesgen/stuff
tag: cbd90acce362281be73279c0b5482a6f12922f83
subdir: ghc-lib-parser-9.8.1-alpha4
--sha256: sha256-WmOgZBFWYIOpPfGju+Oox+FehzxfeUCuV24lWab1JKc=
2 changes: 2 additions & 0 deletions data/examples/declaration/data/invisible-binders-out.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
type T :: forall k. k -> forall j. j -> Type
data T @k (a :: k) @(j :: Type) (b :: j)
2 changes: 2 additions & 0 deletions data/examples/declaration/data/invisible-binders.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
type T :: forall k. k -> forall j. j -> Type
data T @k (a :: k) @(j :: Type) (b :: j)
10 changes: 10 additions & 0 deletions data/examples/declaration/value/function/primitive-literals-out.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{-# LANGUAGE ExtendedLiterals #-}
{-# LANGUAGE MagicHash #-}

foo = 1#

bar = 2##

baz = 3#Word32

baz = 0b1010#Int64
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{-# LANGUAGE ExtendedLiterals, MagicHash #-}

foo = 1#

bar = 2##

baz = 3#Word32

baz = 0b1010#Int64
3 changes: 3 additions & 0 deletions data/examples/declaration/warning/warning-single-line-out.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ baz = 5

data Number = Number Dobule
{-# DEPRECATED Number "Use Scientific instead." #-}

head (a : _) = a
{-# WARNING in "x-partial" head "This function is partial..." #-}
3 changes: 3 additions & 0 deletions data/examples/declaration/warning/warning-single-line.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ baz = 5

data Number = Number Dobule
{-# DEPRECATED Number "Use Scientific instead." #-}

head (a:_) = a
{-# WARNING in "x-partial" head "This function is partial..." #-}
7 changes: 7 additions & 0 deletions data/examples/import/deprecated-export-multi-line-out.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module X
( {-# DEPRECATE D(D1) "D1 will not be exposed in a version 0.2 and later" #-}
D (D1, D2),
)
where

data D = D1 | D2
5 changes: 5 additions & 0 deletions data/examples/import/deprecated-export-multi-line.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module X
( {-# DEPRECATE D(D1) "D1 will not be exposed in a version 0.2 and later" #-}
D(D1, D2)
) where
data D = D1 | D2
3 changes: 3 additions & 0 deletions data/examples/import/deprecated-export-single-line-out.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module A ({-# DEPRECATED "blah" #-} x) where

x = True
1 change: 1 addition & 0 deletions data/examples/import/deprecated-export-single-line.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module A ( {-# DEPRECATED "blah" #-} x ) where { x = True }
3 changes: 0 additions & 3 deletions extract-hackage-info/extract-hackage-info.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,3 @@ executable extract-hackage-info
text >=2.0 && <3.0,
formatting >=7.1 && <7.3,
megaparsec >=9.0

if !impl(ghc >=9.2 && <9.3)
buildable: False
Loading

0 comments on commit d305614

Please sign in to comment.