packages feed

guarded-allocation-0.0: guarded-allocation.cabal

Name:             guarded-allocation
Version:          0.0
License:          BSD3
License-File:     LICENSE
Author:           Henning Thielemann <haskell@henning-thielemann.de>
Maintainer:       Henning Thielemann <haskell@henning-thielemann.de>
Homepage:         http://hub.darcs.net/thielema/guarded-allocation/
Category:         Debug
Synopsis:         Memory allocation with added stress tests and integrity checks
Description:
  Provide adaptions of @mallocForeignPtrArray@ and @allocaArray@
  that add stress tests and integrity checks.
  .
  There are three modules:
  .
  * @Guarded.Plain@: exports the original allocation routines
  .
  * @Guarded.Debug@: exports allocation routines that add stress and checks
  .
  * @Guarded@: exports either @Guarded.Plain@ or @Guarded.Debug@
    depending on the Cabal @debug@ flag.
  .
  It is intended that you always import the @Guarded@ module in user code
  and install a package version with enabled debug flag
  to a custom package database for debugging.
  If you compile your user program you can choose production or debugging mode
  by choosing the default or the custom debugging package database,
  respectively.
  .
  This package is inspired by the famous Amiga debug tool MungWall.
  The Linux counterpart is Electric Fence.

Tested-With:      GHC==7.4.2, GHC==7.8.4, GHC==8.4.3
Cabal-Version:    >=1.6
Build-Type:       Simple
Extra-Source-Files:
  Makefile
  README.md

Source-Repository this
  Tag:         0.1
  Type:        darcs
  Location:    http://hub.darcs.net/thielema/guarded-allocation/

Source-Repository head
  Type:        darcs
  Location:    http://hub.darcs.net/thielema/guarded-allocation/

Flag debug
  Description: Add stress tests and integrity checks to allocations
  Default:     False
  Manual:      True

Library
  Build-Depends:
    base >=4.5 && <5

  GHC-Options:      -Wall
  Hs-Source-Dirs:   src
  If flag(debug)
    Hs-Source-Dirs: frontend/debug
  Else
    Hs-Source-Dirs: frontend/plain
  Exposed-Modules:
    Foreign.Marshal.Array.Guarded
    Foreign.Marshal.Array.Guarded.Plain
    Foreign.Marshal.Array.Guarded.Debug