Skip to content
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

Closed
wants to merge 25 commits into from

Conversation

toku-sa-n
Copy link
Collaborator

@toku-sa-n toku-sa-n commented Sep 22, 2022

This PR is split from #593 to reduce its size.

This commit is split from
mihaimaruseac#593 to reduce the PR's
size.
@toku-sa-n toku-sa-n marked this pull request as draft September 22, 2022 09:51
Comment on lines -135 to 153
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
```
Copy link
Collaborator Author

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.

Comment on lines -1741 to -1742
foreign import ccall "test" test :: IO ()

Copy link
Collaborator Author

@toku-sa-n toku-sa-n Sep 22, 2022

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.

@toku-sa-n toku-sa-n marked this pull request as ready for review September 22, 2022 14:12
@toku-sa-n
Copy link
Collaborator Author

Now that #593 contains tests that fail on the original HIndent, splitting a PR makes a complex merge conflict.

@toku-sa-n toku-sa-n closed this Oct 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant