-
Notifications
You must be signed in to change notification settings - Fork 20
Common Errors: Brittany
patrick brisbin edited this page Apr 23, 2019
·
4 revisions
ERROR: encountered unknown syntactical constructs:
HsSpliceE{}
Brittany (as of v0.11.0.0) doesn't handle Template Haskell (among other things), and generates the above error when it sees it. The solution is to ignore the offending files.
---
- brittany:
include:
- "**/*.hs"
- "!src/MyBadFile.hs"
Alternative, you can disable the offending expression in the Haskell source
-- brittany-disable-next-binding
someFunction =
[someQuote|
someText
|]
-- brittany-disable-next-binding
someOtherFunction =
$(someOtherQuote "someText")
Note that disable-next-binding
on works on top-level bindings. Attractive as it may be, you can't disable a specific binding within a where
or let
.
If you edit a "Stack Script", you will find that Restyled (through Brittany) really wants to strip that shebang.
This is an open issue: https://github.com/lspitzner/brittany/issues/192
Unfortunately, you must exclude such files via .restyled.yaml
.
📣 Please read: GitHub Actions Pivot
- Getting Started
- What to Expect
- Supported Languages
- Configuring
- Excluding Files
- Disabling
- Common Errors
- Missing GitHub Student Developer Pack Plan
- Plan Upgrade Required
- Configuration Errors
- Restyle Errors
- Restyle Error 127
- Restyle Error 137
- Push Rejected
- Git Error: bad object
- Git Error: Couldn't find remote ref
- Labels or Ignore Labels not working
- Restyle PR not created
- Restyle PR not closed
- Specific Restylers
- Reference
- Development
- Policies