I'm using Idris 2 v0.3. I can't see why the compiler can't find an implementation for Gaussian
of Distribution
in
interface Distribution dist where
mean : dist -> Double
data Gaussian : Type where
MkGaussian : Double -> Gaussian
Distribution Gaussian where
mean (MkGaussian mean') = mean'
KnowledgeBased : Distribution d => (d : Type) -> Type
ei : KnowledgeBased Gaussian
I'm getting error
"src/Foo.idr" 12L, 459C written
Error: While processing type of ei. Can't find an implementation for Distribution ?d.
.../src/Foo.idr:12:6--12:29
|
12 | ei : KnowledgeBased Gaussian
| ^^^^^^^^^^^^^^^^^^^^^^^