Hoogle Search

Within LTS Haskell 24.34 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. package data-accessor

    Utilities for accessing and manipulating fields of records In Haskell 98 the name of a record field is automatically also the name of a function which gets the value of the according field. E.g. if we have data Pair a b = Pair {first :: a, second :: b} then

    first  :: Pair a b -> a
    second :: Pair a b -> b
    
    However for setting or modifying a field value we need to use some syntactic sugar, which is often clumsy.
    modifyFirst :: (a -> a) -> (Pair a b -> Pair a b)
    modifyFirst f r@(Pair{first=a}) = r{first = f a}
    
    With this package you can define record field accessors which allow setting, getting and modifying values easily. The package clearly demonstrates the power of the functional approach: You can combine accessors of a record and sub-records, to make the access look like the fields of the sub-record belong to the main record. Example:
    *Data.Accessor.Example> (first^:second^=10) (('b',7),"hallo")
    (('b',10),"hallo")
    
    You can easily manipulate record fields in a Control.Monad.State.State monad, you can easily code Show instances that use the Accessor syntax and you can parse binary streams into records. See Data.Accessor.Example for demonstration of all features. It would be great if in revised Haskell versions the names of record fields are automatically Data.Accessor.Accessors rather than plain get functions. For now, the package data-accessor-template provides Template Haskell functions for automated generation of Data.Acesssor.Accessors. See also the other data-accessor packages that provide an Accessor interface to other data types. The package enumset provides accessors to bit-packed records. For similar packages see lenses and fclabel. A related concept are editors http://conal.net/blog/posts/semantic-editor-combinators/. Editors only consist of a modify method (and modify applied to a const function is a set function). This way, they can modify all function values of a function at once, whereas an accessor can only change a single function value, say, it can change f 0 = 1 to f 0 = 2. This way, editors can even change the type of a record or a function. An Arrow instance can be defined for editors, but for accessors only a Category instance is possible ((.) method). The reason is the arr method of the Arrow class, that conflicts with the two-way nature (set and get) of accessors.

  2. package entropy

    A platform independent entropy source A mostly platform independent method to obtain cryptographically strong entropy (RDRAND, urandom, CryptAPI, and patches welcome) Users looking for cryptographically strong (number-theoretically sound) PRNGs should see the DRBG package too.

  3. package generic-deriving

    Generic programming library for generalised deriving. This package provides functionality for generalising the deriving mechanism in Haskell to arbitrary classes. It was first described in the paper:

    • A generic deriving mechanism for Haskell. Jose Pedro Magalhaes, Atze Dijkstra, Johan Jeuring, and Andres Loeh. Haskell'10.
    The current implementation integrates with the new GHC Generics. See http://www.haskell.org/haskellwiki/GHC.Generics for more information. Template Haskell code is provided for supporting older GHCs. This library is organized as follows: It is worth emphasizing that these modules are primarly intended for educational purposes. Many of the classes in these modules resemble other commonly used classes—for example, GShow from Generics.Deriving.Show resembles Show from base—but in general, the classes that generic-deriving defines are not drop-in replacements. Moreover, the generic defaults that generic-deriving provide often make simplifying assumptions that may violate expectations of how these classes might work elsewhere. For example, the generic default for GShow does not behave exactly like deriving Show would. If you are seeking GHC.Generics-based defaults for type classes in base, consider using the generic-data library.

  4. package linear

    Linear Algebra Types and combinators for linear algebra on free vector spaces

  5. package non-empty

    List-like structures with static restrictions on the number of elements We provide the data type NonEmpty that allows to store a list-like structure with at least or exactly n elements, where n is fixed in the type in a kind of Peano encoding and is usually small. The datatype is intended to increase safety by making functions total that are partial on plain lists. E.g. on a non-empty list, head and tail are always defined. There are more such data types like Optional and Empty. Together with NonEmpty you can define a list type for every finite set of admissible list lengths. The datatype can be combined with Lists, Sequences and Sets (from the containers package). The package needs only Haskell 98. Similar packages:

    • semigroups, semigroupoids: restricted to lists, minimum number of elements: 1, provides more type classes tailored to the use of non-empty lists.
    • NonEmptyList: restricted to lists, minimum number of elements: 1
    • NonEmpty: restricted to lists, minimum number of elements: 1, designed for unqualified use of identifiers
    • Cardinality:NeverEmptyList
    • mono-traversable:Data.MinLen: allows to specify a minimum number of elements using type families and works also for monomorphic data structures like ByteString
    • http://www.haskell.org/haskellwiki/Non-empty_list
    Related packages:
    • Stream: Lists that contain always infinitely many elements.
    • fixed-length: Uses the data structure of this package and defines a closed-world class for fixed-length lists and an according index type.
    • fixed-list: Uses the same data structure as this package but is intended for fixing the number of elements in a list. Requires multi-parameter type classes with functional dependencies.

  6. package optics-core

    Optics as an abstract interface: core definitions This package makes it possible to define and use Lenses, Traversals, Prisms and other optics, using an abstract interface. . This variant provides core definitions with a minimal dependency footprint. See the optics package (and its dependencies) for documentation and the "batteries-included" variant.

  7. package typed-process

    Run external processes, with strong typing of streams Please see the tutorial at https://github.com/fpco/typed-process#readme

  8. package MonadRandom

    Random-number generation monad. Support for computations which consume random values.

  9. package ansi-wl-pprint

    The Wadler/Leijen Pretty Printer for colored ANSI terminal output This is a pretty printing library based on Wadler's paper "A Prettier Printer". It has been enhanced with support for ANSI terminal colored output using the ansi-terminal package.

  10. package ghc-bignum

    GHC BigNum library This package provides the low-level implementation of the standard BigNat, Natural and Integer types.

Page 18 of many | Previous | Next