Permalink
Browse files

haddocks: post-"Internalization" clean-up, round 3

  • Loading branch information...
basdirks committed Jan 14, 2013
1 parent dbda09a commit 7a1c95ed974afc3e05eb2d11fbecf6dcaed9f03f
Showing with 10 additions and 15 deletions.
  1. +3 −9 src/Control/Lens/Getter.hs
  2. +4 −3 src/Control/Lens/Internal/Getter.hs
  3. +3 −3 src/Control/Lens/Type.hs
View
@@ -154,7 +154,7 @@ type Accessing p m s t a b = p a (Accessor m b) -> s -> Accessor m t
-- "world"
--
--
--- As @views@ is commonly used to access the target of a 'Getter' or obtain a monoidal summary of the targets of a 'Fold',
+-- As 'view' is commonly used to access the target of a 'Getter' or obtain a monoidal summary of the targets of a 'Fold',
-- It may be useful to think of it as having one of these more restricted signatures:
--
-- @
@@ -183,9 +183,6 @@ view l = Reader.asks (runAccessor #. l Accessor)
-- the targets of a 'Control.Lens.Fold.Fold' or
-- 'Control.Lens.Traversal.Traversal'.
--
--- It may be useful to think of 'views' as having these more restricted
--- signatures:
---
-- @'views' l f ≡ 'view' (l '.' 'to' f)@
--
-- >>> views (to f) g a
@@ -194,7 +191,7 @@ view l = Reader.asks (runAccessor #. l Accessor)
-- >>> views _2 length (1,"hello")
-- 5
--
--- As @views@ is commonly used to access the target of a 'Getter' or obtain a monoidal summary of the targets of a 'Fold',
+-- As 'views' is commonly used to access the target of a 'Getter' or obtain a monoidal summary of the targets of a 'Fold',
-- It may be useful to think of it as having one of these more restricted signatures:
--
-- @
@@ -408,9 +405,6 @@ view' l = Reader.asks (runAccessor #. l Accessor)
-- the targets of a 'Control.Lens.Fold.Fold' or
-- 'Control.Lens.Traversal.Traversal'.
--
--- It may be useful to think of 'perviews' as having these more restricted
--- signatures:
---
-- @'views'' l f ≡ 'view'' (l '.' 'to' f)@
--
-- >>> views' _2 length (1,"hello")
@@ -483,7 +477,7 @@ iuses l = uses l .# Indexed
-- This is the same operation as 'iview' with the arguments flipped.
--
-- The fixity and semantics are such that subsequent field accesses can be
--- performed with ('Prelude..')
+-- performed with ('Prelude..').
--
-- >>> (a,b,c,d)^@._2
-- (1,b)
@@ -32,7 +32,7 @@ import Data.Profunctor.Unsafe
-------------------------------------------------------------------------------
-- | Generalizing 'Const' so we can apply simple 'Applicative'
--- transformations to it and so we can get nicer error messages
+-- transformations to it and so we can get nicer error messages.
--
-- A 'Gettable' 'Functor' ignores its argument, which it carries solely as a
-- phantom type parameter.
@@ -41,7 +41,8 @@ import Data.Profunctor.Unsafe
--
-- @'id' = 'fmap' f = 'coerce'@
--
--- Which is equivalent to making a @'Gettable' f@ an \"anyvariant\" functor.
+-- Which is equivalent to making a @'Gettable' f@ an \"anyvariant\"
+-- 'Functor'.
class Functor f => Gettable f where
-- | Replace the phantom type argument.
@@ -70,7 +71,7 @@ noEffect = coerce $ pure ()
-- | Used instead of 'Const' to report
--
--- @No instance of ('Settable' 'Accessor')@
+-- @No instance for ('Control.Lens.Setter.Internal.Settable' 'Accessor')@
--
-- when the user attempts to misuse a 'Control.Lens.Setter.Setter' as a
-- 'Control.Lens.Getter.Getter', rather than a monolithic unification error.
View
@@ -186,7 +186,7 @@ type IndexPreservingTraversal' s a = IndexPreservingTraversal s s a a
-- Setters
------------------------------------------------------------------------------
--- | The only 'Lens'-like law that can apply to a 'Setter' @l@ is that
+-- | The only 'LensLike' law that can apply to a 'Setter' @l@ is that
--
-- @'Control.Lens.Setter.set' l y ('Control.Lens.Setter.set' l x a) ≡ 'Control.Lens.Setter.set' l y a@
--
@@ -361,7 +361,7 @@ type Equality' s a = Equality s s a a
-------------------------------------------------------------------------------
-- | A 'Getter' describes how to retrieve a single value in a way that can be
--- composed with other 'Lens'-like constructions.
+-- composed with other 'LensLike' constructions.
--
-- Unlike a 'Lens' a 'Getter' is read-only. Since a 'Getter'
-- cannot be used to write back there are no 'Lens' laws that can be applied to
@@ -383,7 +383,7 @@ type IndexPreservingGetter s a = forall p f. (Conjoined p, Gettable f) => p a (f
--------------------------
-- | A 'Fold' describes how to retrieve multiple values in a way that can be composed
--- with other 'Lens'-like constructions.
+-- with other 'LensLike' constructions.
--
-- A @'Fold' s a@ provides a structure with operations very similar to those of the 'Data.Foldable.Foldable'
-- typeclass, see 'Control.Lens.Fold.foldMapOf' and the other 'Fold' combinators.

0 comments on commit 7a1c95e

Please sign in to comment.