/var/lib/ghc/package.conf.d/lens-3.10.conf is in libghc-lens-dev 3.10-2.
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 150 151 152 153 154 155 156 | name: lens
version: 3.10
id: lens-3.10-03619beefb1567173b155cc1d50ddc17
license: BSD3
copyright: Copyright (C) 2012-2013 Edward A. Kmett
maintainer: Edward A. Kmett <ekmett@gmail.com>
stability: provisional
homepage: http://github.com/ekmett/lens/
package-url:
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 @README@: <https://github.com/ekmett/lens#lens-lenses-folds-and-traversals>
.
A video on how to use lenses and how they are constructed is available from youtube: <http://youtu.be/cefnmjtAolY?hd=1>
.
Slides can be obtained here: <http://comonad.com/haskell/Lenses-Folds-and-Traversals-NYC.pdf>
.
More information on the care and feeding of lenses, including a brief tutorial and motivation
for their types can be found on the lens wiki: <https://github.com/ekmett/lens/wiki>
.
A small game of @pong@ and other more complex examples that manage their state using lenses can be found in the example folder: <https://github.com/ekmett/lens/blob/master/examples/>
.
/Lenses, Folds and Traversals/
.
The core of the hierarchy of lens-like constructions looks like:
.
.
<<http://i.imgur.com/4fHw3Fd.png>>
.
Local copy (<Hierarchy.png>)
.
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)
.
> -- baz :: 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
author: Edward A. Kmett
exposed: True
exposed-modules: Control.Lens.TH Language.Haskell.TH.Lens
Generics.Deriving.Lens GHC.Generics.Lens System.IO.Error.Lens
Control.Exception.Lens Control.Lens Control.Lens.Action
Control.Lens.At Control.Lens.Combinators Control.Lens.Cons
Control.Lens.Each Control.Lens.Equality Control.Lens.Fold
Control.Lens.Getter Control.Lens.Indexed Control.Lens.Internal
Control.Lens.Internal.Action Control.Lens.Internal.Bazaar
Control.Lens.Internal.ByteString Control.Lens.Internal.Context
Control.Lens.Internal.Deque Control.Lens.Internal.Exception
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.Magma Control.Lens.Internal.Prism
Control.Lens.Internal.Review Control.Lens.Internal.Setter
Control.Lens.Internal.Zipper Control.Lens.Internal.Zoom
Control.Lens.Iso Control.Lens.Lens Control.Lens.Level
Control.Lens.Loupe Control.Lens.Operators Control.Lens.Plated
Control.Lens.Prism Control.Lens.Reified Control.Lens.Review
Control.Lens.Setter Control.Lens.Simple Control.Lens.Traversal
Control.Lens.Tuple Control.Lens.Type Control.Lens.Wrapped
Control.Lens.Zipper 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.List.Split.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 System.Exit.Lens System.FilePath.Lens
Numeric.Lens
hidden-modules:
trusted: False
import-dirs: /usr/lib/haskell-packages/ghc/lib/lens-3.10/ghc-7.6.3
library-dirs: /usr/lib/haskell-packages/ghc/lib/lens-3.10/ghc-7.6.3
hs-libraries: HSlens-3.10
extra-libraries:
extra-ghci-libraries:
include-dirs:
includes:
depends: MonadCatchIO-transformers-0.3.0.0-00f5ba39422294066c7f13d4ef6c89a7
array-0.4.0.1-3b78425c10ff2dad7acf7e8c8ae014c3
base-4.6.0.1-8aa5d403c45ea59dcd2c39f123e27d57
bifunctors-4.1.0.1-5266d936dda24bb03c9f4cd6707beed1
bytestring-0.10.0.2-4f93248f75667c2c3321a7a6761b576f
comonad-4.0-1df0ce7fc9946a997e390d7efe2f8c5d
containers-0.5.0.0-ab1dae9a94cd3cc84e7b2805636ebfa2
contravariant-0.4.4-0f529cf89c5b4106ca6f0ff9d44b661d
distributive-0.3-9a9b53d31442b0f19f1b2e42e578db7b
filepath-1.3.0.1-b12cbe18566fe1532a1fda4c85e31cbe
generic-deriving-1.4.0-c4dc04b650864f47d38c7f765bfd1a5e
ghc-prim-0.3.0.0-d5221a8c8a269b66ab9a07bdc23317dd
hashable-1.2.1.0-7e83190fbb1b0ba81d7022fa876f0f8b
mtl-2.1.2-94c72af955e94b8d7b2f359dadd0cb62
parallel-3.2.0.3-d6c020cb3aa15c71f5f29c0db359fd39
profunctors-4.0.1-dc131e72ac3b3398997ff33929ca8456
reflection-1.2.0.1-3eea1741aff8138ef7446de9e4196a72
semigroupoids-4.0-2f73b390ed2b359c194de4094319ba4e
semigroups-0.9-73a419ce05af9d7589969e187fb66622
split-0.2.2-9ce33138f4fcfb9c37f6e6c300bcc367
tagged-0.7-d243d7f9110b53b4d18740d6abd0cfb9
template-haskell-2.8.0.0-a3012803fde1dc362e555b35a1a78e6d
text-0.11.3.1-e38859e86485c167fa7c9441789e7607
transformers-0.3.0.0-ff2bb6ac67241ebb987351a3db564af0
unordered-containers-0.2.3.0-9584b653deee0b5f16062e26c5ddf569
vector-0.10.0.1-1fbb548bc492f07fef7e604d2e6f581d
void-0.6.1-621dc8316fc80dae8fc701f1a2411b4b
hugs-options:
cc-options:
ld-options:
framework-dirs:
frameworks:
haddock-interfaces: /usr/lib/ghc-doc/haddock/lens-3.10/lens.haddock
haddock-html: /usr/share/doc/libghc-lens-doc/html/
|