-
Notifications
You must be signed in to change notification settings - Fork 62
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
Follow stan hint, explicit fixity (default is infixl 9). #619
Follow stan hint, explicit fixity (default is infixl 9). #619
Conversation
(=>>) :: Monad m => m b -> (b -> m a) -> m b | ||
(=>>) m f = m >>= (\x -> f x >> return x) | ||
|
||
infixl 9 <<= | ||
(<<=) :: Monad m => (b -> m a) -> m b -> m b | ||
(<<=) = flip (=>>) |
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.
I would think these should be removed from here. And replaced in the code with >>=
and =<<
.
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.
Looks like (=>>) :: Monad m => m b -> (b -> m a) -> m b
and (<<=)
are not used.
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.
Had a quick peek at liquidhaskell
. Each operator is only used once there, (=>>)
in Language.Haskell.Liquid.Constraint.Fresh
and (<<=)
in Language.Haskell.Liquid.Constraint.Generate
. Perhaps those modules should define such an operator privately or use the inline equivalent and we remove them from liquid-fixpoint
?
Remove BangPatterns.
5fcbfe9
to
91fe98c
Compare
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!
See #610. I'm putting this up here as-is so please label with WIP. I'd like some feedback on which fixities to go with. Are there some that shouldn't be associative? Could some of these be replaced with existing operators we pull in from elsewhere?
https://kowainik.github.io/posts/fixity#standard-examples
For now I've just been explicit but with the default
infixl 9
.