-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support formatting over TypeOperators #271
Comments
With
|
Looks like there is some in progress work here. |
FYI, that was reached with the
|
The main problem seems to be the presence of newlines. {-# LANGUAGE TypeOperators #-}
module HsOpTy where
import GHC.TypeLits
type Foo = Int : '[] |
If you can't omit newlines as a work around, I'd recommend using |
{-# LANGUAGE TypeOperators #-}
module HsOpTy where
import GHC.TypeLits
-- brittany-disable-next-binding
type Foo =
Int :
'[] |
I just bumped into this and made a simple test case. Interestingly moving this comma to the next line is enough to stop this happening :/ -- Works
a :: (a
,b + c)
-- Fails with the error mentioned above
a :: (a,
b + c) |
This may be another good fit for #28 (passthrough for unhandled constructs) |
@expipiplus1 Thanks for the hint! #28 was in fact implemented by now. So on current master, the effect of this not being fully supported yet is much more limited. |
Great! |
I think I'm experiencing the same issue with |
Any news related to this issue? Is there any help required? This issue actually blocks from using |
I'm closing this in favor of #241, which I think is the same thing. |
Currently, running brittany over the below file:
... results in the below error:
Note that when the definition of
type Foo
is just a single line brittany doesn't seem to mind.Concretely, this is an issue for me in Servant API type definitions, which can get lengthy.
The text was updated successfully, but these errors were encountered: