mirror of
https://github.com/google/ormolu.git
synced 2024-11-23 14:16:24 +03:00
5f5f9227aa
This pull request implements half of #49. Specifically, it deals with pretty printing instance declarations and most structures needed to support that. This includes pretty printing of associated types (and therefore also type family instances.) However, this _does not_ include pretty printing of associated data types. Pretty printing of type class declarations is to be dealt with at a later time. Instances are formatted such that indentation hangs after the `instance`. Namely, ```haskell instance Eq a => Eq [a] where ``` To support pretty printing associated types, the function `p_tyFamInstEqn` was exported from the appropriate module. This was done to avoid redundant code duplication.
127 lines
5.1 KiB
Plaintext
127 lines
5.1 KiB
Plaintext
name: ormolu
|
|
version: 0.0.1.0
|
|
cabal-version: 1.18
|
|
tested-with: GHC==8.6.4
|
|
license: BSD3
|
|
license-file: LICENSE.md
|
|
maintainer: Mark Karpov <mark.karpov@tweag.io>
|
|
homepage: https://github.com/tweag/ormolu
|
|
bug-reports: https://github.com/tweag/ormolu/issues
|
|
category: Development, Formatting
|
|
synopsis: A formatter for Haskell source code
|
|
build-type: Simple
|
|
description: A formatter for Haskell source code.
|
|
extra-doc-files: CHANGELOG.md
|
|
, README.md
|
|
data-files: data/examples/declaration/data/*.hs
|
|
, data/examples/declaration/data/gadt/*.hs
|
|
, data/examples/declaration/type-families/closed-type-family/*.hs
|
|
, data/examples/declaration/type-families/data-family/*.hs
|
|
, data/examples/declaration/type-families/type-family/*.hs
|
|
, data/examples/declaration/type-synonyms/*.hs
|
|
, data/examples/import/*.hs
|
|
, data/examples/module-header/*.hs
|
|
, data/examples/other/*.hs
|
|
, data/printer/*.hs
|
|
|
|
source-repository head
|
|
type: git
|
|
location: https://github.com/tweag/ormolu.git
|
|
|
|
flag dev
|
|
description: Turn on development settings.
|
|
manual: True
|
|
default: False
|
|
|
|
library
|
|
hs-source-dirs: src
|
|
build-depends: base >= 4.12 && < 5.0
|
|
, containers >= 0.5 && < 0.7
|
|
, dlist >= 0.8 && < 0.9
|
|
, exceptions >= 0.6 && < 0.11
|
|
, ghc >= 8.4.3
|
|
, ghc-boot-th >= 8.4.3
|
|
, ghc-paths >= 0.1 && < 0.2
|
|
, mtl >= 2.0 && < 3.0
|
|
, syb >= 0.7 && < 0.8
|
|
, text >= 0.2 && < 1.3
|
|
, yaml >= 0.8 && < 0.12
|
|
exposed-modules: Ormolu
|
|
, Ormolu.Anns
|
|
, Ormolu.CommentStream
|
|
, Ormolu.Config
|
|
, Ormolu.Diff
|
|
, Ormolu.Exception
|
|
, Ormolu.Imports
|
|
, Ormolu.Parser
|
|
, Ormolu.Printer
|
|
, Ormolu.Printer.Combinators
|
|
, Ormolu.Printer.Comments
|
|
, Ormolu.Printer.Internal
|
|
, Ormolu.Printer.Meat.Common
|
|
, Ormolu.Printer.Meat.Declaration
|
|
, Ormolu.Printer.Meat.Declaration.Instance
|
|
, Ormolu.Printer.Meat.Declaration.Data
|
|
, Ormolu.Printer.Meat.Declaration.Signature
|
|
, Ormolu.Printer.Meat.Declaration.Type
|
|
, Ormolu.Printer.Meat.Declaration.TypeFamily
|
|
, Ormolu.Printer.Meat.Declaration.Value
|
|
, Ormolu.Printer.Meat.ImportExport
|
|
, Ormolu.Printer.Meat.Module
|
|
, Ormolu.Printer.Meat.Type
|
|
, Ormolu.SpanStream
|
|
, Ormolu.Utils
|
|
if flag(dev)
|
|
ghc-options: -Wall -Werror -Wcompat
|
|
-Wincomplete-record-updates
|
|
-Wincomplete-uni-patterns
|
|
-Wnoncanonical-monad-instances
|
|
-Wnoncanonical-monadfail-instances
|
|
else
|
|
ghc-options: -O2 -Wall
|
|
default-language: Haskell2010
|
|
|
|
test-suite tests
|
|
main-is: Spec.hs
|
|
hs-source-dirs: tests
|
|
type: exitcode-stdio-1.0
|
|
build-depends: base >= 4.12 && < 5.0
|
|
, containers >= 0.5 && < 0.7
|
|
, filepath >= 1.2 && < 1.5
|
|
, hspec >= 2.0 && < 3.0
|
|
, ormolu
|
|
, path >= 0.6 && < 0.7
|
|
, path-io >= 1.4.2 && < 2.0
|
|
, text >= 0.2 && < 1.3
|
|
build-tools: hspec-discover >= 2.0 && < 3.0
|
|
other-modules:
|
|
Ormolu.Printer.CombinatorsSpec
|
|
, Ormolu.PrinterSpec
|
|
|
|
if flag(dev)
|
|
ghc-options: -Wall -Werror
|
|
else
|
|
ghc-options: -O2 -Wall
|
|
default-language: Haskell2010
|
|
|
|
executable ormolu
|
|
main-is: Main.hs
|
|
hs-source-dirs: app
|
|
build-depends: base >= 4.12 && < 5.0
|
|
, ghc >= 8.4.3
|
|
, gitrev >= 1.3 && < 1.4
|
|
, optparse-applicative >= 0.14 && < 0.15
|
|
, ormolu
|
|
, text >= 0.2 && < 1.3
|
|
, yaml >= 0.8 && < 0.12
|
|
other-modules: Paths_ormolu
|
|
if flag(dev)
|
|
ghc-options: -Wall -Werror -Wcompat
|
|
-Wincomplete-record-updates
|
|
-Wincomplete-uni-patterns
|
|
-Wnoncanonical-monad-instances
|
|
-Wnoncanonical-monadfail-instances
|
|
else
|
|
ghc-options: -O2 -Wall
|
|
default-language: Haskell2010
|