ghc "impossible" triggered when alignmentLimit set to 0 #88
Labels
No Label
blocked: dependency
blocked: info-needed
bug
duplicate
enhancement
fixed in HEAD
help wanted
hs:arrows
hs:brackets
hs:classes
hs:comments
hs:do-notation
hs:guards
hs:lists
hs:operators
hs:patterns
hs:records
hs:types
invalid
language extension support
layouting
needs confirmation
priority: high
priority: low
question
revisit before next release
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: hexagoxel/brittany#88
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
Input:
Output (after setting conf_layout.lconfig_alignmentLimit: 0)
No
ghc
bug; the panic is just a side-effect of an exception in chunks passed to the ghc parser. Of course stilll a bug inbrittany
. Hope you only reported it here so far :pmost likely due to this:
colAggregation xs = maximum [ x | x <- xs, x < minimum xs + alignMax ]
.I tried making that total, but it didn't seem to help. And yeah I'm only reporting here. :) Even if it ends up being a bug lower down, I wouldn't know where in the dep tree it might be.
Btw, even if it should not crash, this value does not make much sense semantically:
lconfig_columnAlignMode: ColumnAlignModeDisabled
is probably more suited to express "only use up to 0 spaces to achieve alignment". What effect were you going for with this config?Indeed, setting it to 1 gives the behavior I desire. Which I suppose is
equivalent to disabling column align mode? I was just flailing at the
config file to see what effect different settings had, and I'm still
figuring out what some of them mean. :)
Edit: Oh, I suppose setting it to 1 would still align things if it was a mere 1-character difference. So yes, ColumnAlignModeDisabled may in fact be what I want!
And I cannot reproduce after making it total via
maximum . (0 :)
Aha, I was using
colAggregation [] = {0|maxBound}
At this point, I think this is a fairly low-priority bug: I won't mind if you close it (though I leave it up to you). Thanks! So far I like brittany a lot.
thanks! I have included two fixes to be sure. Having
<=
instead of<
there is probably more correct anyways.