If you are not sure if the website you would like to visit is secure, you can verify it here. Enter the website address of the page and see parts of its content and the thumbnail images on this site. None (if any) dangerous scripts on the referenced page will be executed. Additionally, if the selected site contains subpages, you can verify it (review) in batches containing 5 pages.
favicon.ico: hackage.haskell.org/package/lens - lens: Lenses, Folds and Traver.

site address: hackage.haskell.org/package/lens redirected to: hackage.haskell.org/package/lens

site title: lens: Lenses, Folds and Traversals

Our opinion (on Thursday 16 July 2026 16:01:22 UTC):

GREEN status (no comments) - no comments
After content analysis of this website we propose the following hashtags:


Hashtags existing on this website:




Meta tags:

Headings (most frequently used words):

lens, lenses, folds, and, traversals, flags, modules, downloads, readme, for, field, guide, examples, contact, information, manual, maintainer, corner,

Text of the page (most frequently used words):
lens (116), control (61), the (53), data (36), and (34), can (30), you (29), #lenses (28), for (27), foo (24), internal (24), ghci (22), hello (21), with (19), ghc (16), world (15), int (14), are (12), use (12), from (12), that (12), package (11), traversals (9), neither (8), text (8), this (8), folds (8), setter (8), haskell (7), examples (7), automatically (7), isomorphisms (7), traversal (7), combinators (7), any (7), setters (7), types (7), type (7), there (6), also (6), but (6), _neither (6), your (6), other (6), getter (6), how (6), mapped (6), available (6), indexed (6), bytestring (6), github (5), above (5), either (5), derive (5), them (5), fold (5), number (5), their (5), library (5), set (5), com (5), strict (5), enabled (5), error (5), hackage (4), edward (4), kmett (4), iso (4), own (4), packed (4), length (4), traversable (4), generic (4), monad (4), succ (4), over (4), using (4), fmap (4), used (4), change (4), bar (4), quux (4), found (4), ekmett (4), generics (4), vector (4), array (4), more (4), flag (4), system (4), lazy (4), hierarchy (4), information (3), which (3), will (3), makelenses (3), included (3), state (3), alias (3), composition (3), functor (3), write (3), just (3), large (3), these (3), prelude (3), wiki (3), overview (3), slides (3), video (3), getters (3), description (3), readme (3), dependencies (3), parallel (3), filepath (3), disabled (3), test (3), numeric (3), list (3), complex (3), exception (3), traversebarandbaz (3), applicative (3), cabal (2), free (2), contact (2), through (2), bug (2), reports (2), documentation (2), game (2), folder (2), pong (2), newtypes (2), such (2), makeprisms (2), let (2), many (2), supplied (2), directly (2), traverse (2), anything (2), know (2), true (2), work (2), uniplate (2), container (2), fresh (2), current (2), etc (2), those (2), structure (2), operators (2), working (2), transformers (2), infix (2), yields (2), then (2), multiple (2), example (2), need (2), takes (2), parameters (2), fields (2), back (2), variants (2), provided (2), view (2), compose (2), pure (2), composing (2), import (2), see (2), head (2), provides (2), along (2), brief (2), some (2), constructed (2), youtube (2), want (2), families (2), last (2), 2026 (2), all (2), log (2), rating (2), downloads (2), details (2), git (2), source (2), http (2), ryanglscott (2), maintainer (2), copyright (2), containers (2), instances (2), comonad (2), base (2), candidates (2), maintainers (2), browse (2), flags (2), exit (2), natural (2), language (2), typeable (2), tree (2), sequence (2), map (2), intset (2), hashset (2), dynamic (2), bits (2), seq (2), strategies (2), zoom (2), review (2), profunctor (2), prism (2), level (2), what (2), define (2), without (2), provide (2), bound (2), like (2), user (2), produced, please, feel, irc, channel, libera, chat, contributions, welcome, couple, hundred, distributed, throughout, haddock, fully, operational, simple, behaves, identically, nor, alternatively, newtype, _nor, deriving, show, flip, around, way, moreover, actually, means, mapmof, putstrln, alluded, anyof, biplate, programming, based, neil, mitchell, have, been, generalized, char, allof, folded, islower, goodbye, foldable, monadstate, manipulating, well, both, analogues, functionally, returning, modified, version, resemble, ifmmp, precedence, lets, avoid, swimming, parentheses, benefit, analogous, parameterized, target, parts, canonical, often, won, flexibility, because, whole, when, part, baz, generate, following, _bar, _baz, _quux, come, later, continuing, particular, generalizes, conversely, prefix, saw, writes, easily, explicit, coercion, necessary, make, out, function, reading, writing, goes, order, imperative, programmer, would, expect, uses, now, read, first, field, guide, preceding, releases, links, different, resources, learning, about, derivation, faq, looking, where, get, started, was, basics, best, watched, high, definition, follow, crash, course, docs, success, reported, build, status, votes, estimated, bayesian, average, 433591, total, 531, days, 1547, direct, 7337, indirect, reverse, arch, fedora, ltshaskell, stackage, distributions, clone, https, repo, issues, tracker, home, page, category, 10t22, 13z, uploaded, gmail, author, 2012, 2016, bsd, clause, license, tested, unordered, abstraction, template, tagged, semigroupoids, reflection, profunctors, mtl, kan, extensions, hashable, exceptions, distributive, contravariant, call, stack, bifunctors, orphans, assoc, changelog, markdown, versions, rss, edit, trustees, johnwiegley, ericmertens, edwardkmett, corner, tar, info, disable, enable, trustworthy, templates, properties, hunit, dump, splices, inlining, benchmark, default, name, manual, wrapped, unsound, tuple, reified, plated, prismth, magma, fieldth, doctest, deque, context, ctypes, bazaar, extras, equality, empty, each, cons, quick, jump, index, modules, skip, stock, common, wide, exotic, functionality, isn, already, defined, libraries, incurring, dependency, minimizing, instance, result, lowest, upper, doesn, exist, two, elements, element, linked, signatures, simplified, core, constructions, looks, small, manage, care, feeding, including, tutorial, motivation, second, talk, obtained, they, introductory, style, code, simon, peyton, jones, internet, archive, highly, toolbox, comes, batteries, useful, commonly, platform, tools, generating, report, vulnerability, propose, tags, bsd2, accounts, upload, new, search,


