Lennart Spitzner
9eaa8c6a62
Start implementing sort/uniq on imports/exports
2020-03-30 19:59:25 +02:00
Lennart Spitzner
38cdd15221
Fix moving comment in export list (haddock header) ( #281 )
2020-02-13 19:05:05 +01:00
Lennart Spitzner
34735e27ef
Add compat with GHC-8.6 API
2018-11-04 22:14:00 +01:00
Phil Hazelden
a5a24b4220
Fix imports of type operators.
...
Previously, we could only import a type operator with no subsequent
list, i.e.
import Foo ( (:.) )
was fine, but
import Foo ( (:.)(..) )
import Foo ( (:.)((:.) )
import Foo ( (:.)(A, b) )
would all break. Brittany would attempt to output them as
import Foo ( :.(..) )
import Foo ( :.((:.) )
import Foo ( :.(A, b) )
I believe the problem was that although `ieName <$> lie` was returning
an `IEWrappedName` with the same contents as used in `layoutWrapped`,
it had different location annotations; and the parentheses are
apparently saved in the location annotations.
2018-08-10 10:01:11 +01:00
Lennart Spitzner
95f42061d2
Fixup for the fix of ExplicitNames/PatternSynonyms for ghc-8.0
2018-07-04 22:42:20 +02:00
Lennart Spitzner
ab389fe66f
Support for -XExplicitNamespaces and -XPatternSynonyms
...
Properly round-trip export items of the forms "type OPERATOR"
or "pattern SYNONYM"
fixes #158
2018-07-04 21:42:46 +02:00
Lennart Spitzner
10e1c19788
Add support for ghc-8.4
2018-04-17 17:50:41 +02:00
Sergey Vinokurov
9bd3bfbe4c
Review suggestions
2018-04-03 22:49:06 +01:00
Sergey Vinokurov
2ed9a13fdb
Replace 'docAltFilter' with 'runFilteredAlternative'
2018-04-02 21:25:44 +01:00
Lennart Spitzner
9531edb2a7
Improve module layouting in two aspects
...
- IEThingWith in export list can now be single-line
- Now respect offset of the "module" keyword
(retain empty lines after pragmas, for example)
2018-03-12 16:29:47 +01:00
Lennart Spitzner
20f9c009ee
Stop hanging indent for IEThingWith
...
plus minor refactors/cleanups
this is more in line with IndentPolicyLeft and imo also looks
nicer in general
2018-03-11 22:49:20 +01:00
sniperrifle2004
ad34a8b9b9
Only expand empty binding list with comments
2017-12-22 10:18:09 +01:00
sniperrifle2004
3708838b6a
Also handle comments inside ThingWith
2017-12-22 06:58:39 +01:00
sniperrifle2004
21c080572b
Add compact version of import layout
...
Also let layoutLLIEs deal with comments
2017-12-21 23:51:27 +01:00
Lennart Spitzner
82a5ffb3b3
Refactor a bit more
...
- remove unnecessary docWrapNodeRest
- make sure that sharing is correct and non-redundant
2017-12-21 17:56:54 +01:00
Lennart Spitzner
33f23a65ec
Refactor and Add missing docSharedWrapper
2017-12-21 15:44:58 +01:00
Lennart Spitzner
ce7ec0b467
Fix warning
2017-12-19 17:55:31 +01:00
sniperrifle2004
162b6e6bfd
Also fix export comments
...
Also refactored a little to improve reuse of the docWrapNode logic
2017-12-19 16:33:13 +01:00
sniperrifle2004
7c51a181c8
Fix operators for ThingWith
2017-12-19 01:17:19 +01:00
Lennart Spitzner
8c3a9bec25
Fix operators in import list
2017-12-18 18:56:50 +01:00
Lennart Spitzner
204f0aff08
import+module: Refactor and Simplify slightly
2017-12-17 21:14:46 +01:00
sniperrifle2004
e140cd01e0
Add directives for ghc > 8.2
2017-12-17 14:06:41 +01:00
sniperrifle2004
ee9abff9e8
Add import and module support
2017-12-17 12:51:04 +01:00