1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
|
Name: explicit-exception
Version: 0.1.7
License: BSD3
License-File: LICENSE
Author: Henning Thielemann <haskell@henning-thielemann.de>
Maintainer: Henning Thielemann <haskell@henning-thielemann.de>
Homepage: http://www.haskell.org/haskellwiki/Exception
Category: Control
Stability: Experimental
Synopsis: Exceptions which are explicit in the type signature.
Description:
Synchronous and Asynchronous exceptions which are explicit in the type signature.
The first ones are very similar to 'Either' and 'Control.Monad.Error.ErrorT'.
The second ones are used for 'System.IO.readFile' and 'System.IO.hGetContents'.
This package is a proposal for improved exception handling in Haskell.
It strictly separates between handling of
exceptional situations (file not found, invalid user input,
see <http://www.haskell.org/haskellwiki/Exception>) and
(programming) errors (division by zero, index out of range,
see <http://www.haskell.org/haskellwiki/Error>).
Handling of the first one is called \"exception handling\",
whereas handling of errors is better known as \"debugging\".
.
For applications see the packages @midi@, @spreadsheet@, @http-monad@.
.
Although I'm not happy with the identifier style of the Monad Transformer Library
(partially intended for unqualified use)
I have tried to adopt it for this library,
in order to let Haskell programmers get accustomed easily to it.
.
To do:
Because many people requested it,
we will provide a @bracket@ function that frees a resource
both when an exception and an error occurs,
that is, it combines exception handling and debugging.
However note that freeing resources in case of an error is dangerous
and may cause further damage.
Tested-With: GHC==6.8.2
Cabal-Version: >=1.6
Build-Type: Simple
Source-Repository head
type: darcs
location: http://code.haskell.org/explicit-exception/
Source-Repository this
type: darcs
location: http://code.haskell.org/explicit-exception/
tag: 0.1.7
Flag buildTests
description: Build test suite
default: False
Flag splitBase
description: Choose the smaller, split-up base package from version 2 on.
Library
Build-Depends: transformers >=0.2 && <0.4
If impl(jhc)
Build-Depends:
applicative >=1.0 && <1.1,
base >= 1 && <2
Else
If flag(splitBase)
Build-Depends: base >= 2 && <5
Else
Build-Depends:
special-functors >=1.0 && <1.1,
base >= 1 && <2
GHC-Options: -Wall
Hs-Source-Dirs: src
Exposed-Modules:
Control.Monad.Exception.Asynchronous
Control.Monad.Exception.Asynchronous.Lazy
Control.Monad.Exception.Asynchronous.Strict
Control.Monad.Exception.Synchronous
If !impl(jhc)
Other-Modules:
Control.Monad.Exception.Warning
Control.Monad.Exception.Label
Control.Monad.Label
System.IO.Straight
System.IO.Exception.File
System.IO.Exception.BinaryFile
System.IO.Exception.TextFile
-- System.IO.Exception.Std
-- Debug.Error
Executable ee-tar
If flag(buildTests)
Build-Depends:
bytestring >=0.9.0.1 && <0.10,
tar >=0.3 && <0.4
Else
Buildable: False
GHC-Options: -Wall
Hs-Source-Dirs: src, spaceleak
Main-Is: Tar.hs
Executable ee-test
If flag(buildTests)
Build-Depends:
bytestring >=0.9.0.1 && <0.10
Else
Buildable: False
GHC-Options: -Wall
Hs-Source-Dirs: src, spaceleak
Main-Is: Example.hs
Executable ee-unzip
If !flag(buildTests)
Buildable: False
GHC-Options: -Wall
Hs-Source-Dirs: spaceleak
Main-Is: Unzip.hs
Executable ee-writer
If !flag(buildTests)
Buildable: False
Buildable: False
GHC-Options: -Wall
Hs-Source-Dirs: spaceleak
Main-Is: Writer.hs
|