You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This missing instance disables using deciding1 for datatypes like this:
dataTreea=Leafa | Node [Treea] derivingGeneric1
To fix this missing instance Deciding1 and deciding1 have to gain extra parameters:
class (Generic1t, GDeciding1q1q (Rep1t)) =>Deciding1q1qtwheredeciding1::Decidablef=>p1q1->pq-> (forallgb.q1g=>fb->f (gb)) -- used for (f :.: g)-> (forallb.qb=>fb) -- used for K1->fa-- used for Par1->f (ta)
GDeciding1 then can have an instance for (f :.: g):
instance (q1f, GDeciding1q1qg) =>GDeciding1q1q (f:.:g) where
gdeciding1 p1 p g q r = contramap unComp1 (g (gdeciding1 p1 p g q r))
Examples:
--| It's impossible to have an instance of Void1 unless f a ~ Void.classVoid1fwhere absurd1 ::fa->bgeq1::Deciding1Void1Eqf=> (a->a->Bool) ->fa->fa->Bool
geq1 f = getEquivalence $ deciding1
(Proxy::ProxyVoid1) (Proxy::ProxyEq)
(const$Equivalence absurd1) (Equivalence(==)) (Equivalence f)
--| Every type has an instance of Unit1.-- Unit1 a ~ ()classUnit1ainstanceUnit1agfoldMap:: (Deciding1FoldableUnit1f, Monoidm) => (a->m) ->fa->m
gfoldMap =flip. getOp $ deciding1
(Proxy::ProxyFoldable) (Proxy::ProxyUnit1)
(Op.foldMap. getOp) (Opmempty) (Op (flipid))
The text was updated successfully, but these errors were encountered:
This missing instance disables using
deciding1
for datatypes like this:To fix this missing instance
Deciding1
anddeciding1
have to gain extra parameters:GDeciding1
then can have an instance for(f :.: g)
:Examples:
The text was updated successfully, but these errors were encountered: