**Packages**- package

The Haskell Common Architecture for Building Applications and Libraries: a framework defining a common interface for authors to more easily build their Haskell applications in a portable way.
The Haskell Cabal is part of a larger infrastructure for distributing, organizing, and cataloging Haskell libraries and tools.
Version 1.18.1.2

CabalSearch builds an index of cabal packages and search through them by name. It acts as a 'cabal list' replacement. To get started, install the package and run: cabalsearch --rebuild. Now try it out with a query: cabalsearch cabal.
Version 0.0.2

The *capabilities* library is an effort to make effects in Haskell more explicit by breaking the monolithic IO monad into smaller composable parts called *capabilities*: a use case might be an action that needs logging with current time but which should not be allowed any other IO. This exists as a pleasant middle ground between pure functions, the ST monad and the kitchen-sink IO providing a more fine-grained approach to effectful computations. Another benefit to this approach is security where a computation should only have access to resources requires to complete its job (*principle of least privilege*).
The implementation of the idea is based on Wouter Swierstra's Functional Pearl *Data types a la carte* (Journal of Functional Programming, 18(4):423-436, 2008, http://dx.doi.org/10.1017/S0956796808006758) and uses the compdata package for compositional data types.
Version 0.1.0.0

This module introduces typeclasses
* HasCard = "Has cardinality". In other words, "it's possible to measure current count of elements for this container"
* HasCardT = "Has cardinality (for container types of kind (* -> *))". In other words, "it's possible to measure current count of elements for this container (for container types of kind (* -> *))"
* HasCardConstr = "Has cardinality constraint". In other words, "there is a capacity constraint for this container".
* HasCardConstrT = "Has cardinality constraint (for container types of kind (* -> *))". In other words, "there is a capacity constraint for this container type of kind (* -> *)".
* HasCardUCT = "Has cardinality-unsafe container transform". Define transform that may thow an error, if contents of from don't fit in to .
* HasCardUCT_T = "Has cardinality-unsafe container transform (for container types of kind (* -> *))". Same thing as HasCardUCT, but for containers of kind (* -> *).
No, it's not about playing cards. It's about cardinalities. Wikipedia: "*In mathematics, the cardinality of a set is a measure of the number of elements of the set. For example, the set A = 2, 4, 6 contains 3 elements, and therefore A has a cardinality of 3.*" In this package I dare to extend the definition a bit to "*C. is a measure of the number of elements in a container*"
Usual containers are (together with their cardinality ranges):
* Identity a (1 element)
* Maybe a (0..1 element)
* [a] (0..inf elements)
* Map k e (0..inf elements)
I extended this to the folowing list:
* EmptySet a (0 elements)
* Identity a (1 element)
* Maybe a (0..1 element)
* [a] (0..inf elements)
* NeverEmptyList a (1..inf elements)
* Map k e (0..inf elements)
Typeclass HasCardUCT together with function sContTrans (safe container transform) provides a facility to safely change container from one to another keepeng the content. If content doesn't fit to target container, Nothing is returned. However, when transforming from list [a] to (Maybe a) it won't check list length further first 2 elements. The complexity and power of this package is that it provides a facility to *lazily* evaluate amount of content in the container.
To interface package functions
import Data.Cardinality
Version 0.2

An implementation and domain specific language for the Carneades argumentation model. See Haskell Gets Argumentative in the Proceedings of Symposium on Trends in Functional Programming (TFP 2012) by Bas van Gijzel and Henrik Nilsson or the package's homepage. Thanks to Stefan Sabev for providing initial code for the cyclicity check.
Version 1.2

A translation from the Carneades argumentation model (http:hackage.haskell.org*package*CarneadesDSL) into Dung's argumentation frameworks (http:hackage.haskell.org*package*Dung). This package provides a translation function and correspondence properties. See "Towards a framework for the implementation and verification of translations between argumentation models" by Bas van Gijzel and Henrik Nilsson or the package's homepage.
Version 0.9

A monad for complex manipulation of a stream.
Version 0.3

