@@ -24,12 +24,12 @@
24-----------------------------------------------------------------------------
24-----------------------------------------------------------------------------
26module Data.Generics.Product.Numbered
26module Data.Generics.Product.Numbered
27− ( -- * Lenses
27+ ( -- *Lenses
29− -- $example
29+ -- $example
30 HasPosition (..)
30 HasPosition (..)
32− -- * Internals
32+ -- *Internals
33 , GHasPosition (..)
33 , GHasPosition (..)
@@ -57,18 +57,18 @@ import GHC.TypeLits
57-- human = Human \"Tunyasz\" 50 \"London\"
57-- human = Human \"Tunyasz\" 50 \"London\"
60−-- | Records that have a field at a given position.
60+-- |Records that have a field at a given position.
61class HasPosition (i :: Nat) a s | s i -> a where
61class HasPosition (i :: Nat) a s | s i -> a where
62− -- | A lens that focuses on a field at a given position. Compatible with the
62+ -- |A lens that focuses on a field at a given position. Compatible with the
63− -- lens package's 'Control.Lens.Lens' type.
63+ -- lens package's 'Control.Lens.Lens' type.
65− -- >>> human ^. numbered @1
65+ -- >>> human ^. numbered @1
66− -- "Tunyasz"
66+ -- "Tunyasz"
67− -- >>> human & numbered @2 .~ "Berlin"
67+ -- >>> human & numbered @2 .~ "Berlin"
68− -- Human {name = "Tunyasz", age = 50, address = "Berlin"}
68+ -- Human {name = "Tunyasz", age = 50, address = "Berlin"}
69 numbered :: Lens' s a
69 numbered :: Lens' s a
71−-- | The base index from which positions are counted.
71+-- |The base index from which positions are counted.
72type BaseIndex
72type BaseIndex
@@ -94,8 +94,8 @@ type family ErrorUnlessTrue (i :: Nat) (s :: Type) (hasP :: Bool) :: Constraint
94 ErrorUnlessTrue _ _ 'True
94 ErrorUnlessTrue _ _ 'True
97−-- | As 'HasPosition' but over generic representations as defined by
97+-- |As 'HasPosition' but over generic representations as defined by
98−-- "GHC.Generics".
98+-- "GHC.Generics".
99class GHasPosition (offset :: Nat) (i :: Nat) (f :: Type -> Type) a | offset i f -> a where
99class GHasPosition (offset :: Nat) (i :: Nat) (f :: Type -> Type) a | offset i f -> a where
100 gnumbered :: Lens' (f x) a
100 gnumbered :: Lens' (f x) a