/
Operators.hs
111 lines (99 loc) · 2.35 KB
/
Operators.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
-----------------------------------------------------------------------------
-- |
-- Module : Control.Lens.Operators
-- Copyright : (C) 2012-13 Edward Kmett
-- License : BSD-style (see the file LICENSE)
-- Maintainer : Edward Kmett <ekmett@gmail.com>
-- Stability : experimental
-- Portability : non-portable
--
-- This module exists for users who like to work with qualified imports
-- but want access to the operators from Lens.
--
-- > import qualified Control.Lens as L
-- > import Control.Lens.Operators
----------------------------------------------------------------------------
module Control.Lens.Operators
(
-- * General Purpose
(&), (<&>), (??)
-- * Getting
, (^.), (^@.)
-- ** Loupes
, (^#)
-- ** with Effects
, (^!), (^@!)
, (^!!), (^@!!)
, (^!?), (^@!?)
-- ** from Folds
, (^..), (^@..)
, (^?), (^@?)
, (^?!), (^@?!)
-- * Reviewing
, ( # )
-- * Common Operators
-- ** Setting
, (.~) , (.=)
, (<.~), (<.=)
, (<<.~), (<<.=)
--- *** Loupes
, ( #~ ), ( #= )
, (<#~), (<#=)
-- *** Just
, (?~), (?=)
, (<?~), (<?=)
-- ** Modifying
, (%~), (%=)
, (<%~), (<%=)
, (<<%~), (<<%=)
-- *** Loupes
, ( #%~ ), ( #%= )
, (<#%~), (<#%=)
-- *** with Indices
, (%@~), (%@=)
, (<%@~), (<%@=)
, (<<%@~), (<<%@=)
-- ** Traversing
, (%%~), (%%=)
--- *** Loupes
, ( #%%~ ), ( #%%= )
--- *** with Indices
, (%%@~), (%%@=)
-- ** Addition
, (+~), (+=), (<+~), (<+=)
-- ** Subtraction
, (-~), (-=), (<-~), (<-=)
-- ** Multiplication
, (*~), (*=), (<*~), (<*=)
-- ** Division
, (//~), (//=), (<//~), (<//=)
-- ** Exponentiation
, (^~), (^=), (<^~), (<^=)
, (^^~), (^^=), (<^^~), (<^^=)
, (**~), (**=), (<**~), (<**=)
-- ** Logical Or
, (||~), (||=), (<||~), (<||=)
-- ** Logical And
, (&&~), (&&=), (<&&~), (<&&=)
-- ** Monoidal
, (<>~), (<>=), (<<>~), (<<>=)
-- * Composing Indices
, (<.>), (<.), (.>)
-- * Monadic Assignment
, (<~), (<<~)
-- * Zippers
, (:>)(), (:>>)()
-- * Cons and Snoc
, (<|), (|>)
) where
import Control.Lens.Action
import Control.Lens.Combinators
import Control.Lens.Cons
import Control.Lens.Fold
import Control.Lens.Getter
import Control.Lens.Indexed
import Control.Lens.Lens
import Control.Lens.Review
import Control.Lens.Setter
import Control.Lens.Zipper
{-# ANN module "HLint: ignore Use import/export shortcut" #-}