Permalink
Browse files

Docfix: More doc type fixes

  • Loading branch information...
1 parent 2fafabc commit 7dd734e4665ebfd46a598aebc4a9ae0d0631e617 @glguy glguy committed Feb 12, 2013
Showing with 27 additions and 27 deletions.
  1. +16 −16 src/Control/Lens/Lens.hs
  2. +2 −2 src/Control/Lens/Traversal.hs
  3. +1 −1 src/Control/Lens/Tuple.hs
  4. +1 −1 src/Control/Lens/Type.hs
  5. +7 −7 src/Control/Lens/Zoom.hs
View
@@ -449,8 +449,8 @@ l <-~ a = l <%~ subtract a
-- flexible.
--
-- @
--- ('<*~') :: 'Num' a => 'Lens'' s a -> a -> a -> (s, a)
--- ('<*~') :: 'Num' a => 'Control.Lens.Iso.Iso'' s a -> a -> a -> (s, a)
+-- ('<*~') :: 'Num' a => 'Lens'' s a -> a -> s -> (a, s)
+-- ('<*~') :: 'Num' a => 'Control.Lens.Iso.Iso'' s a -> a -> s -> (a, s)
-- @
(<*~) :: Num a => Overloading (->) q ((,)a) s t a a -> a -> q s (a, t)
l <*~ a = l <%~ (* a)
@@ -461,8 +461,8 @@ l <*~ a = l <%~ (* a)
-- When you do not need the result of the division, ('Control.Lens.Setter.//~') is more flexible.
--
-- @
--- ('<//~') :: 'Fractional' a => 'Lens'' s a -> a -> a -> (s, a)
--- ('<//~') :: 'Fractional' a => 'Control.Lens.Iso.Iso'' s a -> a -> a -> (s, a)
+-- ('<//~') :: 'Fractional' a => 'Lens'' s a -> a -> s -> (a, s)
+-- ('<//~') :: 'Fractional' a => 'Control.Lens.Iso.Iso'' s a -> a -> s -> (a, s)
-- @
(<//~) :: Fractional a => Overloading (->) q ((,)a) s t a a -> a -> q s (a, t)
l <//~ a = l <%~ (/ a)
@@ -474,8 +474,8 @@ l <//~ a = l <%~ (/ a)
-- When you do not need the result of the division, ('Control.Lens.Setter.^~') is more flexible.
--
-- @
--- ('<^~') :: ('Num' a, 'Integral' e) => 'Lens'' s a -> e -> a -> (a, s)
--- ('<^~') :: ('Num' a, 'Integral' e) => 'Control.Lens.Iso.Iso'' s a -> e -> a -> (a, s)
+-- ('<^~') :: ('Num' a, 'Integral' e) => 'Lens'' s a -> e -> s -> (a, s)
+-- ('<^~') :: ('Num' a, 'Integral' e) => 'Control.Lens.Iso.Iso'' s a -> e -> s -> (a, s)
-- @
(<^~) :: (Num a, Integral e) => Overloading (->) q ((,)a) s t a a -> e -> q s (a, t)
l <^~ e = l <%~ (^ e)
@@ -487,8 +487,8 @@ l <^~ e = l <%~ (^ e)
-- When you do not need the result of the division, ('Control.Lens.Setter.^^~') is more flexible.
--
-- @
--- ('<^^~') :: ('Fractional' a, 'Integral' e) => 'Lens'' s a -> e -> a -> (a, s)
--- ('<^^~') :: ('Fractional' a, 'Integral' e) => 'Control.Lens.Iso.Iso'' s a -> e -> a -> (a, s)
+-- ('<^^~') :: ('Fractional' a, 'Integral' e) => 'Lens'' s a -> e -> s -> (a, s)
+-- ('<^^~') :: ('Fractional' a, 'Integral' e) => 'Control.Lens.Iso.Iso'' s a -> e -> s -> (a, s)
-- @
(<^^~) :: (Fractional a, Integral e) => Overloading (->) q ((,)a) s t a a -> e -> q s (a, t)
l <^^~ e = l <%~ (^^ e)
@@ -536,9 +536,9 @@ l <&&~ b = l <%~ (&& b)
-- When you do not need the result of the addition, ('Control.Lens.Setter.%~') is more flexible.
--
-- @
--- ('<<%~') :: 'Lens' s t a b -> (a -> b) -> s -> (b, t)
--- ('<<%~') :: 'Control.Lens.Iso.Iso' s t a b -> (a -> b) -> s -> (b, t)
--- ('<<%~') :: 'Monoid' b => 'Control.Lens.Traversal.Traversal' s t a b -> (a -> b) -> s -> (b, t)
+-- ('<<%~') :: 'Lens' s t a b -> (a -> b) -> s -> (a, t)
+-- ('<<%~') :: 'Control.Lens.Iso.Iso' s t a b -> (a -> b) -> s -> (a, t)
+-- ('<<%~') :: 'Monoid' a => 'Control.Lens.Traversal.Traversal' s t a b -> (a -> b) -> s -> (a, t)
-- @
(<<%~) :: Strong p => Overloading p q ((,)a) s t a b -> p a b -> q s (a, t)
(<<%~) l = l . lmap (\a -> (a, a)) . second'
@@ -549,9 +549,9 @@ l <&&~ b = l <%~ (&& b)
-- When you do not need the old value, ('Control.Lens.Setter.%~') is more flexible.
--
-- @
--- ('<<%~') :: 'Lens' s t a b -> b -> s -> (a, t)
--- ('<<%~') :: 'Control.Lens.Iso.Iso' s t a b -> b -> s -> (a, t)
--- ('<<%~') :: 'Monoid' b => 'Control.Lens.Traversal.Traversal' s t a b -> b -> s -> (a, t)
+-- ('<<.~') :: 'Lens' s t a b -> b -> s -> (a, t)
+-- ('<<.~') :: 'Control.Lens.Iso.Iso' s t a b -> b -> s -> (a, t)
+-- ('<<.~') :: 'Monoid' a => 'Control.Lens.Traversal.Traversal' s t a b -> b -> s -> (a, t)
-- @
(<<.~) :: Overloading (->) q ((,)a) s t a b -> b -> q s (a, t)
l <<.~ b = l $ \a -> (a, b)
@@ -795,7 +795,7 @@ l <%@~ f = l (Indexed $ \i a -> let b = f i a in (b, b))
--
-- @
-- ('<<%@~') :: 'IndexedLens' i s t a b -> (i -> a -> b) -> s -> (a, t)
--- ('<<%@~') :: 'Monoid' b => 'Control.Lens.Traversal.IndexedTraversal' i s t a b -> (i -> a -> b) -> s -> (a, t)
+-- ('<<%@~') :: 'Monoid' a => 'Control.Lens.Traversal.IndexedTraversal' i s t a b -> (i -> a -> b) -> s -> (a, t)
-- @
(<<%@~) :: Overloading (Indexed i) q ((,) a) s t a b -> (i -> a -> b) -> q s (a, t)
l <<%@~ f = l $ Indexed $ \i a -> second' (f i) (a,a)
@@ -810,7 +810,7 @@ l <<%@~ f = l $ Indexed $ \i a -> second' (f i) (a,a)
--
-- @
-- ('%%@~') :: 'Functor' f => 'IndexedLens' i s t a b -> (i -> a -> f b) -> s -> f t
--- ('%%@~') :: 'Functor' f => 'Control.Lens.Traversal.IndexedTraversal' i s t a b -> (i -> a -> f b) -> s -> f t
+-- ('%%@~') :: 'Applicative' f => 'Control.Lens.Traversal.IndexedTraversal' i s t a b -> (i -> a -> f b) -> s -> f t
-- @
--
-- In particular, it is often useful to think of this function as having one of these even more
@@ -649,7 +649,7 @@ both f ~(a,a') = (,) <$> f a <*> f a'
-- 'beside' :: 'Traversal' s t a b -> 'Traversal' s' t' a b -> 'Traversal' (s,s') (t,t') a b
-- 'beside' :: 'Lens' s t a b -> 'Lens' s' t' a b -> 'Traversal' (s,s') (t,t') a b
-- 'beside' :: 'Fold' s a -> 'Fold' s' a -> 'Fold' (s,s') a
--- 'beside' :: 'Getter' s a -> 'Getter' s' a -> 'Traversal'' (s,s') a
+-- 'beside' :: 'Getter' s a -> 'Getter' s' a -> 'Fold' (s,s') a
-- 'beside' :: 'Action' m s a -> 'Action' m s' a -> 'MonadicFold' m (s,s') a
-- 'beside' :: 'MonadicFold' m s a -> 'MonadicFold' m s' a -> 'MonadicFold' m (s,s') a
-- @
@@ -658,7 +658,7 @@ both f ~(a,a') = (,) <$> f a <*> f a'
-- 'beside' :: 'IndexedTraversal' i s t a b -> 'IndexedTraversal' i s' t' a b -> 'IndexedTraversal' i (s,s') (t,t') a b
-- 'beside' :: 'IndexedLens' i s t a b -> 'IndexedLens' i s' t' a b -> 'IndexedTraversal' i (s,s') (t,t') a b
-- 'beside' :: 'IndexedFold' i s a -> 'IndexedFold' i s' a -> 'IndexedFold' i (s,s') a
--- 'beside' :: 'IndexedGetter' i s a -> 'IndexedGetter' i s' a -> 'IndexedTraversal'' i (s,s') a
+-- 'beside' :: 'IndexedGetter' i s a -> 'IndexedGetter' i s' a -> 'IndexedFold' i (s,s') a
-- 'beside' :: 'IndexedAction' i m s a -> 'IndexedAction' i m s' a -> 'IndexedMonadicFold' i m (s,s') a
-- 'beside' :: 'IndexedMonadicFold' i m s a -> 'IndexedMonadicFold' i m s' a -> 'IndexedMonadicFold' i m (s,s') a
-- @
@@ -70,7 +70,7 @@ class Field1 s t a b | s -> a, t -> b, s b -> t, t a -> s where
-- '_1' :: 'Lens' (a,b,c) (a',b,c) a a'
-- '_1' :: 'Lens' (a,b,c,d) (a',b,c,d) a a'
-- ...
- -- '_1' :: 'Lens' (a,c,d,e,f,g,h,i) (a',b,c,d,e,f,g,h,i) a a'
+ -- '_1' :: 'Lens' (a,b,c,d,e,f,g,h,i) (a',b,c,d,e,f,g,h,i) a a'
-- @
_1 :: IndexedLens Int s t a b
View
@@ -498,7 +498,7 @@ type IndexPreservingMonadicFold m s a = forall p f r. (Conjoined p, Effective m
--
-- @
-- 'Data.Complex.Lens._imagPart' :: 'Simple' 'Lens' ('Data.Complex.Complex' a) a
--- 'Control.Lens.Cons._head' :: 'Simple' ('IndexedTraversal' 'Int') [a] a
+-- 'Control.Lens.Traversal.traversed' :: 'Simple' ('IndexedTraversal' 'Int') [a] a
-- @
--
-- Note: To use this alias in your own code with @'LensLike' f@ or
View
@@ -90,10 +90,10 @@ class (Zoomed m ~ Zoomed n, MonadState s m, MonadState t n) => Zoom m n s t | m
-- @
-- 'zoom' :: 'Monad' m => 'Lens'' s t -> 'StateT' t m a -> 'StateT' s m a
-- 'zoom' :: ('Monad' m, 'Monoid' c) => 'Control.Lens.Traversal.Traversal'' s t -> 'StateT' t m c -> 'StateT' s m c
- -- 'zoom' :: 'Monad' m => 'Lens'' s t -> 'RWST' r w t m c -> 'RWST' r w s m c
- -- 'zoom' :: ('Monad' m, 'Monoid' c) => 'Control.Lens.Traversal.Traversal'' s t -> 'RWST' r w t m c -> 'RWST' r w s m c
- -- 'zoom' :: 'Monad' m => 'Lens'' s t -> 'ErrorT' e ('RWST' r w t m) c -> 'ErrorT' e ('RWST' r w s m) c
- -- 'zoom' :: ('Monad' m, 'Monoid' c) => 'Control.Lens.Traversal.Traversal'' s t -> 'ErrorT' e ('RWST' r w t m) c -> 'ErrorT' e ('RWST' r w s m) c
+ -- 'zoom' :: ('Monad' m, 'Monoid' w) => 'Lens'' s t -> 'RWST' r w t m c -> 'RWST' r w s m c
+ -- 'zoom' :: ('Monad' m, 'Monoid' w, 'Monoid' c) => 'Control.Lens.Traversal.Traversal'' s t -> 'RWST' r w t m c -> 'RWST' r w s m c
+ -- 'zoom' :: ('Monad' m, 'Monoid' w, 'Error' e) => 'Lens'' s t -> 'ErrorT' e ('RWST' r w t m) c -> 'ErrorT' e ('RWST' r w s m) c
+ -- 'zoom' :: ('Monad' m, 'Monoid' w, 'Monoid' c, 'Error' e) => 'Control.Lens.Traversal.Traversal'' s t -> 'ErrorT' e ('RWST' r w t m) c -> 'ErrorT' e ('RWST' r w s m) c
-- ...
-- @
zoom :: LensLike' (Zoomed m c) t s -> m c -> n c
@@ -168,12 +168,12 @@ class (Magnified m ~ Magnified n, MonadReader b m, MonadReader a n) => Magnify m
--
-- @
-- 'magnify' :: 'Getter' s a -> (a -> r) -> s -> r
- -- 'magnify' :: 'Fold' s a -> (a -> r) -> s -> r
+ -- 'magnify' :: 'Monoid' r => 'Fold' s a -> (a -> r) -> s -> r
-- @
--
-- @
- -- 'magnify' :: 'Monoid' w => 'Getter' s t -> 'RWS' s w st c -> 'RWS' t w st c
- -- 'magnify' :: ('Monoid' w, 'Monoid' c) => 'Fold' s t -> 'RWS' s w st c -> 'RWS' t w st c
+ -- 'magnify' :: 'Monoid' w => 'Getter' s t -> 'RWS' t w st c -> 'RWS' s w st c
+ -- 'magnify' :: ('Monoid' w, 'Monoid' c) => 'Fold' s a -> 'RWS' a w st c -> 'RWS' s w st c
-- ...
-- @
magnify :: LensLike' (Magnified m c) a b -> m c -> n c

0 comments on commit 7dd734e

Please sign in to comment.