A list of index types, used for indexed optics.
Moduleoptics-core-0.4.2Haskell2010
Optics.Internal.Optic.TypeLevel
This module is intended for internal use only, and may change without warning in subsequent releases.
- 4 types
- 3 classes
- Packageoptics-core-0.4.2
- Exports24
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceTypeLevel.hs
An alias for an empty index-list
Singleton index list
Equations
ShowSymbolWithOrigin symbol origin = ((('Text" "
':<>: QuoteSymbol symbol) ':<>: 'Text" (from "
) ':<>: 'Text origin) ':<>: 'Text")"
Equations
ShowSymbolsWithOrigin '['(symbol, origin)] = ShowSymbolWithOrigin symbol originShowSymbolsWithOrigin ('(symbol, origin) ': rest) = ShowSymbolWithOrigin symbol origin ':$$: ShowSymbolsWithOrigin rest
Equations
ShowOperators '[op] = QuoteSymbol op ':<>: 'Text" (from Optics.Operators)"
ShowOperators (op ': rest) = (QuoteSymbol op ':<>: 'Text" "
) ':<>: ShowOperators rest
Equations
AppendEliminations '(fs1, ops1) '(fs2, ops2) = '(Append fs1 fs2, Append ops1 ops2)
Equations
ShowEliminations '(fs, ops) = ShowSymbolsWithOrigin fs ':$$: ('Text" "
':<>: ShowOperators ops)
Class that is inhabited by all type-level lists xs, providing the ability
to compose a function under Curry xs.
Instances2CurryCompose
CurryCompose '[]Defined in optics-core-0.4.2 · Optics.Internal.Optic.TypeLevelCurryCompose xs => CurryCompose (x ': xs)Defined in optics-core-0.4.2 · Optics.Internal.Optic.TypeLevel
In pseudo (dependent-)Haskell, provide a witness
foldr f (foldr f init xs) ys = foldr f init (ys ++ xs)
where f = (->)
Methods
appendIndices :: IxEq i (Curry xs (Curry ys i)) (Curry ks i)
Instances3AppendIndices
xs ~ zs => AppendIndices xs '[] zsDefined in optics-core-0.4.2 · Optics.Internal.Optic.TypeLevelIf the second list is empty, we can pick the first list even if nothing is known about it.
ys ~ zs => AppendIndices '[] ys zsDefined in optics-core-0.4.2 · Optics.Internal.Optic.TypeLevelAppendIndices xs ys ks => AppendIndices (x ': xs) ys (x ': ks)Defined in optics-core-0.4.2 · Optics.Internal.Optic.TypeLevel
If lhs is Right', return it. Otherwise check rhs.
Equations
FirstRight ('Right a) _1 = 'Right aFirstRight _1 b = b
Derive the shape of a from the shape of b.
Instances2HasShapeOf
a ~ b => HasShapeOf a bDefined in optics-core-0.4.2 · Optics.Internal.Optic.TypeLevel(fa ~ f a, HasShapeOf f g) => HasShapeOf fa (g b)Defined in optics-core-0.4.2 · Optics.Internal.Optic.TypeLevel