Could not deduce (Num (Output ('CC ('Left TA TB n0))))
arising from the literal `1'
from the context (a ~ 'CC n, SingRep (Either TA TB) n)
bound by a pattern with constructor
SCC :: forall (a_a37R :: TC) (n_a37S :: Either TA TB).
(a_a37R ~ 'CC n_a37S, SingRep (Either TA TB) n_a37S) =>
Sing (Either TA TB) n_a37S -> Sing TC a_a37R,
in an equation for `g'
at Test.hs:21:4-16
or from (n ~ 'Left TA TB n0,
SingRep TA n0,
SingKind TA ('KindParam TA))
bound by a pattern with constructor
SLeft :: forall (a0 :: BOX)
(b0 :: BOX)
(a1 :: Either a0 b0)
(n0 :: a0).
(a1 ~ 'Left a0 b0 n0, SingRep a0 n0,
SingKind a0 ('KindParam a0)) =>
Sing a0 n0 -> Sing (Either a0 b0) a1,
in an equation for `g'
at Test.hs:21:9-15
Possible fix:
add an instance declaration for
(Num (Output ('CC ('Left TA TB n0))))
In the expression: 1
In an equation for `g': g (SCC (SLeft _)) = 1
Now I understand (looking at -ddump-slices, the singletons' library paper and the error message) that the definition of SCC and SLeft don't immediately imply what I just wrote above. So my question is: in the right hand-side of g (SCC (SLeft _)) = 1,