Hi,
I run into a problem while trying to add type annotations to
funcool/cats. I started with two very basic things, monoid and semigroup. There is a type error on
this line of testType Error (cats/typed/core.clj:24:21)
Type mismatch:
Expected: (t/All [x] (t/Option (t/I Context (t/U (Semigroup x) (Monoid x)))))
Actual: (t/I Context (Monoid t/Bool))
Type Error (cats/typed/core.clj:24:3)
Function cats.protocols/-get-level could not be applied to arguments:
Domains:
Context
Arguments:
(t/All [x] (t/Option (t/I Context (t/U (Monoid x) (Semigroup x)))))
Ranges:
t/Num
For me as someone with no exposure to type theory,
(I Context (Monoid Bool))
does not contradict to
(All [x] (Option (I Context (U (Monoid x) (Semigroup x)))))
However I think it's more likely that I've done something stupid. Any idea please?
Thanks,
Tao