/var/lib/ghc/package.conf.d/lens-4.14.conf is in libghc-lens-dev 4.14-2+b1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | name: lens
version: 4.14
id: lens-4.14-9dVzUyOAXSjIX3UgJ3NnoU
key: lens-4.14-9dVzUyOAXSjIX3UgJ3NnoU
license: BSD3
copyright: Copyright (C) 2012-2016 Edward A. Kmett
maintainer: Edward A. Kmett <ekmett@gmail.com>
stability: provisional
homepage: http://github.com/ekmett/lens/
synopsis: Lenses, Folds and Traversals
description:
This package comes \"Batteries Included\" with many useful lenses for the types
commonly used from the Haskell Platform, and with tools for automatically
generating lenses and isomorphisms for user-supplied data types.
.
The combinators in @Control.Lens@ provide a highly generic toolbox for composing
families of getters, folds, isomorphisms, traversals, setters and lenses and their
indexed variants.
.
An overview, with a large number of examples can be found in the <https://github.com/ekmett/lens#lens-lenses-folds-and-traversals README>.
.
An introductory video on the style of code used in this library by Simon Peyton Jones is available from <http://skillsmatter.com/podcast/scala/lenses-compositional-data-access-and-manipulation Skills Matter>.
.
A video on how to use lenses and how they are constructed is available on <http://youtu.be/cefnmjtAolY?hd=1 youtube>.
.
Slides for that second talk can be obtained from <http://comonad.com/haskell/Lenses-Folds-and-Traversals-NYC.pdf comonad.com>.
.
More information on the care and feeding of lenses, including a brief tutorial and motivation
for their types can be found on the <https://github.com/ekmett/lens/wiki lens wiki>.
.
A small game of @pong@ and other more complex examples that manage their state using lenses can be found in the <https://github.com/ekmett/lens/blob/master/examples/ example folder>.
.
/Lenses, Folds and Traversals/
.
With some signatures simplified, the core of the hierarchy of lens-like constructions looks like:
.
.
<<http://i.imgur.com/ALlbPRa.png>>
.
<Hierarchy.png (Local Copy)>
.
You can compose any two elements of the hierarchy above using @(.)@ from the @Prelude@, and you can
use any element of the hierarchy as any type it linked to above it.
.
The result is their lowest upper bound in the hierarchy (or an error if that bound doesn't exist).
.
For instance:
.
* You can use any 'Traversal' as a 'Fold' or as a 'Setter'.
.
* The composition of a 'Traversal' and a 'Getter' yields a 'Fold'.
.
/Minimizing Dependencies/
.
If you want to provide lenses and traversals for your own types in your own libraries, then you
can do so without incurring a dependency on this (or any other) lens package at all.
.
/e.g./ for a data type:
.
> data Foo a = Foo Int Int a
.
You can define lenses such as
.
> -- bar :: Lens' (Foo a) Int
> bar :: Functor f => (Int -> f Int) -> Foo a -> f (Foo a)
> bar f (Foo a b c) = fmap (\a' -> Foo a' b c) (f a)
.
> -- quux :: Lens (Foo a) (Foo b) a b
> quux :: Functor f => (a -> f b) -> Foo a -> f (Foo b)
> quux f (Foo a b c) = fmap (Foo a b) (f c)
.
without the need to use any type that isn't already defined in the @Prelude@.
.
And you can define a traversal of multiple fields with 'Control.Applicative.Applicative':
.
> -- traverseBarAndBaz :: Traversal' (Foo a) Int
> traverseBarAndBaz :: Applicative f => (Int -> f Int) -> Foo a -> f (Foo a)
> traverseBarAndBaz f (Foo a b c) = Foo <$> f a <*> f b <*> pure c
.
What is provided in this library is a number of stock lenses and traversals for
common haskell types, a wide array of combinators for working them, and more
exotic functionality, (/e.g./ getters, setters, indexed folds, isomorphisms).
category: Data, Lenses, Generics
author: Edward A. Kmett
exposed: True
exposed-modules:
Control.Exception.Lens Control.Lens Control.Lens.At
Control.Lens.Combinators Control.Lens.Cons Control.Lens.Each
Control.Lens.Empty Control.Lens.Equality Control.Lens.Extras
Control.Lens.Fold Control.Lens.Getter Control.Lens.Indexed
Control.Lens.Internal Control.Lens.Internal.Bazaar
Control.Lens.Internal.ByteString Control.Lens.Internal.Coerce
Control.Lens.Internal.Context Control.Lens.Internal.Deque
Control.Lens.Internal.Exception Control.Lens.Internal.FieldTH
Control.Lens.Internal.PrismTH Control.Lens.Internal.Fold
Control.Lens.Internal.Getter Control.Lens.Internal.Indexed
Control.Lens.Internal.Instances Control.Lens.Internal.Iso
Control.Lens.Internal.Level Control.Lens.Internal.List
Control.Lens.Internal.Magma Control.Lens.Internal.Prism
Control.Lens.Internal.Review Control.Lens.Internal.Setter
Control.Lens.Internal.TH Control.Lens.Internal.Zoom
Control.Lens.Iso Control.Lens.Lens Control.Lens.Level
Control.Lens.Operators Control.Lens.Plated Control.Lens.Prism
Control.Lens.Reified Control.Lens.Review Control.Lens.Setter
Control.Lens.TH Control.Lens.Traversal Control.Lens.Tuple
Control.Lens.Type Control.Lens.Wrapped Control.Lens.Zoom
Control.Monad.Error.Lens Control.Parallel.Strategies.Lens
Control.Seq.Lens Data.Array.Lens Data.Bits.Lens
Data.ByteString.Lens Data.ByteString.Strict.Lens
Data.ByteString.Lazy.Lens Data.Complex.Lens Data.Data.Lens
Data.Dynamic.Lens Data.HashSet.Lens Data.IntSet.Lens Data.List.Lens
Data.Map.Lens Data.Sequence.Lens Data.Set.Lens Data.Text.Lens
Data.Text.Strict.Lens Data.Text.Lazy.Lens Data.Tree.Lens
Data.Typeable.Lens Data.Vector.Lens Data.Vector.Generic.Lens
Generics.Deriving.Lens GHC.Generics.Lens System.Exit.Lens
System.FilePath.Lens System.IO.Error.Lens Language.Haskell.TH.Lens
Numeric.Lens
hidden-modules: Paths_lens
abi: 6ad1c6085f8c675bd96af5b769b83428
trusted: False
import-dirs: /usr/lib/haskell-packages/ghc/lib/x86_64-linux-ghc-8.0.1/lens-4.14-9dVzUyOAXSjIX3UgJ3NnoU
library-dirs: /usr/lib/haskell-packages/ghc/lib/x86_64-linux-ghc-8.0.1/lens-4.14-9dVzUyOAXSjIX3UgJ3NnoU
data-dir: /usr/share/lens
hs-libraries: HSlens-4.14-9dVzUyOAXSjIX3UgJ3NnoU
depends:
array-0.5.1.1 base-4.9.0.0
base-orphans-0.5.4-5IQvrjd7gNP548VkOOyIq6
bifunctors-5.4.1-3niVDFIzoQq70SaLlFBQmO bytestring-0.10.8.1
comonad-5-3LwbLd5kfjiIqizoIjvHM2 containers-0.5.7.1
contravariant-1.4-DamgXeoxudwEmsHviLSGQO
distributive-0.5.0.2-IVixwhPTz78BgKSlrVu3oc
exceptions-0.8.3-1k51ubLFe5EKSOsIQFBryn filepath-1.4.1.0
free-4.12.4-KcMRz37SLEZ1mhKABhYXgw ghc-prim-0.5.0.0
hashable-1.2.4.0-EMu4H7FB10MAl6hwKw992G
kan-extensions-5.0.1-9P0lRCQKZIv1yP5MFZYX6Q
mtl-2.2.1-6qsR1PHUy5lL47Hpoa4jCM
parallel-3.2.1.0-6VcN0yUHtcs831TgbJiSSi
profunctors-5.2-AH6k27x3SHYLOMP15FaUqd
reflection-2.1.2-E3lqZ18SDTfFGWBoi2c7kX
semigroupoids-5.1-8EoliRc5eSJBHEVgPnibwd
semigroups-0.18.2-2lmUSJvrDkM6JBURGRclWz
tagged-0.8.5-KJ1mnYQWvwAIHfNS5HUoXP template-haskell-2.11.0.0
text-1.2.2.1-5QpmrLQApEZ4Ly9nMHWY0s transformers-0.5.2.0
transformers-compat-0.5.1.4-Gu79y45cTc6DEmc8xKkIcN
unordered-containers-0.2.7.1-Eo9jd5DMz45DhBLCG8skzW
vector-0.11.0.0-BEDZb5o2QOhGbIm6ky7rl6
void-0.7.1-DMDx4oiJSktE01vWZZ8Wjg
haddock-interfaces: /usr/lib/ghc-doc/haddock/lens-4.14/lens.haddock
haddock-html: /usr/share/doc/libghc-lens-doc/html/
|