{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeInType #-}
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_HADDOCK not-home #-}
module Optics.Internal.Optic.Subtyping where
import GHC.TypeLits (ErrorMessage(..), TypeError)
import Optics.Internal.Optic.TypeLevel
import Optics.Internal.Optic.Types
class Is k l where
implies :: (Constraints k p => r) -> (Constraints l p => r)
instance Is k k where
implies :: (Constraints k p => r) -> Constraints k p => r
implies Constraints k p => r
r = r
Constraints k p => r
r
instance {-# OVERLAPPABLE #-} TypeError
('ShowType k ':<>: 'Text " cannot be used as " ':<>: 'ShowType l
':$$: 'Text "Perhaps you meant one of these:"
':$$: ShowEliminations (EliminationForms k)
) => Is k l where
implies :: (Constraints k p => r) -> Constraints l p => r
implies Constraints k p => r
_ = [Char] -> r
forall a. HasCallStack => [Char] -> a
error [Char]
"unreachable"
type family EliminationForms (k :: OpticKind) where
EliminationForms An_AffineFold = AffineFoldEliminations
EliminationForms An_AffineTraversal = AffineTraversalEliminations
EliminationForms A_Fold = FoldEliminations
EliminationForms A_Getter = GetterEliminations
EliminationForms An_Iso = IsoEliminations
EliminationForms A_Lens = LensEliminations
EliminationForms A_Prism = PrismEliminations
EliminationForms A_ReversedLens = ReviewEliminations
EliminationForms A_ReversedPrism = GetterEliminations
EliminationForms A_Review = ReviewEliminations
EliminationForms A_Setter = SetterEliminations
EliminationForms A_Traversal = TraversalEliminations
type AffineFoldEliminations = '( '[ '("preview", "Optics.AffineFold") ]
, '[ "(^?)" ])
type AffineTraversalEliminations = AffineFoldEliminations
`AppendEliminations` SetterEliminations
type FoldEliminations = '( '[ '("traverseOf_", "Optics.Fold")
, '("foldMapOf", "Optics.Fold")
, '("toListOf", "Optics.Fold")
]
, '[ "(^..)" ])
type GetterEliminations = '( '[ '("view", "Optics.Getter") ]
, '[ "(^.)" ])
type IsoEliminations = GetterEliminations
`AppendEliminations` ReviewEliminations
`AppendEliminations` SetterEliminations
type LensEliminations = GetterEliminations
`AppendEliminations` SetterEliminations
type PrismEliminations = AffineFoldEliminations
`AppendEliminations` ReviewEliminations
`AppendEliminations` SetterEliminations
type ReviewEliminations = '( '[ '("review", "Optics.Review") ]
, '[ "(#)" ])
type SetterEliminations = '( '[ '("over", "Optics.Setter")
, '("set", "Optics.Setter")
]
, '[ "(%~)", "(.~)" ])
type TraversalEliminations = '( '[ '("traverseOf", "Optics.Traversal") ]
, '[]) `AppendEliminations` FoldEliminations
`AppendEliminations` SetterEliminations
instance Is An_Iso A_ReversedLens where implies :: (Constraints An_Iso p => r) -> Constraints A_ReversedLens p => r
implies Constraints An_Iso p => r
r = r
Constraints An_Iso p => r
r
instance Is An_Iso A_ReversedPrism where implies :: (Constraints An_Iso p => r) -> Constraints A_ReversedPrism p => r
implies Constraints An_Iso p => r
r = r
Constraints An_Iso p => r
r
instance Is An_Iso A_Prism where implies :: (Constraints An_Iso p => r) -> Constraints A_Prism p => r
implies Constraints An_Iso p => r
r = r
Constraints An_Iso p => r
r
instance Is An_Iso A_Review where implies :: (Constraints An_Iso p => r) -> Constraints A_Review p => r
implies Constraints An_Iso p => r
r = r
Constraints An_Iso p => r
r
instance Is An_Iso A_Lens where implies :: (Constraints An_Iso p => r) -> Constraints A_Lens p => r
implies Constraints An_Iso p => r
r = r
Constraints An_Iso p => r
r
instance Is An_Iso A_Getter where implies :: (Constraints An_Iso p => r) -> Constraints A_Getter p => r
implies Constraints An_Iso p => r
r = r
Constraints An_Iso p => r
r
instance Is An_Iso An_AffineTraversal where implies :: (Constraints An_Iso p => r)
-> Constraints An_AffineTraversal p => r
implies Constraints An_Iso p => r
r = r
Constraints An_Iso p => r
r
instance Is An_Iso An_AffineFold where implies :: (Constraints An_Iso p => r) -> Constraints An_AffineFold p => r
implies Constraints An_Iso p => r
r = r
Constraints An_Iso p => r
r
instance Is An_Iso A_Traversal where implies :: (Constraints An_Iso p => r) -> Constraints A_Traversal p => r
implies Constraints An_Iso p => r
r = r
Constraints An_Iso p => r
r
instance Is An_Iso A_Fold where implies :: (Constraints An_Iso p => r) -> Constraints A_Fold p => r
implies Constraints An_Iso p => r
r = r
Constraints An_Iso p => r
r
instance Is An_Iso A_Setter where implies :: (Constraints An_Iso p => r) -> Constraints A_Setter p => r
implies Constraints An_Iso p => r
r = r
Constraints An_Iso p => r
r
instance Is A_ReversedLens A_Review where implies :: (Constraints A_ReversedLens p => r) -> Constraints A_Review p => r
implies Constraints A_ReversedLens p => r
r = r
Constraints A_ReversedLens p => r
r
instance Is A_ReversedPrism A_Getter where implies :: (Constraints A_ReversedPrism p => r) -> Constraints A_Getter p => r
implies Constraints A_ReversedPrism p => r
r = r
Constraints A_ReversedPrism p => r
r
instance Is A_ReversedPrism An_AffineFold where implies :: (Constraints A_ReversedPrism p => r)
-> Constraints An_AffineFold p => r
implies Constraints A_ReversedPrism p => r
r = r
Constraints A_ReversedPrism p => r
r
instance Is A_ReversedPrism A_Fold where implies :: (Constraints A_ReversedPrism p => r) -> Constraints A_Fold p => r
implies Constraints A_ReversedPrism p => r
r = r
Constraints A_ReversedPrism p => r
r
instance Is A_Prism A_Review where implies :: (Constraints A_Prism p => r) -> Constraints A_Review p => r
implies Constraints A_Prism p => r
r = r
Constraints A_Prism p => r
r
instance Is A_Prism An_AffineTraversal where implies :: (Constraints A_Prism p => r)
-> Constraints An_AffineTraversal p => r
implies Constraints A_Prism p => r
r = r
Constraints A_Prism p => r
r
instance Is A_Prism An_AffineFold where implies :: (Constraints A_Prism p => r) -> Constraints An_AffineFold p => r
implies Constraints A_Prism p => r
r = r
Constraints A_Prism p => r
r
instance Is A_Prism A_Traversal where implies :: (Constraints A_Prism p => r) -> Constraints A_Traversal p => r
implies Constraints A_Prism p => r
r = r
Constraints A_Prism p => r
r
instance Is A_Prism A_Fold where implies :: (Constraints A_Prism p => r) -> Constraints A_Fold p => r
implies Constraints A_Prism p => r
r = r
Constraints A_Prism p => r
r
instance Is A_Prism A_Setter where implies :: (Constraints A_Prism p => r) -> Constraints A_Setter p => r
implies Constraints A_Prism p => r
r = r
Constraints A_Prism p => r
r
instance Is A_Lens A_Getter where implies :: (Constraints A_Lens p => r) -> Constraints A_Getter p => r
implies Constraints A_Lens p => r
r = r
Constraints A_Lens p => r
r
instance Is A_Lens An_AffineTraversal where implies :: (Constraints A_Lens p => r)
-> Constraints An_AffineTraversal p => r
implies Constraints A_Lens p => r
r = r
Constraints A_Lens p => r
r
instance Is A_Lens An_AffineFold where implies :: (Constraints A_Lens p => r) -> Constraints An_AffineFold p => r
implies Constraints A_Lens p => r
r = r
Constraints A_Lens p => r
r
instance Is A_Lens A_Traversal where implies :: (Constraints A_Lens p => r) -> Constraints A_Traversal p => r
implies Constraints A_Lens p => r
r = r
Constraints A_Lens p => r
r
instance Is A_Lens A_Fold where implies :: (Constraints A_Lens p => r) -> Constraints A_Fold p => r
implies Constraints A_Lens p => r
r = r
Constraints A_Lens p => r
r
instance Is A_Lens A_Setter where implies :: (Constraints A_Lens p => r) -> Constraints A_Setter p => r
implies Constraints A_Lens p => r
r = r
Constraints A_Lens p => r
r
instance Is A_Getter An_AffineFold where implies :: (Constraints A_Getter p => r) -> Constraints An_AffineFold p => r
implies Constraints A_Getter p => r
r = r
Constraints A_Getter p => r
r
instance Is A_Getter A_Fold where implies :: (Constraints A_Getter p => r) -> Constraints A_Fold p => r
implies Constraints A_Getter p => r
r = r
Constraints A_Getter p => r
r
instance Is An_AffineTraversal An_AffineFold where implies :: (Constraints An_AffineTraversal p => r)
-> Constraints An_AffineFold p => r
implies Constraints An_AffineTraversal p => r
r = r
Constraints An_AffineTraversal p => r
r
instance Is An_AffineTraversal A_Traversal where implies :: (Constraints An_AffineTraversal p => r)
-> Constraints A_Traversal p => r
implies Constraints An_AffineTraversal p => r
r = r
Constraints An_AffineTraversal p => r
r
instance Is An_AffineTraversal A_Fold where implies :: (Constraints An_AffineTraversal p => r)
-> Constraints A_Fold p => r
implies Constraints An_AffineTraversal p => r
r = r
Constraints An_AffineTraversal p => r
r
instance Is An_AffineTraversal A_Setter where implies :: (Constraints An_AffineTraversal p => r)
-> Constraints A_Setter p => r
implies Constraints An_AffineTraversal p => r
r = r
Constraints An_AffineTraversal p => r
r
instance Is An_AffineFold A_Fold where implies :: (Constraints An_AffineFold p => r) -> Constraints A_Fold p => r
implies Constraints An_AffineFold p => r
r = r
Constraints An_AffineFold p => r
r
instance Is A_Traversal A_Fold where implies :: (Constraints A_Traversal p => r) -> Constraints A_Fold p => r
implies Constraints A_Traversal p => r
r = r
Constraints A_Traversal p => r
r
instance Is A_Traversal A_Setter where implies :: (Constraints A_Traversal p => r) -> Constraints A_Setter p => r
implies Constraints A_Traversal p => r
r = r
Constraints A_Traversal p => r
r
class JoinKinds k l m | k l -> m where
joinKinds :: ((Constraints k p, Constraints l p) => r) -> (Constraints m p => r)
instance k ~ An_Iso => JoinKinds An_Iso An_Iso k where
joinKinds :: ((Constraints An_Iso p, Constraints An_Iso p) => r)
-> Constraints k p => r
joinKinds (Constraints An_Iso p, Constraints An_Iso p) => r
r = r
(Constraints An_Iso p, Constraints An_Iso p) => r
r
instance k ~ A_ReversedLens => JoinKinds An_Iso A_ReversedLens k where
joinKinds :: ((Constraints An_Iso p, Constraints A_ReversedLens p) => r)
-> Constraints k p => r
joinKinds (Constraints An_Iso p, Constraints A_ReversedLens p) => r
r = r
(Constraints An_Iso p, Constraints A_ReversedLens p) => r
r
instance k ~ A_ReversedPrism => JoinKinds An_Iso A_ReversedPrism k where
joinKinds :: ((Constraints An_Iso p, Constraints A_ReversedPrism p) => r)
-> Constraints k p => r
joinKinds (Constraints An_Iso p, Constraints A_ReversedPrism p) => r
r = r
(Constraints An_Iso p, Constraints A_ReversedPrism p) => r
r
instance k ~ A_Prism => JoinKinds An_Iso A_Prism k where
joinKinds :: ((Constraints An_Iso p, Constraints A_Prism p) => r)
-> Constraints k p => r
joinKinds (Constraints An_Iso p, Constraints A_Prism p) => r
r = r
(Constraints An_Iso p, Constraints A_Prism p) => r
r
instance k ~ A_Review => JoinKinds An_Iso A_Review k where
joinKinds :: ((Constraints An_Iso p, Constraints A_Review p) => r)
-> Constraints k p => r
joinKinds (Constraints An_Iso p, Constraints A_Review p) => r
r = r
(Constraints An_Iso p, Constraints A_Review p) => r
r
instance k ~ A_Lens => JoinKinds An_Iso A_Lens k where
joinKinds :: ((Constraints An_Iso p, Constraints A_Lens p) => r)
-> Constraints k p => r
joinKinds (Constraints An_Iso p, Constraints A_Lens p) => r
r = r
(Constraints An_Iso p, Constraints A_Lens p) => r
r
instance k ~ A_Getter => JoinKinds An_Iso A_Getter k where
joinKinds :: ((Constraints An_Iso p, Constraints A_Getter p) => r)
-> Constraints k p => r
joinKinds (Constraints An_Iso p, Constraints A_Getter p) => r
r = r
(Constraints An_Iso p, Constraints A_Getter p) => r
r
instance k ~ An_AffineTraversal => JoinKinds An_Iso An_AffineTraversal k where
joinKinds :: ((Constraints An_Iso p, Constraints An_AffineTraversal p) => r)
-> Constraints k p => r
joinKinds (Constraints An_Iso p, Constraints An_AffineTraversal p) => r
r = r
(Constraints An_Iso p, Constraints An_AffineTraversal p) => r
r
instance k ~ An_AffineFold => JoinKinds An_Iso An_AffineFold k where
joinKinds :: ((Constraints An_Iso p, Constraints An_AffineFold p) => r)
-> Constraints k p => r
joinKinds (Constraints An_Iso p, Constraints An_AffineFold p) => r
r = r
(Constraints An_Iso p, Constraints An_AffineFold p) => r
r
instance k ~ A_Traversal => JoinKinds An_Iso A_Traversal k where
joinKinds :: ((Constraints An_Iso p, Constraints A_Traversal p) => r)
-> Constraints k p => r
joinKinds (Constraints An_Iso p, Constraints A_Traversal p) => r
r = r
(Constraints An_Iso p, Constraints A_Traversal p) => r
r
instance k ~ A_Fold => JoinKinds An_Iso A_Fold k where
joinKinds :: ((Constraints An_Iso p, Constraints A_Fold p) => r)
-> Constraints k p => r
joinKinds (Constraints An_Iso p, Constraints A_Fold p) => r
r = r
(Constraints An_Iso p, Constraints A_Fold p) => r
r
instance k ~ A_Setter => JoinKinds An_Iso A_Setter k where
joinKinds :: ((Constraints An_Iso p, Constraints A_Setter p) => r)
-> Constraints k p => r
joinKinds (Constraints An_Iso p, Constraints A_Setter p) => r
r = r
(Constraints An_Iso p, Constraints A_Setter p) => r
r
instance k ~ A_ReversedLens => JoinKinds A_ReversedLens A_ReversedLens k where
joinKinds :: ((Constraints A_ReversedLens p, Constraints A_ReversedLens p) => r)
-> Constraints k p => r
joinKinds (Constraints A_ReversedLens p, Constraints A_ReversedLens p) => r
r = r
(Constraints A_ReversedLens p, Constraints A_ReversedLens p) => r
r
instance k ~ A_ReversedLens => JoinKinds A_ReversedLens An_Iso k where
joinKinds :: ((Constraints A_ReversedLens p, Constraints An_Iso p) => r)
-> Constraints k p => r
joinKinds (Constraints A_ReversedLens p, Constraints An_Iso p) => r
r = r
(Constraints A_ReversedLens p, Constraints An_Iso p) => r
r
instance k ~ A_Review => JoinKinds A_ReversedLens A_Prism k where
joinKinds :: ((Constraints A_ReversedLens p, Constraints A_Prism p) => r)
-> Constraints k p => r
joinKinds (Constraints A_ReversedLens p, Constraints A_Prism p) => r
r = r
(Constraints A_ReversedLens p, Constraints A_Prism p) => r
r
instance k ~ A_Review => JoinKinds A_ReversedLens A_Review k where
joinKinds :: ((Constraints A_ReversedLens p, Constraints A_Review p) => r)
-> Constraints k p => r
joinKinds (Constraints A_ReversedLens p, Constraints A_Review p) => r
r = r
(Constraints A_ReversedLens p, Constraints A_Review p) => r
r
instance k ~ A_ReversedPrism => JoinKinds A_ReversedPrism A_ReversedPrism k where
joinKinds :: ((Constraints A_ReversedPrism p, Constraints A_ReversedPrism p) =>
r)
-> Constraints k p => r
joinKinds (Constraints A_ReversedPrism p, Constraints A_ReversedPrism p) => r
r = r
(Constraints A_ReversedPrism p, Constraints A_ReversedPrism p) => r
r
instance k ~ A_ReversedPrism => JoinKinds A_ReversedPrism An_Iso k where
joinKinds :: ((Constraints A_ReversedPrism p, Constraints An_Iso p) => r)
-> Constraints k p => r
joinKinds (Constraints A_ReversedPrism p, Constraints An_Iso p) => r
r = r
(Constraints A_ReversedPrism p, Constraints An_Iso p) => r
r
instance k ~ An_AffineFold => JoinKinds A_ReversedPrism A_Prism k where
joinKinds :: ((Constraints A_ReversedPrism p, Constraints A_Prism p) => r)
-> Constraints k p => r
joinKinds (Constraints A_ReversedPrism p, Constraints A_Prism p) => r
r = r
(Constraints A_ReversedPrism p, Constraints A_Prism p) => r
r
instance k ~ A_Getter => JoinKinds A_ReversedPrism A_Lens k where
joinKinds :: ((Constraints A_ReversedPrism p, Constraints A_Lens p) => r)
-> Constraints k p => r
joinKinds (Constraints A_ReversedPrism p, Constraints A_Lens p) => r
r = r
(Constraints A_ReversedPrism p, Constraints A_Lens p) => r
r
instance k ~ A_Getter => JoinKinds A_ReversedPrism A_Getter k where
joinKinds :: ((Constraints A_ReversedPrism p, Constraints A_Getter p) => r)
-> Constraints k p => r
joinKinds (Constraints A_ReversedPrism p, Constraints A_Getter p) => r
r = r
(Constraints A_ReversedPrism p, Constraints A_Getter p) => r
r
instance k ~ An_AffineFold => JoinKinds A_ReversedPrism An_AffineTraversal k where
joinKinds :: ((Constraints A_ReversedPrism p,
Constraints An_AffineTraversal p) =>
r)
-> Constraints k p => r
joinKinds (Constraints A_ReversedPrism p,
Constraints An_AffineTraversal p) =>
r
r = r
(Constraints A_ReversedPrism p,
Constraints An_AffineTraversal p) =>
r
r
instance k ~ An_AffineFold => JoinKinds A_ReversedPrism An_AffineFold k where
joinKinds :: ((Constraints A_ReversedPrism p, Constraints An_AffineFold p) => r)
-> Constraints k p => r
joinKinds (Constraints A_ReversedPrism p, Constraints An_AffineFold p) => r
r = r
(Constraints A_ReversedPrism p, Constraints An_AffineFold p) => r
r
instance k ~ A_Fold => JoinKinds A_ReversedPrism A_Traversal k where
joinKinds :: ((Constraints A_ReversedPrism p, Constraints A_Traversal p) => r)
-> Constraints k p => r
joinKinds (Constraints A_ReversedPrism p, Constraints A_Traversal p) => r
r = r
(Constraints A_ReversedPrism p, Constraints A_Traversal p) => r
r
instance k ~ A_Fold => JoinKinds A_ReversedPrism A_Fold k where
joinKinds :: ((Constraints A_ReversedPrism p, Constraints A_Fold p) => r)
-> Constraints k p => r
joinKinds (Constraints A_ReversedPrism p, Constraints A_Fold p) => r
r = r
(Constraints A_ReversedPrism p, Constraints A_Fold p) => r
r
instance k ~ A_Prism => JoinKinds A_Prism A_Prism k where
joinKinds :: ((Constraints A_Prism p, Constraints A_Prism p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Prism p, Constraints A_Prism p) => r
r = r
(Constraints A_Prism p, Constraints A_Prism p) => r
r
instance k ~ A_Prism => JoinKinds A_Prism An_Iso k where
joinKinds :: ((Constraints A_Prism p, Constraints An_Iso p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Prism p, Constraints An_Iso p) => r
r = r
(Constraints A_Prism p, Constraints An_Iso p) => r
r
instance k ~ A_Review => JoinKinds A_Prism A_ReversedLens k where
joinKinds :: ((Constraints A_Prism p, Constraints A_ReversedLens p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Prism p, Constraints A_ReversedLens p) => r
r = r
(Constraints A_Prism p, Constraints A_ReversedLens p) => r
r
instance k ~ An_AffineFold => JoinKinds A_Prism A_ReversedPrism k where
joinKinds :: ((Constraints A_Prism p, Constraints A_ReversedPrism p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Prism p, Constraints A_ReversedPrism p) => r
r = r
(Constraints A_Prism p, Constraints A_ReversedPrism p) => r
r
instance k ~ A_Review => JoinKinds A_Prism A_Review k where
joinKinds :: ((Constraints A_Prism p, Constraints A_Review p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Prism p, Constraints A_Review p) => r
r = r
(Constraints A_Prism p, Constraints A_Review p) => r
r
instance k ~ An_AffineTraversal => JoinKinds A_Prism A_Lens k where
joinKinds :: ((Constraints A_Prism p, Constraints A_Lens p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Prism p, Constraints A_Lens p) => r
r = r
(Constraints A_Prism p, Constraints A_Lens p) => r
r
instance k ~ An_AffineFold => JoinKinds A_Prism A_Getter k where
joinKinds :: ((Constraints A_Prism p, Constraints A_Getter p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Prism p, Constraints A_Getter p) => r
r = r
(Constraints A_Prism p, Constraints A_Getter p) => r
r
instance k ~ An_AffineTraversal => JoinKinds A_Prism An_AffineTraversal k where
joinKinds :: ((Constraints A_Prism p, Constraints An_AffineTraversal p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Prism p, Constraints An_AffineTraversal p) => r
r = r
(Constraints A_Prism p, Constraints An_AffineTraversal p) => r
r
instance k ~ An_AffineFold => JoinKinds A_Prism An_AffineFold k where
joinKinds :: ((Constraints A_Prism p, Constraints An_AffineFold p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Prism p, Constraints An_AffineFold p) => r
r = r
(Constraints A_Prism p, Constraints An_AffineFold p) => r
r
instance k ~ A_Traversal => JoinKinds A_Prism A_Traversal k where
joinKinds :: ((Constraints A_Prism p, Constraints A_Traversal p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Prism p, Constraints A_Traversal p) => r
r = r
(Constraints A_Prism p, Constraints A_Traversal p) => r
r
instance k ~ A_Fold => JoinKinds A_Prism A_Fold k where
joinKinds :: ((Constraints A_Prism p, Constraints A_Fold p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Prism p, Constraints A_Fold p) => r
r = r
(Constraints A_Prism p, Constraints A_Fold p) => r
r
instance k ~ A_Setter => JoinKinds A_Prism A_Setter k where
joinKinds :: ((Constraints A_Prism p, Constraints A_Setter p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Prism p, Constraints A_Setter p) => r
r = r
(Constraints A_Prism p, Constraints A_Setter p) => r
r
instance k ~ A_Review => JoinKinds A_Review A_Review k where
joinKinds :: ((Constraints A_Review p, Constraints A_Review p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Review p, Constraints A_Review p) => r
r = r
(Constraints A_Review p, Constraints A_Review p) => r
r
instance k ~ A_Review => JoinKinds A_Review An_Iso k where
joinKinds :: ((Constraints A_Review p, Constraints An_Iso p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Review p, Constraints An_Iso p) => r
r = r
(Constraints A_Review p, Constraints An_Iso p) => r
r
instance k ~ A_Review => JoinKinds A_Review A_ReversedLens k where
joinKinds :: ((Constraints A_Review p, Constraints A_ReversedLens p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Review p, Constraints A_ReversedLens p) => r
r = r
(Constraints A_Review p, Constraints A_ReversedLens p) => r
r
instance k ~ A_Review => JoinKinds A_Review A_Prism k where
joinKinds :: ((Constraints A_Review p, Constraints A_Prism p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Review p, Constraints A_Prism p) => r
r = r
(Constraints A_Review p, Constraints A_Prism p) => r
r
instance k ~ A_Lens => JoinKinds A_Lens A_Lens k where
joinKinds :: ((Constraints A_Lens p, Constraints A_Lens p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Lens p, Constraints A_Lens p) => r
r = r
(Constraints A_Lens p, Constraints A_Lens p) => r
r
instance k ~ A_Lens => JoinKinds A_Lens An_Iso k where
joinKinds :: ((Constraints A_Lens p, Constraints An_Iso p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Lens p, Constraints An_Iso p) => r
r = r
(Constraints A_Lens p, Constraints An_Iso p) => r
r
instance k ~ A_Getter => JoinKinds A_Lens A_ReversedPrism k where
joinKinds :: ((Constraints A_Lens p, Constraints A_ReversedPrism p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Lens p, Constraints A_ReversedPrism p) => r
r = r
(Constraints A_Lens p, Constraints A_ReversedPrism p) => r
r
instance k ~ An_AffineTraversal => JoinKinds A_Lens A_Prism k where
joinKinds :: ((Constraints A_Lens p, Constraints A_Prism p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Lens p, Constraints A_Prism p) => r
r = r
(Constraints A_Lens p, Constraints A_Prism p) => r
r
instance k ~ A_Getter => JoinKinds A_Lens A_Getter k where
joinKinds :: ((Constraints A_Lens p, Constraints A_Getter p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Lens p, Constraints A_Getter p) => r
r = r
(Constraints A_Lens p, Constraints A_Getter p) => r
r
instance k ~ An_AffineTraversal => JoinKinds A_Lens An_AffineTraversal k where
joinKinds :: ((Constraints A_Lens p, Constraints An_AffineTraversal p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Lens p, Constraints An_AffineTraversal p) => r
r = r
(Constraints A_Lens p, Constraints An_AffineTraversal p) => r
r
instance k ~ An_AffineFold => JoinKinds A_Lens An_AffineFold k where
joinKinds :: ((Constraints A_Lens p, Constraints An_AffineFold p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Lens p, Constraints An_AffineFold p) => r
r = r
(Constraints A_Lens p, Constraints An_AffineFold p) => r
r
instance k ~ A_Traversal => JoinKinds A_Lens A_Traversal k where
joinKinds :: ((Constraints A_Lens p, Constraints A_Traversal p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Lens p, Constraints A_Traversal p) => r
r = r
(Constraints A_Lens p, Constraints A_Traversal p) => r
r
instance k ~ A_Fold => JoinKinds A_Lens A_Fold k where
joinKinds :: ((Constraints A_Lens p, Constraints A_Fold p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Lens p, Constraints A_Fold p) => r
r = r
(Constraints A_Lens p, Constraints A_Fold p) => r
r
instance k ~ A_Setter => JoinKinds A_Lens A_Setter k where
joinKinds :: ((Constraints A_Lens p, Constraints A_Setter p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Lens p, Constraints A_Setter p) => r
r = r
(Constraints A_Lens p, Constraints A_Setter p) => r
r
instance k ~ A_Getter => JoinKinds A_Getter A_Getter k where
joinKinds :: ((Constraints A_Getter p, Constraints A_Getter p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Getter p, Constraints A_Getter p) => r
r = r
(Constraints A_Getter p, Constraints A_Getter p) => r
r
instance k ~ A_Getter => JoinKinds A_Getter An_Iso k where
joinKinds :: ((Constraints A_Getter p, Constraints An_Iso p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Getter p, Constraints An_Iso p) => r
r = r
(Constraints A_Getter p, Constraints An_Iso p) => r
r
instance k ~ A_Getter => JoinKinds A_Getter A_ReversedPrism k where
joinKinds :: ((Constraints A_Getter p, Constraints A_ReversedPrism p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Getter p, Constraints A_ReversedPrism p) => r
r = r
(Constraints A_Getter p, Constraints A_ReversedPrism p) => r
r
instance k ~ An_AffineFold => JoinKinds A_Getter A_Prism k where
joinKinds :: ((Constraints A_Getter p, Constraints A_Prism p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Getter p, Constraints A_Prism p) => r
r = r
(Constraints A_Getter p, Constraints A_Prism p) => r
r
instance k ~ A_Getter => JoinKinds A_Getter A_Lens k where
joinKinds :: ((Constraints A_Getter p, Constraints A_Lens p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Getter p, Constraints A_Lens p) => r
r = r
(Constraints A_Getter p, Constraints A_Lens p) => r
r
instance k ~ An_AffineFold => JoinKinds A_Getter An_AffineTraversal k where
joinKinds :: ((Constraints A_Getter p, Constraints An_AffineTraversal p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Getter p, Constraints An_AffineTraversal p) => r
r = r
(Constraints A_Getter p, Constraints An_AffineTraversal p) => r
r
instance k ~ An_AffineFold => JoinKinds A_Getter An_AffineFold k where
joinKinds :: ((Constraints A_Getter p, Constraints An_AffineFold p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Getter p, Constraints An_AffineFold p) => r
r = r
(Constraints A_Getter p, Constraints An_AffineFold p) => r
r
instance k ~ A_Fold => JoinKinds A_Getter A_Traversal k where
joinKinds :: ((Constraints A_Getter p, Constraints A_Traversal p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Getter p, Constraints A_Traversal p) => r
r = r
(Constraints A_Getter p, Constraints A_Traversal p) => r
r
instance k ~ A_Fold => JoinKinds A_Getter A_Fold k where
joinKinds :: ((Constraints A_Getter p, Constraints A_Fold p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Getter p, Constraints A_Fold p) => r
r = r
(Constraints A_Getter p, Constraints A_Fold p) => r
r
instance k ~ An_AffineTraversal => JoinKinds An_AffineTraversal An_AffineTraversal k where
joinKinds :: ((Constraints An_AffineTraversal p,
Constraints An_AffineTraversal p) =>
r)
-> Constraints k p => r
joinKinds (Constraints An_AffineTraversal p,
Constraints An_AffineTraversal p) =>
r
r = r
(Constraints An_AffineTraversal p,
Constraints An_AffineTraversal p) =>
r
r
instance k ~ An_AffineTraversal => JoinKinds An_AffineTraversal An_Iso k where
joinKinds :: ((Constraints An_AffineTraversal p, Constraints An_Iso p) => r)
-> Constraints k p => r
joinKinds (Constraints An_AffineTraversal p, Constraints An_Iso p) => r
r = r
(Constraints An_AffineTraversal p, Constraints An_Iso p) => r
r
instance k ~ An_AffineFold => JoinKinds An_AffineTraversal A_ReversedPrism k where
joinKinds :: ((Constraints An_AffineTraversal p,
Constraints A_ReversedPrism p) =>
r)
-> Constraints k p => r
joinKinds (Constraints An_AffineTraversal p,
Constraints A_ReversedPrism p) =>
r
r = r
(Constraints An_AffineTraversal p,
Constraints A_ReversedPrism p) =>
r
r
instance k ~ An_AffineTraversal => JoinKinds An_AffineTraversal A_Prism k where
joinKinds :: ((Constraints An_AffineTraversal p, Constraints A_Prism p) => r)
-> Constraints k p => r
joinKinds (Constraints An_AffineTraversal p, Constraints A_Prism p) => r
r = r
(Constraints An_AffineTraversal p, Constraints A_Prism p) => r
r
instance k ~ An_AffineTraversal => JoinKinds An_AffineTraversal A_Lens k where
joinKinds :: ((Constraints An_AffineTraversal p, Constraints A_Lens p) => r)
-> Constraints k p => r
joinKinds (Constraints An_AffineTraversal p, Constraints A_Lens p) => r
r = r
(Constraints An_AffineTraversal p, Constraints A_Lens p) => r
r
instance k ~ An_AffineFold => JoinKinds An_AffineTraversal A_Getter k where
joinKinds :: ((Constraints An_AffineTraversal p, Constraints A_Getter p) => r)
-> Constraints k p => r
joinKinds (Constraints An_AffineTraversal p, Constraints A_Getter p) => r
r = r
(Constraints An_AffineTraversal p, Constraints A_Getter p) => r
r
instance k ~ An_AffineFold => JoinKinds An_AffineTraversal An_AffineFold k where
joinKinds :: ((Constraints An_AffineTraversal p, Constraints An_AffineFold p) =>
r)
-> Constraints k p => r
joinKinds (Constraints An_AffineTraversal p, Constraints An_AffineFold p) =>
r
r = r
(Constraints An_AffineTraversal p, Constraints An_AffineFold p) =>
r
r
instance k ~ A_Traversal => JoinKinds An_AffineTraversal A_Traversal k where
joinKinds :: ((Constraints An_AffineTraversal p, Constraints A_Traversal p) =>
r)
-> Constraints k p => r
joinKinds (Constraints An_AffineTraversal p, Constraints A_Traversal p) => r
r = r
(Constraints An_AffineTraversal p, Constraints A_Traversal p) => r
r
instance k ~ A_Fold => JoinKinds An_AffineTraversal A_Fold k where
joinKinds :: ((Constraints An_AffineTraversal p, Constraints A_Fold p) => r)
-> Constraints k p => r
joinKinds (Constraints An_AffineTraversal p, Constraints A_Fold p) => r
r = r
(Constraints An_AffineTraversal p, Constraints A_Fold p) => r
r
instance k ~ A_Setter => JoinKinds An_AffineTraversal A_Setter k where
joinKinds :: ((Constraints An_AffineTraversal p, Constraints A_Setter p) => r)
-> Constraints k p => r
joinKinds (Constraints An_AffineTraversal p, Constraints A_Setter p) => r
r = r
(Constraints An_AffineTraversal p, Constraints A_Setter p) => r
r
instance k ~ An_AffineFold => JoinKinds An_AffineFold An_AffineFold k where
joinKinds :: ((Constraints An_AffineFold p, Constraints An_AffineFold p) => r)
-> Constraints k p => r
joinKinds (Constraints An_AffineFold p, Constraints An_AffineFold p) => r
r = r
(Constraints An_AffineFold p, Constraints An_AffineFold p) => r
r
instance k ~ An_AffineFold => JoinKinds An_AffineFold An_Iso k where
joinKinds :: ((Constraints An_AffineFold p, Constraints An_Iso p) => r)
-> Constraints k p => r
joinKinds (Constraints An_AffineFold p, Constraints An_Iso p) => r
r = r
(Constraints An_AffineFold p, Constraints An_Iso p) => r
r
instance k ~ An_AffineFold => JoinKinds An_AffineFold A_ReversedPrism k where
joinKinds :: ((Constraints An_AffineFold p, Constraints A_ReversedPrism p) => r)
-> Constraints k p => r
joinKinds (Constraints An_AffineFold p, Constraints A_ReversedPrism p) => r
r = r
(Constraints An_AffineFold p, Constraints A_ReversedPrism p) => r
r
instance k ~ An_AffineFold => JoinKinds An_AffineFold A_Prism k where
joinKinds :: ((Constraints An_AffineFold p, Constraints A_Prism p) => r)
-> Constraints k p => r
joinKinds (Constraints An_AffineFold p, Constraints A_Prism p) => r
r = r
(Constraints An_AffineFold p, Constraints A_Prism p) => r
r
instance k ~ An_AffineFold => JoinKinds An_AffineFold A_Lens k where
joinKinds :: ((Constraints An_AffineFold p, Constraints A_Lens p) => r)
-> Constraints k p => r
joinKinds (Constraints An_AffineFold p, Constraints A_Lens p) => r
r = r
(Constraints An_AffineFold p, Constraints A_Lens p) => r
r
instance k ~ An_AffineFold => JoinKinds An_AffineFold A_Getter k where
joinKinds :: ((Constraints An_AffineFold p, Constraints A_Getter p) => r)
-> Constraints k p => r
joinKinds (Constraints An_AffineFold p, Constraints A_Getter p) => r
r = r
(Constraints An_AffineFold p, Constraints A_Getter p) => r
r
instance k ~ An_AffineFold => JoinKinds An_AffineFold An_AffineTraversal k where
joinKinds :: ((Constraints An_AffineFold p, Constraints An_AffineTraversal p) =>
r)
-> Constraints k p => r
joinKinds (Constraints An_AffineFold p, Constraints An_AffineTraversal p) =>
r
r = r
(Constraints An_AffineFold p, Constraints An_AffineTraversal p) =>
r
r
instance k ~ A_Fold => JoinKinds An_AffineFold A_Traversal k where
joinKinds :: ((Constraints An_AffineFold p, Constraints A_Traversal p) => r)
-> Constraints k p => r
joinKinds (Constraints An_AffineFold p, Constraints A_Traversal p) => r
r = r
(Constraints An_AffineFold p, Constraints A_Traversal p) => r
r
instance k ~ A_Fold => JoinKinds An_AffineFold A_Fold k where
joinKinds :: ((Constraints An_AffineFold p, Constraints A_Fold p) => r)
-> Constraints k p => r
joinKinds (Constraints An_AffineFold p, Constraints A_Fold p) => r
r = r
(Constraints An_AffineFold p, Constraints A_Fold p) => r
r
instance k ~ A_Traversal => JoinKinds A_Traversal A_Traversal k where
joinKinds :: ((Constraints A_Traversal p, Constraints A_Traversal p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Traversal p, Constraints A_Traversal p) => r
r = r
(Constraints A_Traversal p, Constraints A_Traversal p) => r
r
instance k ~ A_Traversal => JoinKinds A_Traversal An_Iso k where
joinKinds :: ((Constraints A_Traversal p, Constraints An_Iso p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Traversal p, Constraints An_Iso p) => r
r = r
(Constraints A_Traversal p, Constraints An_Iso p) => r
r
instance k ~ A_Fold => JoinKinds A_Traversal A_ReversedPrism k where
joinKinds :: ((Constraints A_Traversal p, Constraints A_ReversedPrism p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Traversal p, Constraints A_ReversedPrism p) => r
r = r
(Constraints A_Traversal p, Constraints A_ReversedPrism p) => r
r
instance k ~ A_Traversal => JoinKinds A_Traversal A_Prism k where
joinKinds :: ((Constraints A_Traversal p, Constraints A_Prism p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Traversal p, Constraints A_Prism p) => r
r = r
(Constraints A_Traversal p, Constraints A_Prism p) => r
r
instance k ~ A_Traversal => JoinKinds A_Traversal A_Lens k where
joinKinds :: ((Constraints A_Traversal p, Constraints A_Lens p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Traversal p, Constraints A_Lens p) => r
r = r
(Constraints A_Traversal p, Constraints A_Lens p) => r
r
instance k ~ A_Fold => JoinKinds A_Traversal A_Getter k where
joinKinds :: ((Constraints A_Traversal p, Constraints A_Getter p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Traversal p, Constraints A_Getter p) => r
r = r
(Constraints A_Traversal p, Constraints A_Getter p) => r
r
instance k ~ A_Traversal => JoinKinds A_Traversal An_AffineTraversal k where
joinKinds :: ((Constraints A_Traversal p, Constraints An_AffineTraversal p) =>
r)
-> Constraints k p => r
joinKinds (Constraints A_Traversal p, Constraints An_AffineTraversal p) => r
r = r
(Constraints A_Traversal p, Constraints An_AffineTraversal p) => r
r
instance k ~ A_Fold => JoinKinds A_Traversal An_AffineFold k where
joinKinds :: ((Constraints A_Traversal p, Constraints An_AffineFold p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Traversal p, Constraints An_AffineFold p) => r
r = r
(Constraints A_Traversal p, Constraints An_AffineFold p) => r
r
instance k ~ A_Fold => JoinKinds A_Traversal A_Fold k where
joinKinds :: ((Constraints A_Traversal p, Constraints A_Fold p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Traversal p, Constraints A_Fold p) => r
r = r
(Constraints A_Traversal p, Constraints A_Fold p) => r
r
instance k ~ A_Setter => JoinKinds A_Traversal A_Setter k where
joinKinds :: ((Constraints A_Traversal p, Constraints A_Setter p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Traversal p, Constraints A_Setter p) => r
r = r
(Constraints A_Traversal p, Constraints A_Setter p) => r
r
instance k ~ A_Fold => JoinKinds A_Fold A_Fold k where
joinKinds :: ((Constraints A_Fold p, Constraints A_Fold p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Fold p, Constraints A_Fold p) => r
r = r
(Constraints A_Fold p, Constraints A_Fold p) => r
r
instance k ~ A_Fold => JoinKinds A_Fold An_Iso k where
joinKinds :: ((Constraints A_Fold p, Constraints An_Iso p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Fold p, Constraints An_Iso p) => r
r = r
(Constraints A_Fold p, Constraints An_Iso p) => r
r
instance k ~ A_Fold => JoinKinds A_Fold A_ReversedPrism k where
joinKinds :: ((Constraints A_Fold p, Constraints A_ReversedPrism p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Fold p, Constraints A_ReversedPrism p) => r
r = r
(Constraints A_Fold p, Constraints A_ReversedPrism p) => r
r
instance k ~ A_Fold => JoinKinds A_Fold A_Prism k where
joinKinds :: ((Constraints A_Fold p, Constraints A_Prism p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Fold p, Constraints A_Prism p) => r
r = r
(Constraints A_Fold p, Constraints A_Prism p) => r
r
instance k ~ A_Fold => JoinKinds A_Fold A_Lens k where
joinKinds :: ((Constraints A_Fold p, Constraints A_Lens p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Fold p, Constraints A_Lens p) => r
r = r
(Constraints A_Fold p, Constraints A_Lens p) => r
r
instance k ~ A_Fold => JoinKinds A_Fold A_Getter k where
joinKinds :: ((Constraints A_Fold p, Constraints A_Getter p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Fold p, Constraints A_Getter p) => r
r = r
(Constraints A_Fold p, Constraints A_Getter p) => r
r
instance k ~ A_Fold => JoinKinds A_Fold An_AffineTraversal k where
joinKinds :: ((Constraints A_Fold p, Constraints An_AffineTraversal p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Fold p, Constraints An_AffineTraversal p) => r
r = r
(Constraints A_Fold p, Constraints An_AffineTraversal p) => r
r
instance k ~ A_Fold => JoinKinds A_Fold An_AffineFold k where
joinKinds :: ((Constraints A_Fold p, Constraints An_AffineFold p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Fold p, Constraints An_AffineFold p) => r
r = r
(Constraints A_Fold p, Constraints An_AffineFold p) => r
r
instance k ~ A_Fold => JoinKinds A_Fold A_Traversal k where
joinKinds :: ((Constraints A_Fold p, Constraints A_Traversal p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Fold p, Constraints A_Traversal p) => r
r = r
(Constraints A_Fold p, Constraints A_Traversal p) => r
r
instance k ~ A_Setter => JoinKinds A_Setter A_Setter k where
joinKinds :: ((Constraints A_Setter p, Constraints A_Setter p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Setter p, Constraints A_Setter p) => r
r = r
(Constraints A_Setter p, Constraints A_Setter p) => r
r
instance k ~ A_Setter => JoinKinds A_Setter An_Iso k where
joinKinds :: ((Constraints A_Setter p, Constraints An_Iso p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Setter p, Constraints An_Iso p) => r
r = r
(Constraints A_Setter p, Constraints An_Iso p) => r
r
instance k ~ A_Setter => JoinKinds A_Setter A_Prism k where
joinKinds :: ((Constraints A_Setter p, Constraints A_Prism p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Setter p, Constraints A_Prism p) => r
r = r
(Constraints A_Setter p, Constraints A_Prism p) => r
r
instance k ~ A_Setter => JoinKinds A_Setter A_Lens k where
joinKinds :: ((Constraints A_Setter p, Constraints A_Lens p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Setter p, Constraints A_Lens p) => r
r = r
(Constraints A_Setter p, Constraints A_Lens p) => r
r
instance k ~ A_Setter => JoinKinds A_Setter An_AffineTraversal k where
joinKinds :: ((Constraints A_Setter p, Constraints An_AffineTraversal p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Setter p, Constraints An_AffineTraversal p) => r
r = r
(Constraints A_Setter p, Constraints An_AffineTraversal p) => r
r
instance k ~ A_Setter => JoinKinds A_Setter A_Traversal k where
joinKinds :: ((Constraints A_Setter p, Constraints A_Traversal p) => r)
-> Constraints k p => r
joinKinds (Constraints A_Setter p, Constraints A_Traversal p) => r
r = r
(Constraints A_Setter p, Constraints A_Traversal p) => r
r
instance {-# OVERLAPPABLE #-}
( JoinKinds k l m
, TypeError ('ShowType k ':<>: 'Text " cannot be composed with " ':<>: 'ShowType l)
) => JoinKinds k l m where
joinKinds :: ((Constraints k p, Constraints l p) => r) -> Constraints m p => r
joinKinds (Constraints k p, Constraints l p) => r
_ = [Char] -> r
forall a. HasCallStack => [Char] -> a
error [Char]
"unreachable"