global: Library enabling unique top-level declarations

[ bsd3, data, language, library, system ] [ Propose Tags ] [ Report a vulnerability ]

The "global" library enables the declaration of unique top-level declarations, including references to mutable state accessible via IO.

Conceptually, this library defines primitive means of unique declarations, whose internal implementation is hidden from users, and uses Template Haskell to provide a public interface. Thus, it is not necessarily portable across various implementations. It is currently designed to be compatible with GHC. Users do not need to be aware of the internal, low-level implementation; if a more portable, stable means of providing the same functionality becomes available, the library can be updated without changing the provided public interface.

While this library provides the basis for an alternative approach to managing state, users should consider using instead the transformers library's StateT transformer, possibly accompanied with fclabels to manage hierarchical state (libraries that provide a higher-level means of managing monad stacks based on transformers include mtl, monads-tf, and monad-operations). This library might be more appropriately used for other purposes, such as to provide a means to directly translate C to Haskell with a result whose style more closely resembles that of the original code. Users should also consider using the language feature ImplicitParams.

Examples of small programs that use this library are provided in the repository in which it resides.


[Skip to Readme]

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.2.0.0, 0.2.0.1, 0.2.1.0
Change log CHANGELOG.md
Dependencies base (>=4 && <5), haskell-src-exts (>=1.9 && <2), haskell-src-exts-qq (>=0.3 && <1), loch-th (>=0.1 && <1), SafeSemaphore (>=0.7 && <1), stm (>=2 && <3), syntax-trees-fork-bairyn (>=0.1.2.1 && <1), tagged (<1), template-haskell (>=2.8.0.0 && <3) [details]
Tested with ghc ==7.8.3
License BSD-3-Clause
Copyright Copyright (C) 2011 Byron James Johnson
Author Byron James Johnson
Maintainer ByronJohnsonFP@gmail.com
Category Data, Language, System
Home page https://github.com/bairyn/global
Bug tracker https://github.com/bairyn/global/issues
Source repo head: git clone git@github.com:bairyn/global.git
this: git clone git@github.com:bairyn/global.git(tag v0.2.1.0)
Uploaded by ByronJohnson at 2014-12-02T19:20:17Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 2408 total (0 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for global-0.2.1.0

[back to package description]

The changelog does not cover every commit. It outlines highlights and significant changes.

Quality note: In late 2014, I found this repository on my hard drive from 2011. I'm surprised and don't remember why I never uploaded this to Hackage. As a relatively inexperienced 16-year-old with at most 2 years of functional programming experience (with much more procedural programming experience), I wrote Haskell code in a way that I now expect to be capable of rewriting with something of much better quality. But I was pleasantly surprised with the quality of the documentation, taking into account my memory of my past self. Quality-wise, it seems better than a few other projects I wrote at around the same time, e.g. monad-state, although that was 6-12 months earlier.

I've since converted the repository to git and uploaded it to github. I've patched it up so that it builds, but nothing more yet (sans a few minor cleanups here and there, largely just in the cabal file, that I'm applying to each of my old projects I found).

Contributions, feedback, and constructive criticism are welcome.