Commit Graph

21 Commits (1e7a94e72e330ba1f2837a8b32a57cb09e41a27a)

Author SHA1 Message Date
Taylor Fausak 1e7a94e72e Inline `prelude.inc` 2021-11-06 17:12:55 +00:00
Taylor Fausak 0c33d9a6fa Remove redundant pattern matches 2021-11-06 17:01:11 +00:00
Taylor Fausak bd860f9983
Fix type variable name 2021-11-02 08:10:44 -04:00
Taylor Fausak 116930ac2b Get everything building with (only) GHC 9.0 2021-10-30 16:20:13 +00:00
Taylor Fausak e36d9bc465 Drop support for GHC 8.4 2020-11-15 12:55:50 -05:00
Taylor Fausak 096c438b23 Drop support for GHC 8.0 2020-11-15 12:55:50 -05:00
Ximin Luo adb642353d more GHC 8.10.1 fixes 2020-11-15 12:55:50 -05:00
Lennart Spitzner 00c6854887 Fix two minor data-decl layouting issues 2019-12-09 22:35:26 +01:00
Lennart Spitzner 3fbbf3d661 Fix one misplaced comment bug on data decls 2019-12-09 11:22:43 -07:00
Lennart Spitzner 6c3d9c57c5 Comment the single-line record decl config flag out 2019-12-09 11:22:43 -07:00
Lennart Spitzner 5a49277eba Improve data decl layouting
- Fix bug in BackendUtil/lowest level of brittany about
  alignment being ignored after a comment,
- Properly layout large (more than single-line) types in
  record fields and in data decl rhs arguments,
- Properly layout data decl constructors with large "heads"
  (forall, constraints),
- Add a config flag to control single-line layout of record
  definition,
2019-12-09 11:20:28 -07:00
Evan Rutledge Borden 80f370a8e1 Support nullary data types
Add tests for nullary prefix data types and nullary record data types.
2019-12-09 11:17:32 -07:00
Lennart Spitzner 0381b9fe24 Fix record field comment indentation 2019-12-09 11:17:32 -07:00
Evan Rutledge Borden 9494d6203a Allow multi line formatting of normal records
Only single line formatting of normal records was being supported. For
records with long names we need multi line formatting. This also needs
to support both multi and left indentation policies.
2019-12-09 11:17:32 -07:00
Lennart Spitzner 48490a7110 Fix handling of comment before data-decl
`docWrapNodePrior` caused duplication of offset of `data` keyword
and of comments connected to it.
2019-12-09 11:17:31 -07:00
Evan Rutledge Borden aeaa043e99 Support building DataDecl with 8.0.2 2019-12-09 11:17:31 -07:00
Lennart Spitzner 2f6967b7b8 Support comments in record data decls 2019-12-09 11:17:31 -07:00
Lennart Spitzner 208a1ceadb Start making datadecls work with ghc-8.4 2019-12-09 11:17:31 -07:00
Evan Rutledge Borden 57ba88a73c Work-in-progress add record declaration layout
Simple records are supports. The tests cover:

- single records
- multi-field types
- columnized alignment
- basic deriving
- deriving strategies
- existential quanitification

A few items block merger

- retaining comments

A few items can be deferred:

- normal types
- sum types
2019-12-09 11:17:31 -07:00
Lennart Spitzner 4f827491da Work-in-progress commit (deriving clause..) 2019-12-09 11:17:31 -07:00
Lennart Spitzner 172866755c Start impl. layouting for datatypes (#12)
Only newtypes work for now; the "interesting" data records
are not touched yet.

Comment insertion not really considered yet; probably needs work.
2019-12-09 11:17:31 -07:00