-
Notifications
You must be signed in to change notification settings - Fork 29
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 deeply strict liftM #13
Comments
Sanity-check: is this quite analogous to (<$!>) :: Monad m => (a -> b) -> m a -> m b
f <$!> m = do
x <- m
let z = f x
z `seq` return z Whereas with (<$!!>) :: (Monad m, NFData b) => (a -> b) -> m a -> m b
f <$!!> m = do
x <- m
f x `deepseq` return (f x) I'd hope that GHC is smart enough to apply CSE on the two occurrences of |
I don't understand how it could translate the way you say. Doesn't |
Actually, |
Ah, you're right, I inlined one too many definitions in my head. The fact that you're using |
The bigger problem is that |
Control.Monad
offers<$!>
. By analogy, I believe this package should offerThe text was updated successfully, but these errors were encountered: