hakaru icon indicating copy to clipboard operation
hakaru copied to clipboard

MayBoxVec type annotation problem

Open cscherrer opened this issue 8 years ago • 2 comments

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.

cscherrer avatar Jul 10 '17 19:07 cscherrer

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?

ccshan avatar Jul 10 '17 20:07 ccshan

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.

cscherrer avatar Jul 10 '17 21:07 cscherrer