packages feed

references

Selectors for reading and updating data.

view on Hackage

References are data accessors that can read, write or update the accessed infromation through their context. They are first-class values, can be passed in functions, transformed, combined. References generalize lenses, folds and traversals for haskell (see: < https://hackage.haskell.org/package/lens>). References are more general than field selectors in traditional languages. * References are first-class values. If there is a struct in C, for example, with an `int` field `fl`, then fl can only be used as part of an expression. One can not generalize a function to take a field selector and transform the selected data or use it in other ways. * They can have different meanings, while field accessors can only represent data-level containment. They can express uncertain containment (like field selectors of C unions), different viewpoints of the same data, and other concepts. There are two things that references can do but the previously mentioned access methods don't. * References can cooperate with monads, for example IO. This opens many new applications. * References can be added using the @&+&@ operator, to create new lenses more easily. Basic idea taken from the currently not maintained package <https://hackage.haskell.org/package/yall>. An example use of the references (a logger application that spawns new threads to update a global log): > logger = > (forever $ do > log <- logChan ^? chan&logRecord -- Extract the log record from the received log message > thrId <- forkIO (do time <- getTime > ioref&lastLogTime != time $ logDB -- Update the last logging time mutable log database > let logMsg = senderThread .- show -- Transform the thread id to a string and > $ loggingTime .= time -- update the time > $ log -- inside the log message > ioref&debugInfos !~ addLogEntry log $ logDB -- update the table of log entries > mvar !- (+1) $ count ) > mvar !- (thrId:) $ updaters -- Record the spawned thread > ) `catch` stopUpdaters updaters > where stopUpdaters updaters ThreadKilled = > mvar&traverse !| killThread $ updaters -- Kill all spawned threads before stopping There are a bunch of predefined references for datatypes included in standard libraries. New references can be created in several ways: * From getter, setter and updater, using the @reference@ function. * From getter and setter, using one of the simplified functions (@lens@, @simplePartial@, @partial@, ...). * Using the `Data.Traversal` instance on a datatype to generate a traversal of each element. * Using lenses from `Control.Lens` package. There are a lot of packages defining lenses, folds and traversals for various data structures, so it is very useful that all of them can simply be converted into a reference. * Generating references for newly defined datatypes using the `makeReferences` Template Haskell function.
versionuploadeduploaderchanges
0.3.3.12017-11-28 00:57 UTClazac+2/−2 lines, 1 filesdep ~eitherPVP: major bump suggested
0.3.3.02017-09-27 06:39 UTClazac+251/−270 lines, 11 filesPVP: major bump suggested
0.3.2.22017-07-31 09:01 UTClazac+2/−2 lines, 2 filesPVP: major bump suggested
0.3.2.12017-01-06 11:04 UTClazac+18/−5 lines, 2 filesdep ~eitherdep ~instance-controldep ~uniplatePVP: major bump suggested
0.3.2.02016-06-30 10:33 UTClazac+1/−1 lines, 1 filesPVP ok
0.3.1.12016-06-30 10:28 UTClazac+1/−1 lines, 1 filesPVP: major bump suggested
0.3.1.02016-06-07 13:54 UTClazac+22/−31 lines, 5 filesdep ~basePVP: major bump suggested
0.3.0.12016-05-11 08:04 UTClazac+1002/−552 lines, 19 filesdep +HUnitdep +lensdep +uniplatedep ~arraydep ~basedep ~containerssetup-changed
0.3.0.02014-10-19 19:27 UTClazac+402/−703 lines, 12 filesdep +directorydep +filepathdep +instance-controldep −lifted-basedep −monad-controldep −transformers-base
0.2.1.22014-09-06 13:51 UTClazac+585/−141 lines, 11 filesdep +arraydep +textPVP: major bump suggested
0.2.1.12014-08-25 07:26 UTClazac1 revisions+1/−2 lines, 1 filesdep −lens
0.2.1.02014-08-20 12:30 UTClazac+306/−264 lines, 8 files
0.2.0.02014-08-14 12:27 UTClazac1 revisions+1060/−830 lines, 15 filesdep +lifted-basedep +monad-controldep +transformers-basedep ~basedep ~template-haskellsetup-changed
0.1.0.02014-07-23 09:35 UTClazac3 revisions+1164/−0 lines, 14 filesdep +basedep +containersdep +eithersetup-changed

Dependencies of references-0.3.3.1

HUnit >=0 1.6.1.0 → 1.6.2.0
2021-01-19 18:27 UTC1.6.2.0+48/−42 lines, 5 filesdep ~call-stackPVP: major bump suggested
2020-10-31 12:09 UTC1.6.1.0+35/−21 lines, 4 filesPVP ok
2017-03-20 01:42 UTC1.6.0.0+9/−5 lines, 4 filesdep ~basePVP ok
2016-10-16 03:35 UTC1.5.0.0+47/−27 lines, 5 filesPVP ok
2016-10-07 03:13 UTC1.4.0.0+761/−778 lines, 12 filesdep +call-stackPVP ok

showing 5 of 22 versions

array >=0.5 && <1 0.5.7.0 → 0.5.8.0
2024-09-08 07:13 UTC0.5.8.0+204/−8 lines, 6 filesdep ~basePVP ok
2024-04-12 14:38 UTC0.5.7.0+34/−17 lines, 9 filesdep ~basePVP: major bump suggested
2023-07-10 15:24 UTC0.5.6.0+159/−39 lines, 8 filesdep ~basenew-uploaderPVP ok
2023-02-13 16:01 UTC0.5.5.0+8/−4 lines, 3 filesdep ~basenew-uploaderPVP ok
2019-09-01 06:48 UTC0.5.4.0+33/−8 lines, 5 filesdep ~basesetup-changedPVP: major bump suggested

showing 5 of 18 versions

base >=4.9 && <5 4.22.0.0 → 4.22.1.0
2026-12-01 12:38 UTC4.22.1.0+388/−6 lines, 9 filesdep ~ghc-internalPVP: major bump suggested
2025-12-19 11:52 UTC4.22.0.0+886/−215 lines, 28 filesdep ~ghc-internalPVP ok
2026-03-27 12:26 UTC4.21.2.0+10/−3 lines, 4 filesdep ~ghc-internalPVP ok
2025-12-27 10:31 UTC4.21.1.0+17/−5 lines, 4 filesdep ~ghc-internalPVP ok
2024-12-16 09:24 UTC4.21.0.0+1170/−396 lines, 39 filesdep ~ghc-internalPVP ok

showing 5 of 61 versions

containers >=0.5 && <1 0.8 → 0.8.1
2026-10-04 06:08 UTC0.8.1+8085/−5169 lines, 39 filesdep +template-haskell-liftdep ~arraydep ~deepseqPVP: major bump suggested
2025-03-01 13:03 UTC0.8+8447/−7031 lines, 37 filesnew-uploaderPVP ok
2023-09-27 12:15 UTC0.7+76/−33 lines, 3 filesPVP ok
2023-09-28 04:21 UTC0.6.8+644/−184 lines, 17 filesdep ~basedep ~deepseqPVP: major bump suggested
2023-02-01 03:11 UTC0.6.7+783/−229 lines, 20 filesPVP: major bump suggested

showing 5 of 43 versions

directory >=1.2 && <2 1.3.10.1 → 1.3.11.0
2026-05-27 05:59 UTC1.3.11.0+4560/−4504 lines, 25 filesdep ~file-iodep ~filepathdep ~os-stringPVP ok
2026-01-05 11:08 UTC1.3.10.1+4989/−4830 lines, 43 filesPVP: major bump suggested
2025-12-24 02:55 UTC1.3.10.0+90/−39 lines, 7 filesdep ~Win32dep ~basePVP: major bump suggested
2024-10-11 10:43 UTC1.3.9.0+235/−158 lines, 14 filesdep +file-iodep ~basedep ~timePVP: major bump suggested
2024-05-20 06:52 UTC1.3.8.5+15/−13 lines, 7 filesdep ~basePVP ok

showing 5 of 55 versions

either >=4.3 && <6 5.0.2 → 5.0.3
2025-06-17 11:53 UTC5.0.3+25/−31 lines, 5 filesdep +tastydep +tasty-quickcheckdep −semigroupsdep −test-frameworkdep −test-framework-quickcheck2dep ~QuickCheckdep ~basePVP: major bump suggested
2022-05-08 00:39 UTC5.0.2+28/−193 lines, 6 filesdep ~QuickCheckdep ~mtldep ~semigroupoidsPVP ok
2019-05-02 16:30 UTC5.0.1.1+149/−122 lines, 4 filesdep ~QuickCheckPVP: major bump suggested
2018-07-03 12:50 UTC5.0.1+241/−134 lines, 7 filesdep +QuickCheckdep +test-frameworkdep +test-framework-quickcheck2dep −hedgehognew-uploaderPVP: major bump suggested
2017-11-21 03:04 UTC5+130/−400 lines, 6 filesdep +eitherdep +hedgehogdep −MonadRandomdep −exceptionsdep −freedep ~basePVP ok

showing 5 of 44 versions

filepath >=1.3 && <2 1.5.4.0 → 1.5.5.0
2026-01-20 08:14 UTC1.5.5.0+68/−12 lines, 8 filesdep +QuickCheckdep +template-haskell-liftdep +template-haskell-quasiquoterPVP ok
2024-11-17 13:06 UTC1.5.4.0+26/−6 lines, 3 filesdep ~basePVP ok
2024-06-29 15:30 UTC1.5.3.0+876/−871 lines, 13 filesdep −QuickCheckdep ~basePVP: major bump suggested
2024-01-26 07:02 UTC1.5.2.0+330/−256 lines, 11 filesdep +generic-derivingdep +generic-randomdep +tastydep ~basedep ~os-stringPVP ok
2023-11-25 08:29 UTC1.5.0.0+53/−3744 lines, 35 filesdep +os-stringdep ~basePVP ok

showing 5 of 35 versions

instance-control >=0.1 && <1 0.1.1.1 → 0.1.2.0
2017-09-27 06:34 UTC0.1.2.0+77/−85 lines, 3 filesPVP: major bump suggested
2016-06-30 10:16 UTC0.1.1.1+1/−4 lines, 1 filesPVP: major bump suggested
2016-06-07 13:48 UTC0.1.1.0+11/−9 lines, 3 filesdep ~basedep ~transformers
2016-05-11 08:01 UTC0.1.0.0+370/−0 lines, 6 filesdep +basedep +mtldep +transformerssetup-changed
lens >=0 5.3.5 → 5.3.6
2026-01-10 22:05 UTC5.3.6+39/−28 lines, 7 filesdep −ghc-primdep −transformers-compatdep ~template-haskellPVP ok
2025-06-17 11:56 UTC5.3.5+99/−99 lines, 5 filesdep +tastydep +tasty-hunitdep +tasty-quickcheckdep −HUnitdep −test-frameworkdep −test-framework-hunitdep ~parallelPVP: major bump suggested
2025-03-03 12:24 UTC5.3.4+156/−44 lines, 14 filesdep ~containersPVP ok
2024-12-28 16:38 UTC5.3.3+198/−36 lines, 11 filesdep ~basedep ~template-haskellPVP ok
2024-05-12 23:00 UTC5.3.2+131/−19 lines, 7 filesdep ~hashablePVP: major bump suggested

showing 5 of 162 versions

mtl >=2.2 && <3 2.3.1 → 2.3.2
2025-12-08 04:58 UTC2.3.2+112/−21 lines, 12 filesdep ~basenew-uploaderPVP: major bump suggested
2022-10-31 21:28 UTC2.3.1+188/−33 lines, 8 filesdep ~basePVP: major bump suggested
2022-05-07 20:34 UTC2.3+1284/−520 lines, 29 filesdep ~basedep ~transformersnew-uploaderPVP ok
2018-02-24 22:15 UTC2.2.2+152/−36 lines, 14 filesdep ~basePVP: major bump suggested
2014-06-02 02:22 UTC2.2.1+179/−4 lines, 8 filesdep ~basedep ~transformersPVP: major bump suggested

showing 5 of 20 versions

template-haskell >=2.8 && <3 2.23.0.0 → 2.24.0.0
2025-12-19 11:53 UTC2.24.0.0+606/−68 lines, 9 filesdep +ghc-internaldep ~basedep ~ghc-boot-thPVP ok
2024-12-16 09:29 UTC2.23.0.0+104/−5685 lines, 9 filesdep −ghc-primdep −prettydep ~basedep ~ghc-boot-thnew-uploaderPVP ok
2024-05-15 13:07 UTC2.22.0.0+176/−81 lines, 7 filesdep ~basedep ~ghc-boot-thPVP ok
2023-10-10 00:23 UTC2.21.0.0+275/−148 lines, 7 filesdep ~basedep ~ghc-boot-thPVP ok
2023-03-28 13:43 UTC2.20.0.0+215/−139 lines, 9 filesdep −filepathdep ~basedep ~ghc-boot-thPVP ok

showing 5 of 26 versions

text >=1.1 && <2 1.2.5.0 → 2.1.5 newer than bounds
2026-11-27 23:30 UTC2.1.5 newer than bounds+33786/−32979 lines, 58 filesPVP: major bump suggested
2026-01-28 08:30 UTC2.1.4 newer than bounds+30991/−20199 lines, 35 filesdep +template-haskell-liftdep ~QuickCheckdep ~template-haskellPVP ok
2025-08-01 20:08 UTC2.1.3 newer than bounds+2107/−1827 lines, 30 filesdep +splitmixdep +temporarydep ~QuickCheckdep ~ghc-primdep ~template-haskellPVP ok
2024-10-26 13:22 UTC2.1.2 newer than bounds+43588/−15378 lines, 41 filesdep ~basedep ~binaryPVP: major bump suggested
2024-02-16 22:16 UTC2.1.1 newer than bounds+986/−412 lines, 26 filesdep ~QuickCheckdep ~ghc-primdep ~template-haskellPVP: major bump suggested

showing 5 of 83 versions

transformers >=0.4 && <1 0.6.2.0 → 0.6.3.0
2026-01-12 12:42 UTC0.6.3.0+28/−1 lines, 4 filesPVP: major bump suggested
2025-04-06 22:39 UTC0.6.2.0+41/−42 lines, 8 filesdep ~ghc-primPVP: major bump suggested
2024-09-25 11:37 UTC0.6.1.2+70/−21 lines, 19 filesPVP: minor bump suggested
2023-08-01 19:13 UTC0.6.1.1+281/−42 lines, 11 filesPVP ok
2023-02-04 08:15 UTC0.6.1.0+64/−4 lines, 8 filesPVP ok

showing 5 of 42 versions

uniplate >=1.6 && <2 1.6.12 → 1.6.13
2020-11-07 19:53 UTC1.6.13+369/−548 lines, 23 filesdep +ghc-primdep ~base
2013-10-26 21:17 UTC1.6.12+4/−5 lines, 2 filesdep ~hashabledep ~unordered-containers
2013-08-14 15:35 UTC1.6.11+4/−4 lines, 3 filesPVP ok
2012-12-14 08:53 UTC1.6.10+3/−4 lines, 3 filesdep ~hashablePVP ok
2012-12-08 19:45 UTC1.6.9+52/−128 lines, 11 filesPVP: major bump suggested

showing 5 of 24 versions

Reverse dependencies

14 packages depend on references

haskell-tools-ast 1.1.1.0 requires references >=0.3 && <0.4
haskell-tools-ast-fromghc 0.2.0.0 requires references >=0.3.2 && <1.0
haskell-tools-ast-gen 0.2.0.0 requires references >=0.3.2 && <1.0
haskell-tools-ast-trf 0.2.0.0 requires references >=0.3.2 && <1.0
haskell-tools-backend-ghc 1.1.1.0 requires references >=0.3 && <0.4
haskell-tools-builtin-refactorings 1.1.1.0 requires references >=0.3 && <0.4
haskell-tools-cli 1.1.1.0 requires references >=0.3 && <0.4
haskell-tools-daemon 1.1.1.0 requires references >=0.3.2 && <1.0
haskell-tools-debug 1.1.1.0 requires references >=0.3 && <0.4
haskell-tools-demo 1.1.1.0 requires references >=0.3 && <0.4
haskell-tools-experimental-refactorings 1.1.1.0 requires references >=0.3 && <0.4
haskell-tools-prettyprint 1.1.1.0 requires references >=0.3 && <0.4
haskell-tools-refactor 1.1.1.0 requires references >=0.3 && <0.4
haskell-tools-rewrite 1.1.1.0 requires references >=0.3 && <0.4