Probabilistic Modeling in Haskell

I translated the probabilistic modeling example from F# to Haskell. I ran into the restricted monad problem, because Support implemented as a Set requires the type class Ord. Perhaps, this problem is a step up from F#: if one uses a set with a type that doesn't implement Comparable, the error only appears at run-time in F#! 

I don't think this sample as translated does justice to Haskell. I ought to look at the Haskell implementation in the original paper by Ramsey and Pfeffer. In addition, the blog randomhacks.net has a whole series about probabilistic monads in Haskell, culminating in a paper (PDF). There also a functional pearl about probabilistic functional programming in Haskell.

No comments:

Labels