-
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
.
- Supported Languages
- Configuring
- Excluding Files
- Common Errors
- Reference
- Development