Lennart Spitzner
8a401d291e
Workaround for #68 : trim exactprinted text for unknown nodes
2017-11-28 18:23:05 +01:00
Lennart Spitzner
6a97379b33
Add whitespace around operator in section, Fixes #67
2017-11-28 17:56:28 +01:00
Lennart Spitzner
c709513209
Remove dependency on either package
...
Following the deprecation and removal of the EitherT transformer
2017-11-27 18:11:49 +01:00
Lennart Spitzner
26f8cdfb65
Support RecursiveDo/`rec` keyword
2017-10-24 00:25:59 +02:00
Lennart Spitzner
ddd7c6b439
Fix some rare issue and add some comments
...
(it is so rare i cannot reproduce anymore right now,
because the code that caused it has changed since..)
2017-10-24 00:00:34 +02:00
Lennart Spitzner
b1c6be7acd
Fix parentheses around kind signatures, fixes #64
2017-10-15 00:23:14 +02:00
Lennart Spitzner
f86665a251
Fix promoted HsTyVars on ghc-8.2.1
...
This fix does not work on ghc-8.0, because I do not understand
the 8.0 API in this instance. Could be resolved by looking
at annotations, but that really should not be necessary.
2017-10-14 23:21:13 +02:00
Lennart Spitzner
ccf2eb092f
Support RecordWildCards, Add one-liner layouting for records
...
fixes #52
2017-10-01 17:24:13 +02:00
Lennart Spitzner
a348ae7fbc
Switch to XDG path for config; Search conf in parents
...
- switch to XDG path should be backwards-compatible:
- new config will be written to XDG path
- but existing config in ~/.brittany will be respected
- looks for "brittany.yaml" not only in cwd, but in parents too.
uses the first file found.
fixes #45 , fixes #55
2017-09-29 21:42:39 +02:00
Lennart Spitzner
d1606932f8
Minor cleanup / performance improvement
2017-09-20 23:35:45 +02:00
Lennart Spitzner
867016c198
Fix quadratic behaviour ( fixes #34 )
...
Split up annotations by top-level elements in one
go, instead of doing the filtering per top-level
element (which necessarily makes things quadratic,
or rather O(n*m) with n top-level elements and m
size of annotation map). The fixed version should
be O(log n * m), and log n is negligible.
2017-09-20 23:35:45 +02:00
Lennart Spitzner
9703ebead5
Fix #53
...
Previously, if the input did not end with a newline
character and config had 'ppconf_hackAroundIncludes = True'
then due to using unlines/lines the output contained an
additional newline.
2017-09-10 16:37:35 +02:00
Lennart Spitzner
ca13a1897f
Fix type application layouting ( fixes #48 )
...
- one-line externals are not detected as multiline in backend
- layouting of EAsPat (when TypeApplications is disabled)
- layouting of HsTyLit (TypeApplications with literals)
2017-08-20 14:09:03 +02:00
Lennart Spitzner
fba8ad1a99
Fix negative literals in patterns ( fixes #49 )
2017-08-20 00:34:13 +02:00
Lennart Spitzner
1288c37204
Disable specific optim. in Config/Types/Instances
2017-08-19 14:56:46 +02:00
Lennart Spitzner
aba7d13f67
Fix stupid haddock needs
2017-08-16 00:14:56 +02:00
Lennart Spitzner
6f4eec245e
Split up Config/Types.hs
...
for the compilation of that module, GHC max residency
was an astounding 600MB for Config/Types.hs;
for Config/Types/Instances.hs it now "only" is 480MB.
(numbers according to "+RTS -s", the real usage
accoding to `time` is about 20% higher even.)
2017-08-15 20:37:46 +02:00
Lennart Spitzner
3ac8cccb0f
Refactor prelude.inc/Prelude to reduce imports
2017-08-12 23:51:07 +02:00
Lennart Spitzner
ebf84a03e9
Merge remote-tracking branch 'origin/master'
2017-08-12 15:29:06 +02:00
Erik Schnetter
0774d0e413
Correct typographical errors in comments
2017-08-11 21:37:29 -04:00
Lennart Spitzner
655074d1c0
Fix comment insertion error introduced in 91b9a240
2017-08-10 13:09:39 +02:00
Lennart Spitzner
91b9a240f1
Fix comment-before-BDCols issue; Relax alignmentBreakOnMultiline
2017-08-07 00:35:09 +02:00
Lennart Spitzner
41beeb9723
Remove/Cleanup unused/deprecated MTEL stuff
2017-08-06 16:28:41 +02:00
Lennart Spitzner
b39997fcfa
Adapt for ghc-8.2
...
Could it be so simple?
2017-08-05 18:17:49 +02:00
Lennart Spitzner
ccb59ef803
Fix wherespecial with indent/=2 ( fixes #39 )
2017-08-05 16:09:46 +02:00
Lennart Spitzner
00ad6c71b9
Impl. layouting of TypeApplication, fixes #38
2017-07-28 18:03:21 +02:00
Alan Zimmerman
33eed86851
Fix haddock generation.
...
Otherwise the haddock process complains about malformed haddock comments
2017-07-07 10:40:55 +02:00
Lennart Spitzner
134f31e4d1
Add Semigroup instances for C*Config Identity
2017-07-05 00:08:21 +02:00
Lennart Spitzner
6268b8075a
Fix layouting bug for RecordUpd
2017-07-04 23:57:54 +02:00
Lennart Spitzner
5a82968a7b
Add sub-config-alternative default to lib interface
...
i.e. `forwardOptionsSyntaxExtsEnabled`
2017-07-04 23:26:13 +02:00
Lennart Spitzner
0251062100
Support mdo layouting (RecursiveDo)
2017-06-29 18:13:28 +02:00
Lennart Spitzner
cece70380c
Fix/Implement proper layouting of MultiWayIf
2017-06-28 23:35:02 +02:00
Lennart Spitzner
6d472315e3
Fix layouting special-case (getSpacing(s) internals)
2017-06-04 18:15:22 +02:00
Lennart Spitzner
5e3cc0a7c3
Fix OpApp layouting/indentation annoyance
2017-06-04 16:28:01 +02:00
Lennart Spitzner
16f5aa118d
Add flag to omit reformatting (ghc-exactprint only)
2017-06-03 21:01:24 +02:00
Lennart Spitzner
9f4cda9130
Add license (AGPLv3)
2017-06-03 18:23:03 +02:00
Lennart Spitzner
91429ccacc
Remove unordered-containers direct dependency
2017-06-03 18:23:03 +02:00
Lennart Spitzner
3784a0123b
Refactor exposed function (now parsePrintModule)
...
- Rename parsePrintModule -> parsePrintModuleTests
- Rename pureModuleTransform -> parsePrintModule
- Change argument type from (CConfig Option) to Config
- Expose CConfig type fully
2017-06-03 18:23:03 +02:00
Lennart Spitzner
dfec26e55b
Refactor/Rename LayoutError -> BrittanyError
2017-06-03 18:23:03 +02:00
Lennart Spitzner
1adf02dabe
Add instance Monoid (CConfig Option)
2017-06-03 18:23:03 +02:00
Lennart Spitzner
f350113f7f
Refactor all modules: +Internal; Add public Brittany module
2017-05-22 21:25:08 +02:00
Lennart Spitzner
5dbe0f2c9c
Add function pureModuleTransform
2017-05-22 21:06:02 +02:00
Lennart Spitzner
fd9427754e
Add "hackAroundIncludes" option (default false)
...
- Makes brittany work in stdin/stdout mode when
CPP usage is limited to #includes.
2017-05-22 15:49:18 +02:00
Lennart Spitzner
3957272c10
Improve backwards-compat for config (manual FromJson)
2017-05-22 15:45:14 +02:00
Lennart Spitzner
8f1e366f9c
Change config file structure; Add config version tag
2017-05-21 16:48:05 +02:00
Lennart Spitzner
4ee44388f7
Improve layouting for OpApp (special-case for dollar/HsVar)
2017-05-21 13:43:39 +02:00
Lennart Spitzner
b8396da1d6
Refactor Backend.hs (Move stuff to top-level)
2017-05-21 13:17:46 +02:00
Lennart Spitzner
8b7b1334e2
Fix forall type signature layouting
2017-05-18 14:18:10 +02:00
Lennart Spitzner
83ba7803e6
Fix layouting issues in lists/listcomprehension
2017-05-17 23:31:20 +02:00
Lennart Spitzner
56e53a9cbb
Apply brittany to `layoutBriDocM`
2017-05-17 21:41:07 +02:00