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