Add import and module support #124
Merged
Conversation
Also refactored a little to improve reuse of the docWrapNode logic
- remove unnecessary docWrapNodeRest - make sure that sharing is correct and non-redundant
Also let layoutLLIEs deal with comments
multiple BDFEnsureIndent nodes were mistreated previously
plus minor refactors/cleanups this is more in line with IndentPolicyLeft and imo also looks nicer in general
- IEThingWith in export list can now be single-line - Now respect offset of the "module" keyword (retain empty lines after pragmas, for example)
|
Is anything blocking this PR? |
Well there is this minor-feature request, which I implemented just now. But that made me notice this: #test long-module-name-hiding-items
import TestJustShortEnoughModuleNameLike hiding ( abc
, def
, ghci
, jklm
)
import TestJustAbitToLongModuleNameLikeTh
hiding ( abc
, def
, ghci
, jklm
) currently gives import TestJustShortEnoughModuleNameLike hiding ( abc
, def
, ghci
, jklm
)
import TestJustAbitToLongModuleNameLikeTh
hiding ( abc
, def
, ghci
, jklm
) |
I'll merge anyway, this feature branch has lived long enough. Presuming the CI comes out green. There will be minor stuff to fix anyway in the future I guess. |
lspitzner
added a commit
that referenced
this pull request
Mar 21, 2018
|
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
#83 got closed due to me deleting the
dev
branch, so I now reopen it, including several finishing touches.I am planning to merge this and make a new release with it in the next days. Again, sorry for the long hold-up, but fixing the low-level bug (see below) took a good bit of time and this caused me to put this off again and again.
In addition to what was last added to #83, this branch also contains the following changes:
Merge in current master
Fix bug in lower-level parts of
brittany
that led to discarding certain alternatives with theIEThingWith
layouters. See af7f901, which is a one-liner fix, that nonetheless was rather time-consuming to diagnose.Prevent hanging indent for IEThingWith. This is a bugfix for the
IndentPolicyLeft
case and an opinionated improvement otherwise:Retain empty lines before the
module
keyword that previously got eaten. Added a newBriDoc
constructor just for this.Add config options
_lconfig_reformatModulePreamble
and_lconfig_allowSingleLineExportList
(defaultsTrue
andFalse
). The former can disable preamble formatting if desired. The latter is again the question of consistency - I like my exports in separate line even if it is just one short thingy. I was so arrogant to set the default according to my preference.Change _lconfig_importColumn default from 60 to 50, as was discussed in #83. I have left the test-config as-is (at 60) because I am lazy.