Text of the page (random words):
lens lenses folds and traversals hackage package search browse what s new upload user accounts lens lenses folds and traversals bsd2 data generics lenses library propose tags report a vulnerability 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 an introductory video on the style of code used in this library by simon peyton jones is available from internet archive a video on how to use lenses and how they are constructed is available on youtube slides for that second talk can be obtained from 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 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 lenses folds and traversals with some signatures simplified the core of the hierarchy of lens like constructions looks like 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 skip to readme modules index quick jump control exception 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 ctypes control lens internal context control lens internal deque control lens internal doctest control lens internal exception control lens internal fieldth 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 prismth control lens internal profunctor 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 profunctor control lens reified control lens review control lens setter control lens th control lens traversal control lens tuple control lens type control lens unsound control lens wrapped control lens zoom monad error control monad error lens parallel strategies control parallel strategies lens seq control seq lens data array data array lens bits data bits lens bytestring lazy data bytestring lazy lens data bytestring lens strict data bytestring strict lens complex data complex lens data data data lens dynamic data dynamic lens hashset data hashset lens intset data intset lens list data list lens map data map lens sequence data sequence lens set data set lens text lazy data text lazy lens data text lens strict data text strict lens tree data tree lens typeable data typeable lens vector generic data vector generic lens data vector lens ghc generics ghc generics lens language haskell th language haskell th lens numeric numeric lens natural numeric natural lens system exit system exit lens filepath system filepath lens io error system io error lens flags manual flags name description default benchmark uniplate disabled inlining enabled dump splices disabled test hunit enabled test properties enabled test templates enabled trustworthy enabled j disabled use f flag to enable a flag or f flag to disable that flag more info downloads lens 5 3 6 tar gz browse cabal source package package description as included in the package maintainer s corner package maintainers edwardkmett ericmertens johnwiegley ryanglscott for package maintainers and hackage trustees edit package information candidates no candidates versions rss 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 8 0 9 1 0 1 0 1 1 0 2 1 0 3 1 1 1 1 1 1 2 1 3 1 3 1 1 4 1 4 1 1 5 1 6 1 7 1 7 1 1 8 1 9 1 9 1 2 0 2 1 2 2 2 3 2 4 2 4 0 2 2 5 2 6 2 6 1 2 7 2 7 0 1 2 8 2 9 3 0 3 0 1 3 0 2 3 0 3 3 0 4 3 0 5 3 0 6 3 1 3 2 3 3 3 4 3 5 3 5 1 3 6 3 6 0 1 3 6 0 2 3 6 0 3 3 6 0 4 3 7 3 7 0 1 3 7 0 2 3 7 1 3 7 1 1 3 7 1 2 3 7 2 3 7 3 3 7 4 3 7 5 3 7 6 3 8 3 8 0 1 3 8 0 2 3 8 1 3 8 2 3 8 3 3 8 4 3 8 5 3 8 6 3 8 7 3 8 7 1 3 8 7 2 3 8 7 3 3 9 3 9 0 1 3 9 0 2 3 9 0 3 3 9 1 3 9 2 3 10 3 10 0 1 3 10 1 3 10 2 3 10 3 4 0 4 0 1 4 0 2 4 0 3 4 0 4 4 0 5 4 0 6 4 0 7 4 1 4 1 1 4 1 2 4 1 2 1 4 2 4 3 4 3 1 4 3 2 4 3 3 4 4 4 4 0 1 4 4 0 2 4 5 4 6 4 6 0 1 4 7 4 7 0 1 4 8 4 9 4 9 1 4 10 4 11 4 11 1 4 12 4 12 1 4 12 2 4 12 3 4 13 4 13 1 4 13 2 4 13 2 1 4 14 4 15 4 15 1 4 15 2 4 15 3 4 15 4 4 16 4 16 1 4 17 4 17 1 4 18 4 18 1 4 19 4 19 1 4 19 2 5 5 0 1 5 1 5 1 1 5 2 5 2 1 5 2 2 5 2 3 5 3 5 3 1 5 3 2 5 3 3 5 3 4 5 3 5 5 3 6 change log changelog markdown dependencies array 0 5 0 0 0 6 assoc 1 0 2 1 2 base 4 9 5 base orphans 0 5 2 1 bifunctors 5 5 7 6 bytestring 0 10 4 0 0 13 call stack 0 1 0 5 comonad 5 0 7 6 containers 0 5 5 1 0 9 contravariant 1 4 2 distributive 0 5 1 1 exceptions 0 8 2 1 1 filepath 1 2 0 0 1 6 free 5 1 5 6 hashable 1 2 7 0 1 6 indexed traversable 0 1 0 2 indexed traversable instances 0 1 0 2 kan extensions 5 6 mtl 2 2 1 2 4 parallel 3 2 1 0 3 4 profunctors 5 5 2 6 reflection 2 1 3 semigroupoids 5 0 1 7 strict 0 4 0 6 tagged 0 8 6 1 template haskell 2 11 1 0 2 25 text 1 2 3 0 2 2 th abstraction 0 4 1 0 8 these 1 1 1 1 1 3 transformers 0 5 0 0 0 7 unordered containers 0 2 10 0 3 vector 0 12 1 2 0 14 details tested with ghc 8 0 2 ghc 8 2 2 ghc 8 4 4 ghc 8 6 5 ghc 8 8 4 ghc 8 10 7 ghc 9 0 2 ghc 9 2 8 ghc 9 4 8 ghc 9 6 7 ghc 9 8 4 ghc 9 10 3 ghc 9 12 2 ghc 9 14 1 license bsd 2 clause copyright copyright c 2012 2016 edward a kmett author edward a kmett maintainer edward a kmett ekmett gmail com uploaded by ryanglscott at 2026 01 10t22 05 13z category data lenses generics home page http github com ekmett lens bug tracker http github com ekmett lens issues source repo head git clone https github com ekmett lens git distributions arch 5 3 5 fedora 5 3 6 ltshaskell 5 3 6 stackage 5 3 6 reverse dependencies 1547 direct 7337 indirect details downloads 433591 total 531 in the last 30 days rating 3 0 votes 51 estimated by bayesian average your rating λ λ λ status docs available build log last success reported on 2026 01 10 all 1 reports readme for lens 5 3 6 back to package description lens lenses folds and traversals this package provides families of lenses isomorphisms folds traversals getters and setters if you are looking for where to get started a crash course video on how lens was constructed and how to use the basics is available on youtube it is best watched in high definition to see the slides but the slides are also available if you want to use them to follow along the faq which provides links to a large number of different resources for learning about lenses and an overview of the derivation of these types can be found on the lens wiki along with a brief overview and some examples documentation is available through github for head or hackage for the current and preceding releases field guide examples see wiki examples first import control lens ghci import control lens now you can read from lenses ghci hello world _2 world and you can write to lenses ghci set _2 42 hello world hello 42 composing lenses for reading or writing goes in the order an imperative programmer would expect and just uses from the prelude ghci hello world _2 _1 world ghci set _2 _1 42 hello world hello 42 you can make a getter out of a pure function with to ghci hello to length 5 you can easily compose a getter with a lens just using no explicit coercion is necessary ghci hello world _2 _2 to length 3 as we saw above you can write to lenses and these writes can change the type of the container is an infix alias for set ghci _1 hello world hello world conversely view can be used as a prefix alias for ghci view _2 10 20 20 there are a large number of other lens variants provided by the library in particular a traversal generalizes traverse from data traversable we ll come back to those later but continuing with just lenses you can let the library automatically derive lenses for fields of your data type data foo a foo _bar int _baz int _quux a makelenses foo this will automatically generate the following lenses bar baz lens foo a int quux lens foo a foo b a b a lens takes 4 parameters because it can change the types of the whole when you change the type of the part often you won t need this flexibility a lens takes 2 parameters and can be used directly as a lens you can also write to setters that target multiple parts of a structure or their composition with other lenses or setters the canonical example of a setter is mapped mapped functor f setter f a f b a b over is then analogous to fmap but parameterized on the setter ghci fmap succ 1 2 3 2 3 4 ghci over mapped succ 1 2 3 2 3 4 the benefit is that you can use any lens as a setter and the composition of setters with other setters or lenses using yields a setter ghci over mapped _2 succ 1 2 3 4 1 3 3 5 is an infix alias for over and the precedence lets you avoid swimming in parentheses ghci _1 mapped _2 mapped succ 42 hello world 42 ifmmp world there are a number of combinators that resemble the etc operators from c c for working with the monad transformers there are etc analogues to those combinators that work functionally returning the modified version of the structure ghci both 2 1 2 2 4 there are combinators for manipulating the current state in a state monad as well fresh monadstate int m m int fresh id 1 anything you know how to do with a foldable container you can do with a fold ghci m data char data text lens ghci allof folded text islower hello packed goodbye packed true you can also use this for generic programming combinators are included that are based on neil mitchell s uniplate but which have been generalized to work on or as lenses folds and traversals ghci m data data lens ghci anyof biplate world hello 2 int world true as alluded to above anything you know how to do with a traversable you can do with a traversal ghci mapmof traverse _2 xs length xs putstrln xs 42 hello 56 world hello world 42 5 56 5 moreover many of the lenses supplied are actually isomorphisms that means you can use them directly as a lens or getter ghci let hello hello packed hello ghci t hello hello text but you can also flip them around and use them as a lens the other way with from ghci hello from packed to length 5 you can automatically derive isomorphisms for your own newtypes with makeprisms e g newtype neither a b neither _nor either a b deriving show makeprisms neither will automatically derive _neither iso neither a b neither c d either a b either c d such that _neither from _neither id from _neither _neither id alternatively you can use makelenses to automatically derive isomorphisms for your own newtypes e g makelenses neither will automatically derive nor iso either a b either c d neither a b neither c d which behaves identically to _neither above there is also a fully operational but simple game of pong in the examples folder there are also a couple of hundred examples distributed throughout the haddock documentation contact information contributions and bug reports are welcome please feel free to contact me through github or on the haskell lens or haskell irc channel on libera chat edward kmett produced by hackage and cabal 3 16 1 0
Thumbnail images (randomly selected): * Images may be subject to copyright.GREEN status (no comments)
  • Hackage
  • Build Status
  • Hackage Deps

