Fix infix constructor pattern matching for normal constructors #107
No reviewers
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#107
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "infix-constructor-pattern-match"
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?
Brittany was previously only supporting symbol based infix constructors. It
is common in some libraries (for example Esqueleto) to pattern match on
normal constructors as infix. Brittany was failing in this case by not
wrapping the constructor name in back ticks/spaces. Backticks and spaces
have been added in the case where the constructor contains any alpha
characters.
This addresses #101
This could be moved to the dev branch, but it seems like a simple enough fix to make it in to
master
via a point release.Thanks! I think using
lrdrNameToTextAnn
instead oflrdrNameToText
is a better solution, as it does not depend onisAlpha
. And the spaces should be added unconditionally, to be consistent with operator space handling in other cases.Please change to
dev
. I agree with making a minor release for this, but the other stuff currently ondev
deserves to be included, too :)Hmm, getting some strange business with trying to rebase off
upstream
. Seems some commits have snuck in.Looks like OSX made it through the tests, but then timed out.
@lspitzner do you see any blockers on this PR?
Sorry for the long delay. I have effectively merged this PR now, although I think github won't see this because I rebased/cherry-picked again. But the commits are now on
dev
. I am working on a fix for #116 and will do a release once that is done.(And you are right, the test failure is irrelevant.)
Pull request closed