-
-
Notifications
You must be signed in to change notification settings - Fork 406
Wingman: Use infix notation for operator applications #1675
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
1f7da6e
Use infix notation for operator applications
isovector beb0c93
Merge branch 'master' into apply-infix
isovector 58ec742
Update tests
isovector 07de212
Merge branch 'master' into apply-infix
jneira a76b639
Merge branch 'master' into apply-infix
isovector 50f8062
Merge branch 'master' into apply-infix
isovector 9782d7b
Add test suggest by Ailrun
isovector efc6a2f
Merge branch 'apply-infix' of github.com:isovector/haskell-language-s…
isovector eb3ca24
Use isSymOcc
isovector 65abe32
Merge branch 'master' into apply-infix
isovector File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
test :: (a -> b -> c) -> a -> (a -> b) -> c | ||
test (/:) a f = _ | ||
|
3 changes: 3 additions & 0 deletions
3
plugins/hls-tactics-plugin/test/golden/AutoInfixApply.hs.expected
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
test :: (a -> b -> c) -> a -> (a -> b) -> c | ||
test (/:) a f = a /: f a | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
test :: (a -> b -> x -> c) -> a -> (a -> b) -> x -> c | ||
test (/:) a f x = _ | ||
|
3 changes: 3 additions & 0 deletions
3
plugins/hls-tactics-plugin/test/golden/AutoInfixApplyMany.hs.expected
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
test :: (a -> b -> x -> c) -> a -> (a -> b) -> x -> c | ||
test (/:) a f x = (a /: f a) x | ||
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
test :: (a -> b -> c) -> (c -> d -> e) -> a -> (a -> b) -> d -> e | ||
test (/:) (-->) a f x = _ |
2 changes: 2 additions & 0 deletions
2
plugins/hls-tactics-plugin/test/golden/AutoInfixInfix.hs.expected
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
test :: (a -> b -> c) -> (c -> d -> e) -> a -> (a -> b) -> d -> e | ||
test (/:) (-->) a f x = (a /: f a) --> x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
fJoin :: (Monad m, Monad f) => f (m (m a)) -> f (m a) | ||
fJoin = fmap (\ mma -> (>>=) mma id) | ||
fJoin = fmap (\ mma -> mma >>= id) |
2 changes: 1 addition & 1 deletion
2
plugins/hls-tactics-plugin/test/golden/FmapJoinInLet.hs.expected
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{-# LANGUAGE ScopedTypeVariables #-} | ||
|
||
fJoin :: forall f m a. (Monad m, Monad f) => f (m (m a)) -> f (m a) | ||
fJoin = let f = ( (\ mma -> (>>=) mma id) :: m (m a) -> m a) in fmap f | ||
fJoin = let f = ( (\ mma -> mma >>= id) :: m (m a) -> m a) in fmap f |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
plugins/hls-tactics-plugin/test/golden/KnownDestructedSemigroup.hs.expected
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
data Test a = Test [a] | ||
|
||
instance Semigroup (Test a) where | ||
(<>) (Test a) (Test c) = Test ((<>) a c) | ||
(<>) (Test a) (Test c) = Test (a <> c) | ||
|
2 changes: 1 addition & 1 deletion
2
plugins/hls-tactics-plugin/test/golden/KnownMissingSemigroup.hs.expected
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
data Semi = Semi [String] Int | ||
|
||
instance Semigroup Semi where | ||
(<>) (Semi l_l_c4 i5) (Semi l_l_c i) = Semi ((<>) l_l_c4 l_l_c) _ | ||
(<>) (Semi l_l_c4 i5) (Semi l_l_c i) = Semi (l_l_c4 <> l_l_c) _ | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
plugins/hls-tactics-plugin/test/golden/KnownThetaSemigroup.hs.expected
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
data Semi a = Semi a | ||
|
||
instance Semigroup a => Semigroup (Semi a) where | ||
(<>) (Semi a4) (Semi a) = Semi ((<>) a4 a) | ||
(<>) (Semi a4) (Semi a) = Semi (a4 <> a) | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.