{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeInType #-}
{-# OPTIONS_HADDOCK not-home #-}
module Optics.Internal.Optic.Types where
import Data.Kind (Constraint, Type)
import Data.Profunctor.Indexed
import Optics.Internal.Bi
type OpticKind = Type
data An_Iso :: OpticKind
data A_Lens :: OpticKind
data A_Prism :: OpticKind
data An_AffineTraversal :: OpticKind
data A_Traversal :: OpticKind
data A_Setter :: OpticKind
data A_ReversedPrism :: OpticKind
data A_Getter :: OpticKind
data An_AffineFold :: OpticKind
data A_Fold :: OpticKind
data A_ReversedLens :: OpticKind
data A_Review :: OpticKind
type family Constraints (k :: OpticKind) (p :: Type -> Type -> Type -> Type) :: Constraint where
Constraints An_Iso p = Profunctor p
Constraints A_Lens p = Strong p
Constraints A_ReversedLens p = Costrong p
Constraints A_Prism p = Choice p
Constraints A_ReversedPrism p = Cochoice p
Constraints An_AffineTraversal p = Visiting p
Constraints A_Traversal p = Traversing p
Constraints A_Setter p = Mapping p
Constraints A_Getter p = (Bicontravariant p, Cochoice p, Strong p)
Constraints An_AffineFold p = (Bicontravariant p, Cochoice p, Visiting p)
Constraints A_Fold p = (Bicontravariant p, Cochoice p, Traversing p)
Constraints A_Review p = (Bifunctor p, Choice p, Costrong p)