mirror of
https://github.com/google/ormolu.git
synced 2024-11-25 20:06:53 +03:00
Group StandaloneKindSignatures with type synonyms
This commit is contained in:
parent
4e01690e05
commit
34bdf62429
@ -1,3 +1,8 @@
|
||||
## Unreleased
|
||||
|
||||
* Now standalone kind signatures are grouped with type synonyms. [Issue
|
||||
683](https://github.com/tweag/ormolu/issues/683).
|
||||
|
||||
## Ormolu 0.1.4.1
|
||||
|
||||
* Added command line option `--color` to control how diffs are printed.
|
||||
|
@ -11,3 +11,6 @@ class C1 a
|
||||
|
||||
type F :: Type -> Type
|
||||
type family F
|
||||
|
||||
type G :: Type
|
||||
type G = a
|
||||
|
@ -11,3 +11,7 @@ class C1 a
|
||||
|
||||
type F :: Type -> Type
|
||||
type family F
|
||||
|
||||
type G :: Type
|
||||
|
||||
type G = a
|
||||
|
@ -141,6 +141,9 @@ library
|
||||
else
|
||||
ghc-options: -O2 -Wall
|
||||
|
||||
if impl(ghc <8.10.0)
|
||||
ghc-options: -fmax-pmcheck-iterations=3000000
|
||||
|
||||
executable ormolu
|
||||
main-is: Main.hs
|
||||
hs-source-dirs: app
|
||||
|
@ -188,6 +188,7 @@ groupedDecls (L l_x x') (L l_y y') =
|
||||
(KindSignature n, DataDeclaration n') -> n == n'
|
||||
(KindSignature n, ClassDeclaration n') -> n == n'
|
||||
(KindSignature n, FamilyDeclaration n') -> n == n'
|
||||
(KindSignature n, TypeSynonym n') -> n == n'
|
||||
-- Special case for TH splices, we look at locations
|
||||
(Splice, Splice) -> not (separatedByBlank id l_x l_y)
|
||||
-- This looks only at Haddocks, normal comments are handled elsewhere
|
||||
@ -247,7 +248,8 @@ pattern
|
||||
DataDeclaration,
|
||||
ClassDeclaration,
|
||||
KindSignature,
|
||||
FamilyDeclaration ::
|
||||
FamilyDeclaration,
|
||||
TypeSynonym ::
|
||||
RdrName -> HsDecl GhcPs
|
||||
pattern InlinePragma n <- SigD NoExtField (InlineSig NoExtField (L _ n) _)
|
||||
pattern SpecializePragma n <- SigD NoExtField (SpecSig NoExtField (L _ n) _ _)
|
||||
@ -259,6 +261,7 @@ pattern DataDeclaration n <- TyClD NoExtField (DataDecl NoExtField (L _ n) _ _ _
|
||||
pattern ClassDeclaration n <- TyClD NoExtField (ClassDecl NoExtField _ (L _ n) _ _ _ _ _ _ _ _)
|
||||
pattern KindSignature n <- KindSigD NoExtField (StandaloneKindSig NoExtField (L _ n) _)
|
||||
pattern FamilyDeclaration n <- TyClD NoExtField (FamDecl NoExtField (FamilyDecl NoExtField _ (L _ n) _ _ _ _))
|
||||
pattern TypeSynonym n <- TyClD NoExtField (SynDecl NoExtField (L _ n) _ _ _)
|
||||
|
||||
-- Declarations which can refer to multiple names
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user