-
Notifications
You must be signed in to change notification settings - Fork 36
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
dunai
: Remove deprecated definitions
#445
Comments
If someone wants to do this, please go ahead and send a PR. Please create 5 commits:
Please check out the recent history of this repository to see how we normally document commits, and how we link commits to issues in the subject line of the commit messages. |
dunai
dunai
: Remove deprecated definitions
There are a few issues with
Mind if I adjust the import qualifiers? |
Oh we can just remove
Do we want the Yampa or Dunai |
For the second issue, it sounds like maybe bearriver's Let met think about that for a bit and come back to this. Thanks for the great catch! |
I'm not sure if this is correct but you could recursively
|
I wonder if it's possible to also do it by wrapping the identity-based SF into one in an arbitrary monad with https://hackage.haskell.org/package/dunai-0.13.2/docs/Data-MonadicStreamFunction-Core.html#v:morphS |
Could you do something like: reactimate :: Monad m
=> m a -- ^ Initialization action
-> (Bool -> m (DTime, Maybe a)) -- ^ Input sensing action
-> (Bool -> b -> m Bool) -- ^ Actuation (output processing)
-- action
-> SF a b -- ^ Signal function
-> m ()
reactimate senseI sense actuate sf =
BearRiver.reactimate senseI sense actuate (foldIdentity sf)
where
foldIdentity :: Monad m => MSF Identity (DTime, a) b -> MSF m (DTime, a) b
foldIdentity (MSF k) = MSF $ \ta -> pure $ fmap foldIdentity $ runIdentity $ k ta or reactimate :: Monad m
=> m a -- ^ Initialization action
-> (Bool -> m (DTime, Maybe a)) -- ^ Input sensing action
-> (Bool -> b -> m Bool) -- ^ Actuation (output processing)
-- action
-> SF a b -- ^ Signal function
-> m ()
reactimate senseI sense actuate sf =
BearRiver.reactimate senseI sense actuate (foldIdentity sf)
where
foldIdentity :: Monad m => MSF Identity (DTime, a) b -> MSF m (DTime, a) b
foldIdentity = morphS (return . runIdentity) |
Oh nice, I hadn't seen |
@solomon-b Yes. I've just opened a separate issue #454 to address that concern specifically. |
dunai
includes several deprecated definitions that were deprecated three versions ago (see #418). They can safely be removed.The text was updated successfully, but these errors were encountered: