Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

haddocks: misc

  • Loading branch information...
commit 9eaef5cfefc6a661305944da62efe25a9770c0ab 1 parent 405d3e6
@basdirks basdirks authored
View
2  src/Control/Lens/Internal.hs
@@ -1260,7 +1260,7 @@ instance Traversable (Level i) where
newtype Deepening i a = Deepening { runDeepening :: forall r. Int -> (Level i a -> Bool -> r) -> r }
--- | This is an illegal 'Monoid'
+-- | This is an illegal 'Monoid'.
instance Monoid (Deepening i a) where
mempty = Deepening $ \ _ k -> k Zero False
{-# INLINE mempty #-}
View
12 src/Control/Lens/Traversal.hs
@@ -24,8 +24,8 @@
-- Portability : Rank2Types
--
-- A @'Traversal' s t a b@ is a generalization of 'traverse' from
--- 'Traversable'. It allows you to traverse over a structure and change out
--- its contents with monadic or applicative side-effects. Starting from
+-- 'Traversable'. It allows you to 'traverse' over a structure and change out
+-- its contents with monadic or 'Applicative' side-effects. Starting from
--
-- @'traverse' :: ('Traversable' t, 'Applicative' f) => (a -> f b) -> t a -> f (t b)@
--
@@ -306,7 +306,7 @@ transposeOf l = getZipList #. l ZipList
--
-- @'mapAccumR' ≡ 'mapAccumROf' 'traverse'@
--
--- 'mapAccumROf' accumulates state from right to left.
+-- 'mapAccumROf' accumulates 'State' from right to left.
--
-- @
-- 'mapAccumROf' :: 'Iso' s t a b -> (acc -> a -> (acc, b)) -> acc -> s -> (acc, t)
@@ -323,7 +323,7 @@ mapAccumROf = mapAccumLOf . backwards
--
-- @'mapAccumL' ≡ 'mapAccumLOf' 'traverse'@
--
--- 'mapAccumLOf' accumulates state from left to right.
+-- 'mapAccumLOf' accumulates 'State' from left to right.
--
-- @
-- 'mapAccumLOf' :: 'Iso' s t a b -> (acc -> a -> (acc, b)) -> acc -> s -> (acc, t)
@@ -670,7 +670,7 @@ taking n l pafb = tabulate $ \s -> do
-- >>> ("hello","world") ^? dropping 1 both
-- Just "world"
--
--- Dropping works on infinite traversals as well:
+-- Dropping works on infinite 'Traversal's as well:
--
-- >>> [1..] ^? dropping 1 folded
-- Just 2
@@ -704,7 +704,7 @@ dropping n l pafb s = snd $ runIndexing (l paifb s) 0 where
--
-- Cloning a 'Traversal' is one way to make sure you aren't given
-- something weaker, such as a 'Fold' and can be
--- used as a way to pass around traversals that have to be monomorphic in @f@.
+-- used as a way to pass around 'Traversal's that have to be monomorphic in @f@.
--
-- Note: This only accepts a proper 'Traversal' (or 'Lens'). To clone a 'Lens'
-- as such, use 'Control.Lens.Lens.cloneLens'.
View
12 src/Control/Lens/Type.hs
@@ -76,7 +76,7 @@ import Data.Profunctor
-- <http://comonad.com/reader/2012/mirrored-lenses/>.
--
-- With great power comes great responsibility and a 'Lens' is subject to the
--- three common sense lens laws:
+-- three common sense 'Lens' laws:
--
-- 1) You get back what you put in:
--
@@ -161,7 +161,7 @@ type Traversal s t a b = forall f. Applicative f => (a -> f b) -> s -> f t
-- | @type 'Traversal'' = 'Simple' 'Traversal'@
type Traversal' s a = Traversal s s a a
--- | Every IndexedTraversal is a valid 'Control.Lens.Traversal.Traversal' or
+-- | Every 'IndexedTraversal' is a valid 'Control.Lens.Traversal.Traversal' or
-- 'Control.Lens.Fold.IndexedFold'.
--
-- The 'Indexed' constraint is used to allow an 'IndexedTraversal' to be used
@@ -197,7 +197,7 @@ type IndexPreservingTraversal' s a = IndexPreservingTraversal s s a a
-- 'Control.Lens.Setter.over' l f '.' 'Control.Lens.Setter.over' l g ≡ 'Control.Lens.Setter.over' l (f '.' g)
-- @
--
--- These an be stated more directly:
+-- These can be stated more directly:
--
-- @
-- l 'pure' ≡ 'pure'
@@ -355,7 +355,7 @@ type Prism' s a = Prism s s a a
-- Note: Composition with an 'Equality' is index-preserving.
type Equality s t a b = forall p (f :: * -> *). p a (f b) -> p s (f t)
--- | A 'Simple' 'Equality'
+-- | A 'Simple' 'Equality'.
type Equality' s a = Equality s s a a
-------------------------------------------------------------------------------
@@ -498,10 +498,10 @@ type LensLike f s t a b = (a -> f b) -> s -> f t
-- | @type 'LensLike'' f = 'Simple' ('LensLike' f)@
type LensLike' f s a = LensLike f s s a a
--- | Convenient alias for constructing indexed lenses and their ilk.
+-- | Convenient alias for constructing 'IndexedLens'es and their ilk.
type IndexedLensLike i f s t a b = forall p. Indexable i p => p a (f b) -> s -> f t
--- | Convenient alias for constructing simple indexed lenses and their ilk.
+-- | Convenient alias for constructing simple 'IndexedLens'es and their ilk.
type IndexedLensLike' i f s a = IndexedLensLike i f s s a a
type Lensing p f s t a b = p a (f b) -> s -> f t
View
2  src/Control/Lens/Zipper/Internal.hs
@@ -464,7 +464,7 @@ moveToward i z@(Zipper h _ _ p0 j s0)
-- | Move horizontally to a particular index @i@ in the current
-- 'Traversal'. In the case of simple 'Zipper's, the index is 'Int' and
--- we can move between 'Traversal's fairly easily:
+-- we can move between 'Control.Lens.Type.Traversal's fairly easily:
--
-- >>> zipper (42, 32) & fromWithin both & moveTo 0 <&> view focus
-- 42
Please sign in to comment.
Something went wrong with that request. Please try again.