1
1
mirror of https://github.com/google/ormolu.git synced 2024-12-11 08:44:45 +03:00
ormolu/data/examples/declaration
yumiova 5f5f9227aa Implement rendering of instance declarations
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.
2019-06-08 22:28:25 +02:00
..
data Build the project with Nix and switct to GHC 8.6.4 2019-05-31 14:43:15 +02:00
instance Implement rendering of instance declarations 2019-06-08 22:28:25 +02:00
type Implement signature declarations 2019-05-16 19:03:14 +02:00
type-families Build the project with Nix and switct to GHC 8.6.4 2019-05-31 14:43:15 +02:00
type-synonyms Implement rendering of type synonyms 2019-04-09 22:45:23 +02:00
value Implement view patterns 2019-06-08 20:31:08 +02:00