You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Monad-bayes offers two implementations, in Control.Monad.Bayes.Density.State and Control.Monad.Bayes.Density.Free. The first is slow but easy to understand, the second is more sophisticated, but faster.
In the code we have both variants, but only the free density monad (supposedly faster) is used outside this part:
@reubenharry@idontgetoutmuch Is it fair to say that realistically, we will only ever use the free density monad, and the state density monad is only for didactic purposes? If so, I'd vote for removing the corresponding code and simplifying the leftovers, and keep the state density only in the docs, which would be slightly adapted.
The text was updated successfully, but these errors were encountered:
you import import Control.Monad.Bayes.Density.State (Density) then I get
src/Control/Monad/Bayes/Traced/Basic.hs:60:19: error:
• Could not deduce (MonadDistribution Identity)
arising from a use of ‘random’
from the context: MonadDistribution m
bound by the instance declaration
at src/Control/Monad/Bayes/Traced/Basic.hs:59:10-60
• In the first argument of ‘Traced’, namely ‘random’
In the expression: Traced random (fmap singleton random)
In an equation for ‘random’:
random = Traced random (fmap singleton random)
|
60 | random = Traced random (fmap singleton random)
Can anyone explain what is happening? I presume at some point the state version worked.
In the docs we describe two density monads (https://github.com/tweag/monad-bayes/blob/master/docs/docs/usage.md#density):
In the code we have both variants, but only the free density monad (supposedly faster) is used outside this part:
monad-bayes/src/Control/Monad/Bayes/Traced/Common.hs
Line 84 in 31579b3
@reubenharry @idontgetoutmuch Is it fair to say that realistically, we will only ever use the free density monad, and the state density monad is only for didactic purposes? If so, I'd vote for removing the corresponding code and simplifying the leftovers, and keep the state density only in the docs, which would be slightly adapted.
The text was updated successfully, but these errors were encountered: