hakaru-dev / hakaru

A probabilistic programming language
BSD 3-Clause "New" or "Revised" License
311 stars 30 forks source link

MayBoxVec type annotation problem #102

Open cscherrer opened 7 years ago

cscherrer commented 7 years ago

summary adds a type annotation to prog, which involves MayBoxVec Prob Prob. Compiling with GHC results in the error Not in scope: type constructor or class ‘Prob’

Removing the type annotation makes it compile again.

It looks like Prob was being interpreted as a constructor or class, rather than as a type. So I guess maybe the problem has to do with MayBoxVec.

ccshan commented 7 years ago

The Prob type synonym was added to Language.Hakaru.Runtime.LogFloatPrelude and Language.Hakaru.Runtime.Prelude in 772a9860fdd07468ac525da1ad4cc402ae941e13, then used in 1509e85651e491bf4458e24c0142807ff501e506. Neither of these commits is in v0.4. Would you please clarify which version you're using, and try reinstalling Language.Hakaru.Runtime.LogFloatPrelude if you're using the latest master rather than v0.4?

cscherrer commented 7 years ago

I'm using v0.4. Strange, we had been talking for a long time in terms of Prob values. I think I'm confusing them with prob values in Hakaru.

When I switched to the master branch I started getting a similar error message about Measure.