on master help sign in
Fix up documentation spacing.
commite6300f128bed6baeda7934b0cccf7b3b61171603 authorWill Jones <will@sacharissa.co.uk> dateSun 30 Jul 2017, 13:26 (9 years ago) parent52d59cc
4 files changed+46−46
src/Data/Generics/Product/Any.hs+13−13 src/Data/Generics/Product/Fields.hs+11−11 src/Data/Generics/Product/Numbered.hs+13−13 src/Data/Generics/Product/Typed.hs+9−9
src/Data/Generics/Product/Any.hs+13−13
@@ -21,9 +21,9 @@
2121-----------------------------------------------------------------------------
2222
2323module Data.Generics.Product.Any
24− ( -- * Lenses
24+ ( -- *Lenses
2525 --
26− -- $example
26+ -- $example
2727 HasAny (..)
2828 ) where
2929
@@ -50,19 +50,19 @@ import Data.Generics.Product.Typed
5050-- human = Human \"Tunyasz\" 50 \"London\"
5151-- @
5252
53−-- | Records that have generic lenses.
53+-- |Records that have generic lenses.
5454class HasAny (sel :: k) a s | s sel k -> a where
55− -- | A lens that focuses on a part of a product as identified by some
56− -- selector. Currently supported selectors are field names, positions and
57− -- unique types. Compatible with the lens package's 'Control.Lens.Lens'
58− -- type.
55+ -- |A lens that focuses on a part of a product as identified by some
56+ -- selector. Currently supported selectors are field names, positions and
57+ -- unique types. Compatible with the lens package's 'Control.Lens.Lens'
58+ -- type.
5959 --
60− -- >>> human ^. its @Int
61− -- 50
62− -- >>> human ^. its @"name"
63− -- "Tunyasz"
64− -- >>> human ^. its @3
65− -- "London"
60+ -- >>> human ^. its @Int
61+ -- 50
62+ -- >>> human ^. its @"name"
63+ -- "Tunyasz"
64+ -- >>> human ^. its @3
65+ -- "London"
6666 its :: Lens' s a
6767
6868instance HasPosition i a s => HasAny i a s where
src/Data/Generics/Product/Fields.hs+11−11
@@ -24,12 +24,12 @@
2424-----------------------------------------------------------------------------
2525
2626module Data.Generics.Product.Fields
27− ( -- * Lenses
27+ ( -- *Lenses
2828 --
29− -- $example
29+ -- $example
3030 HasField (..)
3131
32− -- * Internals
32+ -- *Internals
3333 , GHasField (..)
3434 ) where
3535
@@ -60,13 +60,13 @@ import GHC.TypeLits
6060
6161-- | Records that have a field with a given name.
6262class HasField (field :: Symbol) a s | s field -> a where
63− -- | A lens that focuses on a field with a given name. Compatible with the
64− -- lens package's 'Control.Lens.Lens' type.
63+ -- |A lens that focuses on a field with a given name. Compatible with the
64+ -- lens package's 'Control.Lens.Lens' type.
6565 --
66− -- >>> human ^. field @"age"
67− -- 50
68− -- >>> human & field @"name" .~ "Tamas"
69− -- Human {name = "Tamas", age = 50, address = "London"}
66+ -- >>> human ^. field @"age"
67+ -- 50
68+ -- >>> human & field @"name" .~ "Tamas"
69+ -- Human {name = "Tamas", age = 50, address = "London"}
7070 field :: Lens' s a
7171
7272instance (Generic s,
@@ -91,8 +91,8 @@ type family ErrorUnlessJust (field :: Symbol) (s :: Type) (found :: Maybe Type)
9191 ErrorUnlessJust _ _ ('Just _)
9292 = ()
9393
94−-- | As 'HasField' but over generic representations as defined by
95−-- "GHC.Generics".
94+-- |As 'HasField' but over generic representations as defined by
95+-- "GHC.Generics".
9696class GHasField (field :: Symbol) (f :: Type -> Type) a | field f -> a where
9797 gfield :: Lens' (f x) a
9898
src/Data/Generics/Product/Numbered.hs+13−13
@@ -24,12 +24,12 @@
2424-----------------------------------------------------------------------------
2525
2626module Data.Generics.Product.Numbered
27− ( -- * Lenses
27+ ( -- *Lenses
2828 --
29− -- $example
29+ -- $example
3030 HasPosition (..)
3131
32− -- * Internals
32+ -- *Internals
3333 , GHasPosition (..)
3434 ) where
3535
@@ -57,18 +57,18 @@ import GHC.TypeLits
5757-- human = Human \"Tunyasz\" 50 \"London\"
5858-- @
5959
60−-- | Records that have a field at a given position.
60+-- |Records that have a field at a given position.
6161class HasPosition (i :: Nat) a s | s i -> a where
62− -- | A lens that focuses on a field at a given position. Compatible with the
63− -- lens package's 'Control.Lens.Lens' type.
62+ -- |A lens that focuses on a field at a given position. Compatible with the
63+ -- lens package's 'Control.Lens.Lens' type.
6464 --
65− -- >>> human ^. numbered @1
66− -- "Tunyasz"
67− -- >>> human & numbered @2 .~ "Berlin"
68− -- Human {name = "Tunyasz", age = 50, address = "Berlin"}
65+ -- >>> human ^. numbered @1
66+ -- "Tunyasz"
67+ -- >>> human & numbered @2 .~ "Berlin"
68+ -- Human {name = "Tunyasz", age = 50, address = "Berlin"}
6969 numbered :: Lens' s a
7070
71−-- | The base index from which positions are counted.
71+-- |The base index from which positions are counted.
7272type BaseIndex
7373 = 1
7474
@@ -94,8 +94,8 @@ type family ErrorUnlessTrue (i :: Nat) (s :: Type) (hasP :: Bool) :: Constraint
9494 ErrorUnlessTrue _ _ 'True
9595 = ()
9696
97−-- | As 'HasPosition' but over generic representations as defined by
98−-- "GHC.Generics".
97+-- |As 'HasPosition' but over generic representations as defined by
98+-- "GHC.Generics".
9999class GHasPosition (offset :: Nat) (i :: Nat) (f :: Type -> Type) a | offset i f -> a where
100100 gnumbered :: Lens' (f x) a
101101
src/Data/Generics/Product/Typed.hs+9−9
@@ -24,12 +24,12 @@
2424-----------------------------------------------------------------------------
2525
2626module Data.Generics.Product.Typed
27− ( -- * Lenses
27+ ( -- *Lenses
2828 --
29− -- $example
29+ -- $example
3030 HasType (..)
3131
32− -- * Internals
32+ -- *Internals
3333 , GHasType (..)
3434 ) where
3535
@@ -60,11 +60,11 @@ import GHC.TypeLits
6060
6161-- | Records that have a field with a unique type.
6262class HasType a s where
63− -- | A lens that focuses on a field with a unique type in its parent type.
64− -- Compatible with the lens package's 'Control.Lens.Lens' type.
63+ -- |A lens that focuses on a field with a unique type in its parent type.
64+ -- Compatible with the lens package's 'Control.Lens.Lens' type.
6565 --
66− -- >>> human ^. @typed Int
67− -- 50
66+ -- >>> human ^. @typed Int
67+ -- 50
6868 typed :: Lens' s a
6969
7070instance (Generic s,
@@ -97,8 +97,8 @@ type family ErrorUnlessOne (a :: Type) (s :: Type) (count :: Count) :: Constrain
9797 ErrorUnlessOne _ _ 'One
9898 = ()
9999
100−-- | As 'HasType' but over generic representations as defined by
101−-- "GHC.Generics".
100+-- |As 'HasType' but over generic representations as defined by
101+-- "GHC.Generics".
102102class GHasType (f :: Type -> Type) a where
103103 gtyped :: Lens' (f x) a
104104