Skip to content

Commit

Permalink
ghc-lib-parser 9.10
Browse files Browse the repository at this point in the history
  • Loading branch information
amesgen committed May 4, 2024
1 parent 6079787 commit 984a1d2
Show file tree
Hide file tree
Showing 43 changed files with 503 additions and 410 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: [ghc947, ghc963, ghc981]
ghc: [ghc965, ghc982]
name: Build and test on ${{ matrix.ghc }}
runs-on: ubuntu-latest
steps:
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: 20b6b9d136502ba442fde9e8e2903d29772fcfee
subdir: ghc-lib-parser-9.10.1-rc
--sha256: sha256-s6QUeNV+spH9gR2xhu+Lg2EiI8viGqmIkKnSGZVwILI=
6 changes: 3 additions & 3 deletions data/examples/backpack/signature-0-out.hsig
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ instance Primitive Prim

name :: String

-- \| The name of the primitive used as the seed stretcher
-- \| Test line 2
-- | The name of the primitive used as the seed stretcher
-- | Test line 2
-- | Test line 3
-- \|Test line 4
-- |Test line 4
primName :: String

randomBlocks ::
Expand Down
2 changes: 1 addition & 1 deletion data/examples/declaration/value/function/pragmas-out.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sccfoo = {-# SCC foo #-} 1
sccfoo = {-# SCC "foo" #-} 1

sccbar =
{-# SCC "barbaz" #-}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
vshow :: forall a -> (Show a) => a -> String
vshow t x = show (x :: t)

s1 = vshow Int 42

s2 = vshow Double 42

a1 = f (type (Int -> Bool))

a2 = f (type ((Read T) => T))

a3 = f (type (forall a. a))

a4 = f (type (forall a. (Read a) => String -> a))

foo =
f
( type ( Maybe
Int
)
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
vshow :: forall a -> Show a => a -> String
vshow t x = show (x :: t)

s1 = vshow Int 42
s2 = vshow Double 42

a1 = f (type (Int -> Bool))
a2 = f (type (Read T => T))
a3 = f (type (forall a. a))
a4 = f (type (forall a. Read a => String -> a))

foo = f (type (Maybe
Int))
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
id :: forall a. a -> a
id @t x = x :: t

f1 :: forall a. a -> forall b. b -> (a, b)
f1 @a x @b y = (x :: a, y :: b)

f2 =
(\ @a x @b y -> (x :: a, y :: b)) ::
forall a. a -> forall b. b -> (a, b)
8 changes: 8 additions & 0 deletions data/examples/declaration/value/function/type-abstractions.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
id :: forall a. a -> a
id @t x = x :: t

f1 :: forall a. a -> forall b. b -> (a, b)
f1 @a x @b y = (x :: a, y :: b)

f2 = (\ @a x @b y -> (x :: a, y :: b) )
:: forall a. a -> forall b. b -> (a, b)
12 changes: 12 additions & 0 deletions data/examples/import/docstrings-after-exports-out.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module Test
( since1, -- ^ @since 1.0
since2, -- ^ @since 2.0
since3, -- ^ @since 3.0
SinceType (..), -- ^ @since 4.0
SinceClass (..), -- ^ @since 5.0
Multi (..),
-- ^ since 6.0
-- multi
-- line
)
where
11 changes: 11 additions & 0 deletions data/examples/import/docstrings-after-exports.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module Test (
since1, -- ^ @since 1.0
since2 -- ^ @since 2.0
, since3 -- ^ @since 3.0
, SinceType(..) -- ^ @since 4.0
, SinceClass(..) -- ^ @since 5.0
, Multi(..)
-- ^ since 6.0
-- multi
-- line
) where
48 changes: 0 additions & 48 deletions expected-failures/Agda.txt

This file was deleted.

3 changes: 0 additions & 3 deletions expected-failures/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,13 @@
let
inherit (pkgs) lib;
expectedFailures = [
"Agda"
"brittany"
"esqueleto"
"hlint"
"leksah"
"lens"
"pandoc"
"pipes"
"postgrest"
"purescript"
];
ormolizedPackages =
let
Expand Down
2 changes: 1 addition & 1 deletion expected-failures/hlint.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ src/Extension.hs
Formatting is not idempotent.
Please, consider reporting the bug.
src/Hint/Bracket.hs
@@ -258,8 +258,11 @@
@@ -265,8 +265,11 @@
let y = noLocA $ HsApp EpAnnNotUsed a1 (nlHsPar a2),
let r = Replace Expr (toSSA e) [("a", toSSA a1), ("b", toSSA a2)] "a (b)"
]
Expand Down
16 changes: 0 additions & 16 deletions expected-failures/leksah.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,3 @@ src/IDE/Find.hs:615:36-46
The GHC parser (in Haddock mode) failed:
[GHC-95644] Bang pattern in expression context: !matchIndex
Did you mean to add a space after the '!'?
src/IDE/Pane/Modules.hs
@@ -1183,9 +1183,9 @@
let modId = mdModuleId modDescr
modName = modu modId
mFilePath = mdMbSourcePath modDescr
- -- show relative file path for Main modules
+ in -- show relative file path for Main modules
-- since we can have several
- in case (components modName, mFilePath) of
+ case (components modName, mFilePath) of
(["Main"], Just fp) ->
let sfp = case (pdMbSourcePath (snd pair)) of
Nothing -> fp

Formatting is not idempotent.
Please, consider reporting the bug.
28 changes: 0 additions & 28 deletions expected-failures/pandoc.txt

This file was deleted.

41 changes: 0 additions & 41 deletions expected-failures/purescript.txt

This file was deleted.

4 changes: 2 additions & 2 deletions extract-hackage-info/extract-hackage-info.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ executable extract-hackage-info
default-language: GHC2021
ghc-options: -O2 -Wall -rtsopts -Wunused-packages
build-depends:
Cabal-syntax >=3.10 && <3.11,
Cabal-syntax >=3.12 && <3.13,
base >=4.12 && <5,
binary >=0.8 && <0.9,
bytestring >=0.10 && <0.13,
containers >=0.6 && <0.8,
directory >=1 && <2,
filepath >=1.2 && <1.5,
filepath >=1.2 && <1.6,
optparse-applicative >=0.14 && <0.19,
ormolu,
text >=2 && <3,
Expand Down
Loading

0 comments on commit 984a1d2

Please sign in to comment.