Fix infix constructor pattern matching for normal constructors #107

Closed
eborden wants to merge 6 commits from infix-constructor-pattern-match into dev

6 Commits (master)

Author SHA1 Message Date
Evan Rutledge Borden 17eec7471c Remove redundant import. 2018-01-15 19:20:18 -05:00
Evan Rutledge Borden 3b0b5d3c4f Change infix patterns to include spaces
This commit changes infix patterns to utilize `lrdrNameToTextAnn`. This
function allows the logic to avoid introspecting on the constructor
name.

Additionally this adds spaces to all infix operator pattern matches.
Previously infix symbols did not include spaces:

```
foo (x:xs) = _
```

Now they include a space

```
foo (x : xs) = _
```
2018-01-15 19:20:18 -05:00
Evan Rutledge Borden 778381bbb8 Fix infix constructor pattern matching for normal constructors
Brittany was previously only support 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.
2018-01-15 19:18:58 -05:00
Lennart Spitzner 7892b0e42d Update README.md 2018-01-15 19:18:58 -05:00
Lennart Spitzner 04764aa0f8 Update readme: Add editor integration paragraph 2018-01-15 19:18:58 -05:00
Lennart Spitzner 895652eeb9 Update README.md for stackage lts release 2018-01-15 19:18:58 -05:00