-
-
Notifications
You must be signed in to change notification settings - Fork 369
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
Bugfix type signature lenses / code actions for pattern synonyms. #1952
Bugfix type signature lenses / code actions for pattern synonyms. #1952
Conversation
Use a better method for getting the type. The old method didn't work for unidirectional synonyms: pattern Some a <- Just a and gave the wrong type for synonyms with provided constraints: data T1 a where" MkT1 :: (Show b) => a -> b -> T1 a" pattern MkT1' :: (Eq a, Num a) => Show b => b -> T1 a pattern MkT1' b = MkT1 42 b
ad80919
to
9d58928
Compare
There we go, that's the sort of thing I was expecting, ghc 9 difference:
I'll fix this tomorrow afternoon probably. EDIT: Fixed. |
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.
LGTM, thank you for the fix!
The multiplicities returned by patSynSig on the orig_args value are uninteresting. patSynSig is literally just calling (map unrestricted). There is no information there for us to care about.
63af7d5
to
1878d46
Compare
I kicked off a merge from master. Is this ready to merge once that's done? |
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.
Sure, thanks for the bugfix
Purposed fix that closes #1951. Half expecting to trip over a ghc api incompatibility. We will see.