[Haskell-cafe] ANN: random-fu 0.1.0.0
wren ng thornton
wren at freegeek.org
Thu Jun 3 22:03:53 EDT 2010
Richard O'Keefe wrote:
> There's something in that package that I don't understand,
> and I feel really stupid about this.
>
> data RVarT m a
>
> type RVar = RVarT Identity
>
> class Distribution d t where
> rvar :: d t -> RVar t
> rvarT :: d t -> RVarT n t
>
> Where does "n" come from?
Presumably from universal quantification in rvarT? That is, the
implementation of rvarT should be polymorphic in n, in which case the
particular n doesn't matter (as well it shouldn't, since if it did
that'd interfere with the composability of the transformer).
Though, since RVar is a synonym for RVarT, I can't imagine why rvar is a
method instead of a shorthand defined outside of the class. (If RVar
were primitive then I could imagine performance reasons, but since it
isn't...)
--
Live well,
~wren
More information about the Haskell-Cafe
mailing list