mikeizbicki / HLearn

Homomorphic machine learning
Other
1.63k stars 138 forks source link

Cabal build failure #20

Closed 2piix closed 10 years ago

2piix commented 10 years ago

I just tried installing HLearn-classifiers-1.0.1.1 in a clean cabal-dev sand box, on GHC 7.6.3. I got a compile error:

src/HLearn/Models/Classifiers/Bayes.hs:51:40: Could not deduce (label ~ prob) from the context (Labeled (Datapoint (Bayes labelLens dist)), Margin labelLens dist ~ Categorical label prob, Ord label, Ord prob, Fractional prob, label ~ Label (Datapoint dist), prob ~ Probability (MarginalizeOut labelLens dist), Labeled (Datapoint dist), Datapoint (MarginalizeOut labelLens dist) ~ Attributes (Datapoint dist), PDF (MarginalizeOut labelLens dist), PDF (Margin labelLens dist), Marginalize labelLens dist) bound by the instance declaration at src/HLearn/Models/Classifiers/Bayes.hs:(36,5)-(45,53) label' is a rigid type variable bound by the instance declaration at src/HLearn/Models/Classifiers/Bayes.hs:36:5 prob' is a rigid type variable bound by the instance declaration at src/HLearn/Models/Classifiers/Bayes.hs:36:5 Expected type: label Actual type: Probability (MarginalizeOut labelLens dist) In the return type of a call of pdf' In the second argument of()', namely `pdf (attrDist k) dp' In the expression: pdf labelDist k \ pdf (attrDist k) dp Failed to install HLearn-classification-1.0.1.1 cabal: Error: some packages failed to install: HLearn-classification-1.0.1.1 failed during the building phase. The exception was: ExitFailure 1

mikeizbicki commented 10 years ago

There's a bad dependency issue in HLearn-classification right now that's caused by updates from other packages. There's two ways to deal with it. First, if you use the latest dev branch on github then everything should just work. The package hierarchy has been restructured to make sure this doesn't happen in the future, and the next release of HLearn will avoid this problem.

Second, you can manually install older versions of HLearn-algebra and HLearn-distributions off of hackage. The second to last post in this issue has instructions.

Let me know if this works for you.

2piix commented 10 years ago

I think you meant https://github.com/mikeizbicki/HLearn/issues/19. (Just in case somebody stumbles upon my issue).

Thanks!