-
Notifications
You must be signed in to change notification settings - Fork 113
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
Add tests that previous ones did not cover #601
Conversation
This commit is split from mihaimaruseac#593 to reduce the PR's size.
Type declaration with infix promoted type constructor | ||
Type declaration with promoted lists | ||
|
||
```haskell | ||
fun1 :: Def ('[ Ref s (Stored Uint32), IBool] 'T.:-> IBool) | ||
fun1 :: Def ('[ Ref s (Stored Uint32), IBool] T.:-> IBool) | ||
fun1 = undefined | ||
|
||
fun2 :: Def ('[ Ref s (Stored Uint32), IBool] ':-> IBool) | ||
fun2 :: Def ('[ Ref s (Stored Uint32), IBool] :-> IBool) | ||
fun2 = undefined | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ghc-lib-parser
doesn't hold the information whether a promoted infix operator has a '
as a prefix, but infix operators don't need it.
A single quote is used to disambiguate a data constructor from a type with the same name, but a type never contains symbol characters only. Thus, we don't need to add the prefix.
foreign import ccall "test" test :: IO () | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ghc-lib-parser
doesn't have information on whether the safe
keyword is omitted. Thus, we can't test this line.
Another option is to omit safe
always.
Now that #593 contains tests that fail on the original HIndent, splitting a PR makes a complex merge conflict. |
This PR is split from #593 to reduce its size.