@@ -174,12 +174,12 @@ data PrismBoggle p a b where
174instance Choice p => Profunctor (PrismBoggle p) where
174instance Choice p => Profunctor (PrismBoggle p) where
175 dimap f g (Dirty pab) = DMap f g pab
175 dimap f g (Dirty pab) = DMap f g pab
176 dimap f g (DMap f' g' pab) = DMap (f' . f) (g . g') pab
176 dimap f g (DMap f' g' pab) = DMap (f' . f) (g . g') pab
177− dimap f g (DRight pab) = DMap f g (right' pab)
177+ dimap f g (DRight pab) = DMap f g (right' pab)
179instance Choice p => Choice (PrismBoggle p) where
179instance Choice p => Choice (PrismBoggle p) where
180 right' (Dirty pab) = DRight pab
180 right' (Dirty pab) = DRight pab
181 right' (DMap f g pab) = DMap (fmap f) (fmap g) (right' pab)
181 right' (DMap f g pab) = DMap (fmap f) (fmap g) (right' pab)
182− right' (DRight pab) = DRight (right' pab)
182+ right' (DRight pab) = DMap assoc assoc' (right' pab)
184assoc :: Either a (Either b c) -> Either (Either a b) c
184assoc :: Either a (Either b c) -> Either (Either a b) c
185assoc e = case e of
185assoc e = case e of
@@ -208,8 +208,8 @@ injPrism (DMap f g pab) = dimap f g pab
208injPrism (DRight pab) = right' pab
208injPrism (DRight pab) = right' pab
210prismRavel :: (Choice p, Applicative f)
210prismRavel :: (Choice p, Applicative f)
211− => (PrismBoggle p a (Boggle f b) -> PrismBoggle p s (Boggle f t))
211+ => (PrismBoggle (PrismBoggle p) a (Boggle f b) -> PrismBoggle (PrismBoggle p) s (Boggle f t))
212 -> (p a (f b) -> p s (f t))
212 -> (p a (f b) -> p s (f t))
213−prismRavel coy pafb = injPrism (dimap id lowerBoggle (coy (dimap id liftBoggle (projPrism pafb))))
213+prismRavel coy pafb = injPrism (injPrism (dimap id lowerBoggle (coy (dimap id liftBoggle (projPrism (projPrism pafb))))))
214{-# INLINE prismRavel #-}
214{-# INLINE prismRavel #-}