An implementation of multi-prompt delimited continuations based on the paper, *A Monadic Framework for Delimited Continuations*, by R. Kent Dybvig, Simon Peyton Jones and Amr Sabry (http://www.cs.indiana.edu/~sabry/papers/monadicDC.pdf). It also includes a corresponding implementation of dynamically scoped variables, as implemented in the paper, *Delimited Dynamic Binding*, by Oleg Kiselyov, Chung-chieh Shan and Amr Sabry (http://okmij.org/ftp/papers/DDBinding.pdf), adapted from the original haskell code, (http://okmij.org/ftp/packages/DBplusDC.tar.gz).
Version 0.2

Oleg Kiselyov's three new monad transformers for multi-prompt delimited control (released with his permission)
This library implements the superset of the interface described in * *A Monadic Framework for Delimited Continuations*, R. Kent Dybvig, Simon Peyton Jones, and Amr Sabry JFP, v17, N6, pp. 687--730, 2007. http://www.cs.indiana.edu/cgi-bin/techreports/TRNNN.cgi?trnum=TR615
See the original article at http://okmij.org/ftp/continuations/implementations.html#CC-monads for more information.
This package split multi-prompt delimited control from http://hackage.haskell.org/package/liboleg for usability.
Version 0.1.1.1

Oleg Kiselyov's three new monad transformers for multi-prompt delimited control (released with his permission)
This library implements the superset of the interface described in * *A Monadic Framework for Delimited Continuations*, R. Kent Dybvig, Simon Peyton Jones, and Amr Sabry JFP, v17, N6, pp. 687--730, 2007. http://www.cs.indiana.edu/cgi-bin/techreports/TRNNN.cgi?trnum=TR615
This library's Control.Monad.CC.CCCxe is derived as a CPS version of http://hackage.haskell.org/package/CC-delcont-exc's Control.Monad.CC.CCExc. Control.Monad.CC.CCCxe is sometimes more efficient; it is always less perspicuous. Both libraries provide the identical interface and are interchangeable. It seems that CC-delcont-exc's Control.Monad.CC.CCExc is faster at delimited control but imposes more overhead on the conventional code; Control.Monad.CC.CCCxe is dual. It pays to use Control.Monad.CC.CCCxe in code with long stretches of determinism punctuated by fits and restarts.
See the original article at http://okmij.org/ftp/continuations/implementations.html#CC-monads for more information.
This package split multi-prompt delimited control from http://hackage.haskell.org/package/liboleg for usability.
Version 0.1.0.2

This library implements the superset of the interface described in * *A Monadic Framework for Delimited Continuations*, R. Kent Dybvig, Simon Peyton Jones, and Amr Sabry JFP, v17, N6, pp. 687--730, 2007. http://www.cs.indiana.edu/cgi-bin/techreports/TRNNN.cgi?trnum=TR615
This library is the most direct implementation of the bubble-up reduction semantics of multi-prompt delimited control. The library stands out in not being based on the continuation monad. Rather, the monad of Control.Monad.CC.CCExc is an extension of the Error monad: a monad for restartable exceptions. The library offers not one monad transformer but a family (CC p) parameterized by the prompt flavor p . The library defines several prompt flavors; the users are welcome to define their own.
See the original article at http://okmij.org/ftp/continuations/implementations.html#CC-monads for more information.
This package split multi-prompt delimited control from http://hackage.haskell.org/package/liboleg for usability.
Version 0.1.0.0

This library implements the superset of the interface described in * *A Monadic Framework for Delimited Continuations*, R. Kent Dybvig, Simon Peyton Jones, and Amr Sabry JFP, v17, N6, pp. 687--730, 2007. http://www.cs.indiana.edu/cgi-bin/techreports/TRNNN.cgi?trnum=TR615
This library is closest to the interface of Dybvig, Peyton Jones and Sabry. Control.Monad.CC.CCRef is derived from the definitional interpreter using the implementation techniques described and justified in the FLOPS 2010 paper. The monad transformer CC implemented by Control.Monad.CC.CCRef requires the base monad to support reference cells. In other words, the base monad must be a member of the type class Mutable: that is, must be IO, ST, STM or their transformer. Control.Monad.CC.CCRef adds to the original interface the frequently used function abortP as a primitive.
See the original article at http://okmij.org/ftp/continuations/implementations.html#CC-monads for more information.
This package split multi-prompt delimited control from http://hackage.haskell.org/package/liboleg for usability.
Version 0.1.0.0

This library implements the superset of the interface described in * *A Monadic Framework for Delimited Continuations*, R. Kent Dybvig, Simon Peyton Jones, and Amr Sabry JFP, v17, N6, pp. 687--730, 2007. http://www.cs.indiana.edu/cgi-bin/techreports/TRNNN.cgi?trnum=TR615
This library is closest to the interface of Dybvig, Peyton Jones and Sabry. Control.Monad.CC.CCRef is derived from the definitional interpreter using the implementation techniques described and justified in the FLOPS 2010 paper. The monad transformer CC implemented by Control.Monad.CC.CCRef requires the base monad to support reference cells. In other words, the base monad must be a member of the type class MonadRef: that is, must be IO, ST, STM or their transformer. Control.Monad.CC.CCRef adds to the original interface the frequently used function abortP as a primitive.
See the original article at http://okmij.org/ftp/continuations/implementations.html#CC-monads for more information.
This package uses http://hackage.haskell.org/package/ref-tf's MonadRef class instead of Mutation class what is used in http://hackage.haskell.org/package/CC-delcont-ref package.
Version 0.1.0.2

A library that provides normalization support via Template Haskell for CCAs, and a modified preprocessor based on Ross Paterson's arrowp that reads Haskell with arrow notation and outputs Haskell 98 + Template Haskell sources for use with CCA library.
Version 0.1.4

A library for generating 2D Charts and Plots, based upon the cairo graphics library.
Version 1.1

Cairo backend for Charts.
Version 1.1

Diagrams backend for Charts.
Version 1.1

Utility functions for using the chart library with GTK
Version 1.1

Do you ever feel the need to test code involving bottoms (e.g. calls to the error function), or code involving infinite values? Then this library could be useful for you.
It is usually easy to get a grip on bottoms by showing a value and waiting to see how much gets printed before the first exception is encountered. However, that quickly gets tiresome and is hard to automate using e.g. QuickCheck (http://www.cse.chalmers.se/~rjmh/QuickCheck/). With this library you can do the tests as simply as the following examples show.
Testing explicitly for bottoms:
@> isBottom (head [\: )] True@ > isBottom bottom: True > isBottom (\_ -> bottom): False > isBottom (bottom, bottom): False
Comparing finite, partial values:
> ((bottom, 3) :: (Bool, Int)) ==! (bottom, 2+5-4): True > ((bottom, bottom) :: (Bool, Int)) <! (bottom, 8): True
Showing partial and infinite values (\/! is join and /\! is meet):
> approxShow 4 $ (True, bottom) \/! (bottom, 'b'): "Just (True, 'b')" > approxShow 4 $ (True, bottom) /\! (bottom, 'b'): "(_|_, _|_)" @> approxShow 4 $ ([1..\: :: [Int])] "[1, 2, 3, _"@ @> approxShow 4 $ (cycle [bottom\: :: [Bool])] "[_|_, _|_, _|_, _"@
Approximately comparing infinite, partial values:
@> approx 100 [2,4..\: ==! approx 100 (filter even [1..] :: [Int])] True@ @> approx 100 [2,4..\: /=! approx 100 (filter even [bottom..] :: [Int])] True@
The code above relies on the fact that bottom, just as error "...", undefined and pattern match failures, yield exceptions. Sometimes we are dealing with properly non-terminating computations, such as the following example, and then it can be nice to be able to apply a time-out:
@> timeOut' 1 (reverse [1..5\: )] Value [5,4,3,2,1]@ @> timeOut' 1 (reverse [1..\: )] NonTermination@
The time-out functionality can be used to treat "slow" computations as bottoms:
> let tweak = Tweak { approxDepth = Just 5, timeOutLimit = Just 2 }: @> semanticEq tweak (reverse [1..\: , [1..]) (bottom :: [Int], [1..] :: [Int])] True@ > let tweak = noTweak { timeOutLimit = Just 2 }: @> semanticJoin tweak (reverse [1..\: , True) ([] :: [Int], bottom)] Just ([],True)@
This can of course be dangerous:
> let tweak = noTweak { timeOutLimit = Just 0 }: @> semanticEq tweak (reverse [1..100000000\: ) (bottom :: [Integer])] True@
Timeouts can also be applied to IO computations:
@> let primes = unfoldr (\(x:xs) -> Just (x, filter ((/= 0) . (`mod` x)) xs)) [2..\: @] > timeOutMicro 100 (print $ filter ((== 1) . (`mod` 83)) primes): [167,499,9NonTermination > timeOutMicro 100 (print $ take 6 $ filter ((== 1) . (`mod` 83)) primes): [167,499,997,1163,1993NonTermination > timeOutMicro 100 (print $ take 6 $ filter ((== 1) . (`mod` 83)) primes): [167,499,997,1163,1993,2657] : Value ()
For the underlying theory and a larger example involving use of QuickCheck, see the article "Chasing Bottoms, A Case Study in Program Verification in the Presence of Partial and Infinite Values" (http://www.cse.chalmers.se/~nad/publications/danielsson-jansson-mpc2004.html).
The code has been tested using GHC. Most parts can probably be ported to other Haskell compilers, but this would require some work. The TimeOut functions require preemptive scheduling, and most of the rest requires Data.Generics; isBottom only requires exceptions, though.
Version 1.3.0.7

This module includes a PDF giving a synopsis of Haskell syntax, keywords, and other essentials. It also has a literate source file which allows all examples to be inspected. Download and unpack this archive to view them.
Version 2.9