In Haskell, is there a way to restrict a monad M a so that a satisfy a type class constraint?
I am translating the probabilistic modeling e
Check out Martin Erwig's library, PFP:
The PFP library is a collection of modules for Haskell that facilitates probabilistic functional programming, that is, programming with stochastic values. The probabilistic functional programming approach is based on a data type for representing distributions. A distribution represent the outcome of a probabilistic event as a collection of all possible values, tagged with their likelihood.