Create Simple
function
This commit is contained in:
parent
b1ad4ceef0
commit
fd4eb7dd00
|
@ -15,7 +15,7 @@ Equality s t a b = forall p. IsEquality p => p a b -> p s t
|
|||
|
||||
public export
|
||||
0 Equality' : k -> k -> Type
|
||||
Equality' s a = Equality s s a a
|
||||
Equality' = Simple Equality
|
||||
|
||||
|
||||
public export
|
||||
|
|
|
@ -21,7 +21,7 @@ getterToLens @{MkIsGetter _} = MkIsLens %search
|
|||
|
||||
public export
|
||||
0 Getter : (s,a : Type) -> Type
|
||||
Getter s a = Optic IsGetter s s a a
|
||||
Getter = Simple (Optic IsGetter)
|
||||
|
||||
|
||||
public export
|
||||
|
|
|
@ -23,7 +23,7 @@ Iso = Optic IsIso
|
|||
|
||||
public export
|
||||
0 Iso' : (s,a : Type) -> Type
|
||||
Iso' s a = Iso s s a a
|
||||
Iso' = Simple Iso
|
||||
|
||||
|
||||
public export
|
||||
|
|
|
@ -25,7 +25,7 @@ Lens = Optic IsLens
|
|||
|
||||
public export
|
||||
0 Lens' : (s,a : Type) -> Type
|
||||
Lens' s a = Lens s s a a
|
||||
Lens' = Simple Lens
|
||||
|
||||
|
||||
public export
|
||||
|
|
|
@ -5,6 +5,11 @@ import Data.Profunctor
|
|||
%default total
|
||||
|
||||
|
||||
public export
|
||||
Simple : (k -> k -> k' -> k' -> r) -> k -> k' -> r
|
||||
Simple f s a = f s s a a
|
||||
|
||||
|
||||
public export
|
||||
Optic' : (p : Type -> Type -> Type) -> (s,t,a,b : Type) -> Type
|
||||
Optic' p s t a b = p a b -> p s t
|
||||
|
|
|
@ -27,7 +27,7 @@ Optional = Optic IsOptional
|
|||
|
||||
public export
|
||||
0 Optional' : (s,a : Type) -> Type
|
||||
Optional' s a = Optional s s a a
|
||||
Optional' = Simple Optional
|
||||
|
||||
|
||||
public export
|
||||
|
|
|
@ -26,7 +26,7 @@ optFoldToGetter @{MkIsOptFold _} = MkIsGetter %search
|
|||
|
||||
public export
|
||||
0 OptionalFold : (s,a : Type) -> Type
|
||||
OptionalFold s a = Optic IsOptFold s s a a
|
||||
OptionalFold = Simple (Optic IsOptFold)
|
||||
|
||||
|
||||
public export
|
||||
|
|
|
@ -23,7 +23,7 @@ Prism = Optic IsPrism
|
|||
|
||||
public export
|
||||
0 Prism' : (s,a : Type) -> Type
|
||||
Prism' s a = Prism s s a a
|
||||
Prism' = Simple Prism
|
||||
|
||||
|
||||
public export
|
||||
|
|
|
@ -28,7 +28,7 @@ Setter = Optic IsSetter
|
|||
|
||||
public export
|
||||
0 Setter' : (s,a : Type) -> Type
|
||||
Setter' s a = Optic IsSetter s s a a
|
||||
Setter' = Simple Setter
|
||||
|
||||
|
||||
public export
|
||||
|
|
|
@ -27,7 +27,7 @@ Traversal = Optic IsTraversal
|
|||
|
||||
public export
|
||||
0 Traversal' : (s,a : Type) -> Type
|
||||
Traversal' s a = Traversal s s a a
|
||||
Traversal' = Simple Traversal
|
||||
|
||||
|
||||
public export
|
||||
|
|
Loading…
Reference in a new issue