Add export declaration to fixities

This commit is contained in:
Kiana Sheibani 2024-06-29 01:42:08 -04:00
parent 6d7153496d
commit 60231f4a2b
Signed by: toki
GPG key ID: 6CB106C25E86A9F7
8 changed files with 16 additions and 28 deletions

View file

@ -287,7 +287,7 @@ public export
preview : Fold s a -> s -> Maybe a
preview = firstOf
infixl 8 ^?
export infixl 8 ^?, ^@?, ^., ^@.
||| Access the first focus value of an optic, returning `Nothing` if there are
||| no focuses.
@ -306,8 +306,6 @@ public export
ipreview : IndexedFold i s a -> s -> Maybe (i, a)
ipreview = ifirstOf
infixl 8 ^@?
||| Access the first focus value and index of an indexed optic, returning Nothing
||| if there are no focuses.
|||
@ -338,8 +336,6 @@ public export
toListOf : Fold s a -> s -> List a
toListOf l = foldrOf l (::) []
infixl 8 ^..
||| Return a list of all focuses of a fold.
|||
||| This is the operator form of `toListOf`.
@ -353,8 +349,6 @@ public export
itoListOf : IndexedFold i s a -> s -> List (i, a)
itoListOf l = ifoldrOf l ((::) .: (,)) []
infixl 8 ^@..
||| Return a list of all focuses and indices of an indexed fold.
|||
||| This is the operator form of `itoListOf`.

View file

@ -85,7 +85,7 @@ iview : IndexedGetter i s a -> s -> (i, a)
iview l = runForget $ l @{%search} @{Idxed} $ MkForget id
infixl 8 ^., ^@.
export infixl 8 ^., ^@.
||| Access the focus value of an optic, particularly a `Getter`.
|||

View file

@ -93,7 +93,7 @@ icompose @{MkIsIso _} f l l' @{ind} =
l @{Idxed} . runIndexed . l' @{Idxed} . MkIndexed {p}
. lmap (mapFst (uncurry f) . assocl) . indexed @{ind}
infixr 9 <.>, .>, <.
export infixr 9 <.>, .>, <.
||| Compose two indexed optics, returning an optic indexed by a pair of indices.
|||

View file

@ -139,15 +139,15 @@ fusing @{MkIsIso _} l = proextract . l . propure
-- Operators
------------------------------------------------------------------------------
infixr 4 %%~, %%=, %%@~, %%@=
export infixr 4 %%~, %%=, %%@~, %%@=
infixr 4 <%~, <%@~, <+~, <*~, <-~, </~, <||~, <&&~, <<+>~
infixr 4 <<%~, <<%@~, <<.~, <<?~, <<+~, <<*~, <<-~, <</~, <<||~, <<&&~, <<<+>~
export infixr 4 <%~, <%@~, <+~, <*~, <-~, </~, <||~, <&&~, <<+>~
export infixr 4 <<%~, <<%@~, <<.~, <<?~, <<+~, <<*~, <<-~, <</~, <<||~, <<&&~, <<<+>~
infix 4 <%=, <%@=, <+=, <*=, <-=, </=, <||=, <&&=, <<+>=
infix 4 <<%=, <<%@=, <<.=, <<?=, <<+=, <<*=, <<-=, <</=, <<||=, <<&&=, <<<+>=
export infix 4 <%=, <%@=, <+=, <*=, <-=, </=, <||=, <&&=, <<+>=
export infix 4 <<%=, <<%@=, <<.=, <<?=, <<+=, <<*=, <<-=, <</=, <<||=, <<&&=, <<<+>=
infixr 1 <<<~
export infixr 1 <<<~
public export

View file

@ -66,7 +66,7 @@ public export
review : Review s a -> a -> s
review l = reviews l id
infixr 8 ^$
export infixr 8 ^$
||| Turn an optic around to inject a focus value into the larger data structure.
||| This function takes a `Review`, which can also be a `Prism` or `Iso`.

View file

@ -91,7 +91,7 @@ public export
over : Setter s t a b -> (a -> b) -> s -> t
over l = l @{MkIsSetter Function}
infixr 4 %~
export infixr 4 %~, %@~, .~, .@~
||| Modify the focus or focuses of an optic.
|||
@ -106,8 +106,6 @@ public export
iover : IndexedSetter i s t a b -> (i -> a -> b) -> s -> t
iover l = l @{MkIsSetter Function} @{Idxed} . uncurry
infixr 4 %@~
||| Modify the focus or focuses of an indexed optic, having access to the index.
|||
||| This is the operator form of `iover`.
@ -121,8 +119,6 @@ public export
set : Setter s t a b -> b -> s -> t
set l = over l . const
infixr 4 .~
||| Set the focus or focuses of an optic to a constant value.
|||
||| This is the operator form of `set`.
@ -136,8 +132,6 @@ public export
iset : IndexedSetter i s t a b -> (i -> b) -> s -> t
iset l = iover l . (const .)
infix 4 .@~
||| Set the focus or focuses of an indexed optic, having access to the index.
|||
||| This is the operator form of `iset`.
@ -150,9 +144,9 @@ public export
-- More operators
------------------------------------------------------------------------------
infixr 4 ?~, <.~, <?~, +~, *~, -~, /~, ||~, &&~, <+>~
infix 4 %=, %@=, .=, .@=, ?=, <.=, <?=, +=, *=, -=, //=, ||=, &&=, <+>=
infix 1 <~, <<~
export infixr 4 ?~, <.~, <?~, +~, *~, -~, /~, ||~, &&~, <+>~
export infix 4 %=, %@=, .=, .@=, ?=, <.=, <?=, +=, *=, -=, //=, ||=, &&=, <+>=
export infix 1 <~, <<~
||| Set the focus of an optic to `Just` a value.
public export

View file

@ -27,7 +27,7 @@ fromPointer k x (l, r) = l <>> (k,x) :: r
------------------------------------------------------------------------------
infix 9 @>
export infix 9 @>
||| A simple type that represents a layer of the zipper as it moves downwards.
|||

View file

@ -19,7 +19,7 @@ Just_ = prism Just $ \case
Nothing => Left Nothing
Just x => Right x
infixl 9 .?
export infixl 9 .?
||| The composition `l .? l'` is equivalent to `l . Just_ . l'`.
||| Useful for optics whose focus type is a `Maybe`, such as `at`.