Verified site has: 303 subpage(s). Do you want to verify them? Verify pages:

1-5 6-10 11-15 16-20 21-25 26-30 31-35 36-40 41-45 46-50
51-55 56-60 61-65 66-70 71-75 76-80 81-85 86-90 91-95 96-100
101-105 106-110 111-115 116-120 121-125 126-130 131-135 136-140 141-145 146-150
151-155 156-160 161-165 166-170 171-175 176-180 181-185 186-190 191-195 196-200
201-205 206-210 211-215 216-220 221-225 226-230 231-235 236-240 241-245 246-250
251-255 256-260 261-265 266-270 271-275 276-280 281-285 286-290 291-295 296-300
301-303


The site also has references to the 2 subdomain(s)

  hackage.haskell.org  Verify   haskell.org  Verify


Top 50 hastags from of all verified websites.

Supplementary Information (add-on for SEO geeks)*- See more on header.verify-www.com

Header

HTTP/1.1 301 Moved Permanently
Connection close
Content-Length 0
Server Varnish
Retry-After 0
Location htt????/hackage.haskell.org/package/lens
Accept-Ranges bytes
Date Thu, 16 Jul 2026 16:01:20 GMT
Via 1.1 varnish
X-Served-By cache-rtm-ehrd2290024-RTM
X-Cache HIT
X-Cache-Hits 0
X-Timer S1784217680.033309,VS0,VE0
HTTP/2 200
server nginx/1.24.0 (Ubuntu)
content-type text/html; charset=utf-8
cache-control public, max-age=300
content-encoding gzip
via 1.1 varnish, 1.1 varnish
accept-ranges bytes
date Thu, 16 Jul 2026 16:01:20 GMT
age 0
x-served-by cache-dfw-kdal2120135-DFW, cache-rtm-ehrd2290053-RTM
x-cache MISS, MISS
x-cache-hits 0, 0
x-timer S1784217680.086018,VS0,VE263
vary Accept, Accept-Encoding

Meta Tags

title="lens: Lenses, Folds and Traversals"
name="viewport" content="width=device-width, initial-scale=1"
name="twitter:card" content="summary"
name="twitter:site" content="@hackage"
property="og:url" content="//hackage.haskell.org/package/lens"
property="og:site_name" content="Hackage"
property="og:type" content="website"
property="og:title" content="lens"
property="og:description" content="Lenses, Folds and Traversals"

Load Info

page size108819
load time (s)0.515427
redirect count1
speed download211299
server IP 151.101.205.170
* all occurrences of the string "http://" have been changed to "htt???/"